diff -Nrc3pad gcc-3.2.3/gcc/objc/config-lang.in gcc-3.3/gcc/objc/config-lang.in *** gcc-3.2.3/gcc/objc/config-lang.in 2001-12-20 00:20:47.000000000 +0000 --- gcc-3.3/gcc/objc/config-lang.in 2002-07-14 01:59:15.000000000 +0000 *************** compilers="cc1obj\$(exeext)" *** 32,34 **** --- 32,36 ---- stagestuff="" target_libs=target-libobjc + + gtfiles="\$(srcdir)/objc/objc-act.h \$(srcdir)/c-parse.in \$(srcdir)/c-tree.h \$(srcdir)/c-decl.c \$(srcdir)/c-objc-common.c \$(srcdir)/c-common.c \$(srcdir)/c-common.h \$(srcdir)/c-pragma.c \$(srcdir)/c-parse.in" diff -Nrc3pad gcc-3.2.3/gcc/objc/lang-specs.h gcc-3.3/gcc/objc/lang-specs.h *** gcc-3.2.3/gcc/objc/lang-specs.h 2002-03-18 20:10:21.000000000 +0000 --- gcc-3.3/gcc/objc/lang-specs.h 2003-03-02 10:17:15.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 25,41 **** {"@objective-c", /* cc1obj has an integrated ISO C preprocessor. We should invoke the external preprocessor if -save-temps or -traditional is given. */ ! "%{E|M|MM:%(trad_capable_cpp) -lang-objc %{ansi:-std=c89} %(cpp_options)}\ %{!E:%{!M:%{!MM:\ ! %{save-temps|no-integrated-cpp:%(trad_capable_cpp) -lang-objc %{ansi:-std=c89}\ ! %(cpp_options) %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\ cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %{gen-decls}}\ %{!save-temps:%{!no-integrated-cpp:\ ! %{traditional|ftraditional|traditional-cpp:\ ! tradcpp0 -lang-objc %{ansi:-std=c89} %(cpp_options) %{!pipe:%g.mi} |\n\ ! cc1obj -fpreprocessed %{!pipe:%g.mi} %(cc1_options) %{gen-decls}}\ ! %{!traditional:%{!ftraditional:%{!traditional-cpp:\ ! cc1obj %{ansi:-std=c89} %(cpp_unique_options) %(cc1_options) %{gen-decls}}}}}}\ %{!fsyntax-only:%(invoke_as)}}}}", 0}, {".mi", "@objc-cpp-output", 0}, {"@objc-cpp-output", --- 25,39 ---- {"@objective-c", /* cc1obj has an integrated ISO C preprocessor. We should invoke the external preprocessor if -save-temps or -traditional is given. */ ! "%{E|M|MM:%(trad_capable_cpp)\ ! -lang-objc %(cpp_options) %(cpp_debug_options)}\ %{!E:%{!M:%{!MM:\ ! %{traditional|ftraditional|traditional-cpp:\ ! %eGNU Objective C no longer supports traditional compilation}\ ! %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\ cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %{gen-decls}}\ %{!save-temps:%{!no-integrated-cpp:\ ! cc1obj %(cpp_unique_options) %(cc1_options) %{gen-decls}}}\ %{!fsyntax-only:%(invoke_as)}}}}", 0}, {".mi", "@objc-cpp-output", 0}, {"@objc-cpp-output", diff -Nrc3pad gcc-3.2.3/gcc/objc/Make-lang.in gcc-3.3/gcc/objc/Make-lang.in *** gcc-3.2.3/gcc/objc/Make-lang.in 2002-05-23 17:57:45.000000000 +0000 --- gcc-3.3/gcc/objc/Make-lang.in 2002-08-08 09:10:39.000000000 +0000 *************** objc-lang.o : $(srcdir)/objc/objc-lang.c *** 63,72 **** -c $(srcdir)/objc/objc-lang.c $(OUTPUT_OPTION) objc-parse.o : $(srcdir)/objc/objc-parse.c \ ! $(CONFIG_H) $(TREE_H) $(srcdir)/toplev.h $(srcdir)/ggc.h \ ! $(srcdir)/c-lex.h $(srcdir)/c-tree.h $(srcdir)/c-common.h \ $(srcdir)/input.h $(srcdir)/flags.h $(srcdir)/output.h \ ! $(srcdir)/objc/objc-act.h $(SYSTEM_H) $(CPPLIB_H) $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \ -c $(srcdir)/objc/objc-parse.c $(OUTPUT_OPTION) --- 63,72 ---- -c $(srcdir)/objc/objc-lang.c $(OUTPUT_OPTION) objc-parse.o : $(srcdir)/objc/objc-parse.c \ ! $(CONFIG_H) $(TREE_H) $(C_COMMON_H) $(srcdir)/toplev.h $(srcdir)/ggc.h \ ! $(srcdir)/c-pragma.h $(srcdir)/c-tree.h \ $(srcdir)/input.h $(srcdir)/flags.h $(srcdir)/output.h \ ! $(srcdir)/objc/objc-act.h $(SYSTEM_H) $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \ -c $(srcdir)/objc/objc-parse.c $(OUTPUT_OPTION) *************** $(srcdir)/objc/objc-parse.y: $(srcdir)/c *** 90,102 **** objc-act.o : $(srcdir)/objc/objc-act.c \ $(CONFIG_H) $(TREE_H) $(RTL_H) $(SYSTEM_H) $(EXPR_H) $(TARGET_H) \ ! $(srcdir)/c-tree.h $(srcdir)/c-common.h $(srcdir)/c-lex.h \ $(srcdir)/toplev.h $(srcdir)/flags.h $(srcdir)/objc/objc-act.h \ $(srcdir)/input.h $(srcdir)/function.h $(srcdir)/output.h $(srcdir)/debug.h \ ! $(srcdir)/langhooks.h $(LANGHOOKS_DEF_H) $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \ -c $(srcdir)/objc/objc-act.c # # Build hooks: --- 90,104 ---- objc-act.o : $(srcdir)/objc/objc-act.c \ $(CONFIG_H) $(TREE_H) $(RTL_H) $(SYSTEM_H) $(EXPR_H) $(TARGET_H) \ ! $(C_COMMON_H) $(srcdir)/c-tree.h $(srcdir)/diagnostic.h \ $(srcdir)/toplev.h $(srcdir)/flags.h $(srcdir)/objc/objc-act.h \ $(srcdir)/input.h $(srcdir)/function.h $(srcdir)/output.h $(srcdir)/debug.h \ ! $(srcdir)/langhooks.h $(LANGHOOKS_DEF_H) gtype-objc.h $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \ -c $(srcdir)/objc/objc-act.c + gtype-objc.h : s-gtype ; @true + # # Build hooks: *************** objc.uninstall: *** 129,134 **** --- 131,137 ---- objc.mostlyclean: -rm -f tmp-objc-prs.y -rm -f objc/*$(objext) objc/xforward objc/fflags + -rm -f objc/*$(coverageexts) objc.clean: objc.mostlyclean -rm -rf objc-headers objc.distclean: diff -Nrc3pad gcc-3.2.3/gcc/objc/objc-act.c gcc-3.3/gcc/objc/objc-act.c *** gcc-3.2.3/gcc/objc/objc-act.c 2002-03-28 18:49:59.000000000 +0000 --- gcc-3.3/gcc/objc/objc-act.c 2002-10-24 00:46:02.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 45,51 **** #include "rtl.h" #include "expr.h" #include "c-tree.h" - #include "c-lex.h" #include "c-common.h" #include "flags.h" #include "objc-act.h" --- 45,50 ---- *************** Boston, MA 02111-1307, USA. */ *** 55,63 **** #include "output.h" #include "toplev.h" #include "ggc.h" - #include "cpplib.h" #include "debug.h" #include "target.h" /* This is the default way of generating a method name. */ /* I am not sure it is really correct. --- 54,62 ---- #include "output.h" #include "toplev.h" #include "ggc.h" #include "debug.h" #include "target.h" + #include "diagnostic.h" /* This is the default way of generating a method name. */ /* I am not sure it is really correct. *************** Boston, MA 02111-1307, USA. */ *** 86,133 **** #define OBJC_FORWARDING_MIN_OFFSET 0 #endif - /* Define the special tree codes that we use. */ - - /* Table indexed by tree code giving a string containing a character - classifying the tree code. */ - - #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE, - - static const char objc_tree_code_type[] = { - 'x', - #include "objc-tree.def" - }; - #undef DEFTREECODE - - /* Table indexed by tree code giving number of expression - operands beyond the fixed part of the node structure. - Not used for types or decls. */ - - #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH, - - static const int objc_tree_code_length[] = { - 0, - #include "objc-tree.def" - }; - #undef DEFTREECODE - - /* Names of tree components. - Used for printing out the tree and error messages. */ - #define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME, - - static const char * const objc_tree_code_name[] = { - "@@dummy", - #include "objc-tree.def" - }; - #undef DEFTREECODE /* Set up for use of obstacks. */ #include "obstack.h" - #define obstack_chunk_alloc xmalloc - #define obstack_chunk_free free - /* This obstack is used to accumulate the encoding of a data type. */ static struct obstack util_obstack; /* This points to the beginning of obstack contents, --- 85,95 ---- *************** static tree build_objc_method_call PARA *** 166,172 **** static void generate_strings PARAMS ((void)); static tree get_proto_encoding PARAMS ((tree)); static void build_selector_translation_table PARAMS ((void)); - static tree build_ivar_chain PARAMS ((tree, int)); static tree objc_add_static_instance PARAMS ((tree, tree)); --- 128,133 ---- *************** static int check_methods_accessible PAR *** 199,205 **** static void encode_aggregate_within PARAMS ((tree, int, int, int, int)); static const char *objc_demangle PARAMS ((const char *)); - static const char *objc_printable_name PARAMS ((tree, int)); static void objc_expand_function_end PARAMS ((void)); /* Hash tables to manage the global pool of method prototypes. */ --- 160,165 ---- *************** static void dump_interface PARAMS ((FI *** 270,276 **** /* Everything else. */ - static void add_objc_tree_codes PARAMS ((void)); static tree define_decl PARAMS ((tree, tree)); static tree lookup_method_in_protocol_list PARAMS ((tree, tree, int)); static tree lookup_protocol_in_reflist PARAMS ((tree, tree)); --- 230,235 ---- *************** static tree build_typed_selector_referen *** 289,295 **** static tree build_selector_reference PARAMS ((tree)); static tree build_class_reference_decl PARAMS ((void)); static void add_class_reference PARAMS ((tree)); - static tree objc_copy_list PARAMS ((tree, tree *)); static tree build_protocol_template PARAMS ((void)); static tree build_descriptor_table_initializer PARAMS ((tree, tree)); static tree build_method_prototype_list_template PARAMS ((tree, int)); --- 248,253 ---- *************** static void generate_classref_translatio *** 332,340 **** static void handle_class_ref PARAMS ((tree)); static void generate_struct_by_value_array PARAMS ((void)) ATTRIBUTE_NORETURN; ! static void objc_act_parse_init PARAMS ((void)); ! static void ggc_mark_imp_list PARAMS ((void *)); ! static void ggc_mark_hash_table PARAMS ((void *)); /*** Private Interface (data) ***/ --- 290,296 ---- static void handle_class_ref PARAMS ((tree)); static void generate_struct_by_value_array PARAMS ((void)) ATTRIBUTE_NORETURN; ! static void encode_complete_bitfield PARAMS ((int, tree, int)); /*** Private Interface (data) ***/ *************** static void ggc_mark_hash_table PARAMS *** 353,365 **** #define UTAG_METHOD_LIST "_objc_method_list" #define UTAG_CATEGORY "_objc_category" #define UTAG_MODULE "_objc_module" - #define UTAG_STATICS "_objc_statics" #define UTAG_SYMTAB "_objc_symtab" #define UTAG_SUPER "_objc_super" #define UTAG_SELECTOR "_objc_selector" #define UTAG_PROTOCOL "_objc_protocol" - #define UTAG_PROTOCOL_LIST "_objc_protocol_list" #define UTAG_METHOD_PROTOTYPE "_objc_method_prototype" #define UTAG_METHOD_PROTOTYPE_LIST "_objc__method_prototype_list" --- 309,319 ---- *************** static void ggc_mark_hash_table PARAMS *** 369,376 **** #define PROTOCOL_OBJECT_CLASS_NAME "Protocol" - static const char *constant_string_class_name = NULL; - static const char *TAG_GETCLASS; static const char *TAG_GETMETACLASS; static const char *TAG_MSGSEND; --- 323,328 ---- *************** static const char *default_constant_stri *** 381,388 **** /* The OCTI_... enumeration itself is in objc/objc-act.h. */ tree objc_global_trees[OCTI_MAX]; - int objc_receiver_context; - static void handle_impent PARAMS ((struct imp_entry *)); struct imp_entry *imp_list = 0; --- 333,338 ---- *************** extern enum debug_info_type write_symbol *** 403,435 **** extern const char *dump_base_name; ! /* Generate code for GNU or NeXT runtime environment. */ ! ! #ifdef NEXT_OBJC_RUNTIME ! int flag_next_runtime = 1; ! #else ! int flag_next_runtime = 0; ! #endif ! ! int flag_typed_selectors; ! ! /* Open and close the file for outputting class declarations, if requested. */ ! ! int flag_gen_declaration = 0; FILE *gen_declaration_file; - /* Warn if multiple methods are seen for the same selector, but with - different argument types. */ - - int warn_selector = 0; - - /* Warn if methods required by a protocol are not implemented in the - class adopting it. When turned off, methods inherited to that - class are also considered implemented */ - - int flag_warn_protocol = 1; - /* Tells "encode_pointer/encode_aggregate" whether we are generating type descriptors for instance variables (as opposed to methods). Type descriptors for instance variables contain more information --- 353,362 ---- extern const char *dump_base_name; ! static int flag_typed_selectors; FILE *gen_declaration_file; /* Tells "encode_pointer/encode_aggregate" whether we are generating type descriptors for instance variables (as opposed to methods). Type descriptors for instance variables contain more information *************** int flag_warn_protocol = 1; *** 437,448 **** static int generating_instance_variables = 0; - /* Tells the compiler that this is a special run. Do not perform any - compiling, instead we are to test some platform dependent features - and output a C header file with appropriate definitions. */ - - static int print_struct_values = 0; - /* Some platforms pass small structures through registers versus through an invisible pointer. Determine at what size structure is the transition point between the two possibilities. */ --- 364,369 ---- *************** objc_init (filename) *** 511,519 **** const char *filename; { filename = c_objc_common_init (filename); ! add_objc_tree_codes (); ! ! decl_printable_name = objc_printable_name; /* Force the line number back to 0; check_newline will have raised it to 1, which will make the builtin functions appear --- 432,439 ---- const char *filename; { filename = c_objc_common_init (filename); ! if (filename == NULL) ! return filename; /* Force the line number back to 0; check_newline will have raised it to 1, which will make the builtin functions appear *************** objc_init (filename) *** 557,564 **** if (print_struct_values) generate_struct_by_value_array (); - objc_act_parse_init (); - return filename; } --- 477,482 ---- *************** finish_file () *** 567,618 **** { c_objc_common_finish_file (); ! finish_objc (); /* Objective-C finalization */ if (gen_declaration_file) fclose (gen_declaration_file); } - - int - objc_decode_option (argc, argv) - int argc; - char **argv; - { - const char *p = argv[0]; - - if (!strcmp (p, "-gen-decls")) - flag_gen_declaration = 1; - else if (!strcmp (p, "-Wselector")) - warn_selector = 1; - else if (!strcmp (p, "-Wno-selector")) - warn_selector = 0; - else if (!strcmp (p, "-Wprotocol")) - flag_warn_protocol = 1; - else if (!strcmp (p, "-Wno-protocol")) - flag_warn_protocol = 0; - else if (!strcmp (p, "-fgnu-runtime")) - flag_next_runtime = 0; - else if (!strcmp (p, "-fno-next-runtime")) - flag_next_runtime = 0; - else if (!strcmp (p, "-fno-gnu-runtime")) - flag_next_runtime = 1; - else if (!strcmp (p, "-fnext-runtime")) - flag_next_runtime = 1; - else if (!strcmp (p, "-print-objc-runtime-info")) - print_struct_values = 1; - #define CSTSTRCLASS "-fconstant-string-class=" - else if (!strncmp (p, CSTSTRCLASS, sizeof(CSTSTRCLASS) - 2)) { - if (strlen (argv[0]) <= strlen (CSTSTRCLASS)) - error ("no class name specified as argument to -fconstant-string-class"); - constant_string_class_name = xstrdup(argv[0] + sizeof(CSTSTRCLASS) - 1); - } - #undef CSTSTRCLASS - else - return c_decode_option (argc, argv); - - return 1; - } - static tree define_decl (declarator, declspecs) --- 485,498 ---- { c_objc_common_finish_file (); ! /* Finalize Objective-C runtime data. No need to generate tables ! and code if only checking syntax. */ ! if (!flag_syntax_only) ! finish_objc (); if (gen_declaration_file) fclose (gen_declaration_file); } static tree define_decl (declarator, declspecs) *************** define_decl (declarator, declspecs) *** 636,649 **** `a' and `b' are the same class type, or `a' and `b' are of class types A and B such that B is a descendant of A. */ - int - maybe_objc_comptypes (lhs, rhs, reflexive) - tree lhs, rhs; - int reflexive; - { - return objc_comptypes (lhs, rhs, reflexive); - } - static tree lookup_method_in_protocol_list (rproto_list, sel_name, class_meth) tree rproto_list; --- 516,521 ---- *************** lookup_protocol_in_reflist (rproto_list, *** 715,724 **** return 0; } ! /* Return 1 if LHS and RHS are compatible types for assignment ! or various other operations. Return 0 if they are incompatible, ! and return -1 if we choose to not decide. When the operation ! is REFLEXIVE, check for compatibility in either direction. */ int objc_comptypes (lhs, rhs, reflexive) --- 587,610 ---- return 0; } ! /* Return 1 if LHS and RHS are compatible types for assignment or ! various other operations. Return 0 if they are incompatible, and ! return -1 if we choose to not decide (because the types are really ! just C types, not ObjC specific ones). When the operation is ! REFLEXIVE (typically comparisons), check for compatibility in ! either direction; when it's not (typically assignments), don't. ! ! This function is called in two cases: when both lhs and rhs are ! pointers to records (in which case we check protocols too), and ! when both lhs and rhs are records (in which case we check class ! inheritance only). ! ! Warnings about classes/protocols not implementing a protocol are ! emitted here (multiple of those warnings might be emitted for a ! single line!); generic warnings about incompatible assignments and ! lacks of casts in comparisons are/must be emitted by the caller if ! we return 0. ! */ int objc_comptypes (lhs, rhs, reflexive) *************** objc_comptypes (lhs, rhs, reflexive) *** 728,733 **** --- 614,621 ---- { /* New clause for protocols. */ + /* Here we manage the case of a POINTER_TYPE = POINTER_TYPE. We only + manage the ObjC ones, and leave the rest to the C code. */ if (TREE_CODE (lhs) == POINTER_TYPE && TREE_CODE (TREE_TYPE (lhs)) == RECORD_TYPE && TREE_CODE (rhs) == POINTER_TYPE *************** objc_comptypes (lhs, rhs, reflexive) *** 742,770 **** tree rproto, rproto_list; tree p; if (rhs_is_proto) { rproto_list = TYPE_PROTOCOL_LIST (rhs); ! /* Make sure the protocol is supported by the object ! on the rhs. */ ! for (lproto = lproto_list; lproto; lproto = TREE_CHAIN (lproto)) { ! p = TREE_VALUE (lproto); ! rproto = lookup_protocol_in_reflist (rproto_list, p); ! if (!rproto) ! warning ("object does not conform to the `%s' protocol", ! IDENTIFIER_POINTER (PROTOCOL_NAME (p))); } } else if (TYPED_OBJECT (TREE_TYPE (rhs))) { tree rname = TYPE_NAME (TREE_TYPE (rhs)); tree rinter; ! /* Make sure the protocol is supported by the object ! on the rhs. */ for (lproto = lproto_list; lproto; lproto = TREE_CHAIN (lproto)) { p = TREE_VALUE (lproto); --- 630,704 ---- tree rproto, rproto_list; tree p; + /* = */ if (rhs_is_proto) { rproto_list = TYPE_PROTOCOL_LIST (rhs); + + if (!reflexive) + { + /* An assignment between objects of type 'id + '; make sure the protocol on the lhs is + supported by the object on the rhs. */ + for (lproto = lproto_list; lproto; + lproto = TREE_CHAIN (lproto)) + { + p = TREE_VALUE (lproto); + rproto = lookup_protocol_in_reflist (rproto_list, p); ! if (!rproto) ! warning ! ("object does not conform to the `%s' protocol", ! IDENTIFIER_POINTER (PROTOCOL_NAME (p))); ! } ! return 1; ! } ! else { ! /* Obscure case - a comparison between two objects ! of type 'id '. Check that either the ! protocol on the lhs is supported by the object on ! the rhs, or viceversa. */ ! ! /* Check if the protocol on the lhs is supported by the ! object on the rhs. */ ! for (lproto = lproto_list; lproto; ! lproto = TREE_CHAIN (lproto)) ! { ! p = TREE_VALUE (lproto); ! rproto = lookup_protocol_in_reflist (rproto_list, p); ! ! if (!rproto) ! { ! /* Check failed - check if the protocol on the rhs ! is supported by the object on the lhs. */ ! for (rproto = rproto_list; rproto; ! rproto = TREE_CHAIN (rproto)) ! { ! p = TREE_VALUE (rproto); ! lproto = lookup_protocol_in_reflist (lproto_list, ! p); ! if (!lproto) ! { ! /* This check failed too: incompatible */ ! return 0; ! } ! } ! return 1; ! } ! } ! return 1; } } + /* = * */ else if (TYPED_OBJECT (TREE_TYPE (rhs))) { tree rname = TYPE_NAME (TREE_TYPE (rhs)); tree rinter; ! /* Make sure the protocol is supported by the object on ! the rhs. */ for (lproto = lproto_list; lproto; lproto = TREE_CHAIN (lproto)) { p = TREE_VALUE (lproto); *************** objc_comptypes (lhs, rhs, reflexive) *** 776,788 **** tree cat; rproto_list = CLASS_PROTOCOL_LIST (rinter); - /* If the underlying ObjC class does not have - protocols attached to it, perhaps there are - "one-off" protocols attached to the rhs? - E.g., 'id foo;'. */ - if (!rproto_list) - rproto_list = TYPE_PROTOCOL_LIST (TREE_TYPE (rhs)); rproto = lookup_protocol_in_reflist (rproto_list, p); /* Check for protocols adopted by categories. */ cat = CLASS_CATEGORY_LIST (rinter); --- 710,725 ---- tree cat; rproto_list = CLASS_PROTOCOL_LIST (rinter); rproto = lookup_protocol_in_reflist (rproto_list, p); + /* If the underlying ObjC class does not have + the protocol we're looking for, check for "one-off" + protocols (e.g., `NSObject *foo;') attached + to the rhs. */ + if (!rproto) + { + rproto_list = TYPE_PROTOCOL_LIST (TREE_TYPE (rhs)); + rproto = lookup_protocol_in_reflist (rproto_list, p); + } /* Check for protocols adopted by categories. */ cat = CLASS_CATEGORY_LIST (rinter); *************** objc_comptypes (lhs, rhs, reflexive) *** 790,796 **** { rproto_list = CLASS_PROTOCOL_LIST (cat); rproto = lookup_protocol_in_reflist (rproto_list, p); - cat = CLASS_CATEGORY_LIST (cat); } --- 727,732 ---- *************** objc_comptypes (lhs, rhs, reflexive) *** 799,829 **** if (!rproto) warning ("class `%s' does not implement the `%s' protocol", ! IDENTIFIER_POINTER (TYPE_NAME (TREE_TYPE (rhs))), ! IDENTIFIER_POINTER (PROTOCOL_NAME (p))); } } ! ! /* May change...based on whether there was any mismatch */ ! return 1; } else if (rhs_is_proto) ! /* Lhs is not a protocol...warn if it is statically typed */ ! return (TYPED_OBJECT (TREE_TYPE (lhs)) != 0); else ! /* Defer to comptypes. */ ! return -1; } ! else if (TREE_CODE (lhs) == RECORD_TYPE && TREE_CODE (rhs) == RECORD_TYPE) ! ; /* Fall thru. This is the case we have been handling all along */ ! else ! /* Defer to comptypes. */ ! return -1; ! ! /* `id' = ` *', ` *' = `id' */ if ((TYPE_NAME (lhs) == objc_object_id && TYPED_OBJECT (rhs)) || (TYPE_NAME (rhs) == objc_object_id && TYPED_OBJECT (lhs))) return 1; --- 735,861 ---- if (!rproto) warning ("class `%s' does not implement the `%s' protocol", ! IDENTIFIER_POINTER (TYPE_NAME (TREE_TYPE (rhs))), ! IDENTIFIER_POINTER (PROTOCOL_NAME (p))); } + return 1; } ! /* = id */ ! else if (TYPE_NAME (TREE_TYPE (rhs)) == objc_object_id) ! { ! return 1; ! } ! /* = Class */ ! else if (TYPE_NAME (TREE_TYPE (rhs)) == objc_class_id) ! { ! return 0; ! } ! /* = ?? : let comptypes decide. */ ! return -1; } else if (rhs_is_proto) ! { ! /* * = */ ! if (TYPED_OBJECT (TREE_TYPE (lhs))) ! { ! if (reflexive) ! { ! tree rname = TYPE_NAME (TREE_TYPE (lhs)); ! tree rinter; ! tree rproto, rproto_list = TYPE_PROTOCOL_LIST (rhs); ! ! /* Make sure the protocol is supported by the object on ! the lhs. */ ! for (rproto = rproto_list; rproto; ! rproto = TREE_CHAIN (rproto)) ! { ! tree p = TREE_VALUE (rproto); ! tree lproto = 0; ! rinter = lookup_interface (rname); ! ! while (rinter && !lproto) ! { ! tree cat; ! ! tree lproto_list = CLASS_PROTOCOL_LIST (rinter); ! lproto = lookup_protocol_in_reflist (lproto_list, p); ! /* If the underlying ObjC class does not ! have the protocol we're looking for, ! check for "one-off" protocols (e.g., ! `NSObject *foo;') attached to the ! lhs. */ ! if (!lproto) ! { ! lproto_list = TYPE_PROTOCOL_LIST ! (TREE_TYPE (lhs)); ! lproto = lookup_protocol_in_reflist ! (lproto_list, p); ! } + /* Check for protocols adopted by categories. */ + cat = CLASS_CATEGORY_LIST (rinter); + while (cat && !lproto) + { + lproto_list = CLASS_PROTOCOL_LIST (cat); + lproto = lookup_protocol_in_reflist (lproto_list, + p); + cat = CLASS_CATEGORY_LIST (cat); + } + + rinter = lookup_interface (CLASS_SUPER_NAME + (rinter)); + } + + if (!lproto) + warning ("class `%s' does not implement the `%s' protocol", + IDENTIFIER_POINTER (TYPE_NAME + (TREE_TYPE (lhs))), + IDENTIFIER_POINTER (PROTOCOL_NAME (p))); + } + return 1; + } + else + return 0; + } + /* id = */ + else if (TYPE_NAME (TREE_TYPE (lhs)) == objc_object_id) + { + return 1; + } + /* Class = */ + else if (TYPE_NAME (TREE_TYPE (lhs)) == objc_class_id) + { + return 0; + } + /* ??? = : let comptypes decide */ + else + { + return -1; + } + } else ! { ! /* Attention: we shouldn't defer to comptypes here. One bad ! side effect would be that we might loose the REFLEXIVE ! information. ! */ ! lhs = TREE_TYPE (lhs); ! rhs = TREE_TYPE (rhs); ! } } ! if (TREE_CODE (lhs) != RECORD_TYPE || TREE_CODE (rhs) != RECORD_TYPE) ! { ! /* Nothing to do with ObjC - let immediately comptypes take ! responsibility for checking. */ ! return -1; ! } + /* `id' = ` *' ` *' = `id': always allow it. + Please note that + 'Object *o = [[Object alloc] init]; falls + in the case * = `id'. + */ if ((TYPE_NAME (lhs) == objc_object_id && TYPED_OBJECT (rhs)) || (TYPE_NAME (rhs) == objc_object_id && TYPED_OBJECT (lhs))) return 1; *************** objc_comptypes (lhs, rhs, reflexive) *** 864,870 **** return 0; } else ! /* Defer to comptypes. */ return -1; } --- 896,902 ---- return 0; } else ! /* Not an ObjC type - let comptypes do the check. */ return -1; } *************** objc_check_decl (decl) *** 882,894 **** error_with_decl (decl, "`%s' cannot be statically allocated"); } - void - maybe_objc_check_decl (decl) - tree decl; - { - objc_check_decl (decl); - } - /* Implement static typing. At this point, we know we have an interface. */ tree --- 914,919 ---- *************** get_static_reference (interface, protoco *** 903,909 **** tree t, m = TYPE_MAIN_VARIANT (type); t = copy_node (type); - TYPE_BINFO (t) = make_tree_vec (2); /* Add this type to the chain of variants of TYPE. */ TYPE_NEXT_VARIANT (t) = TYPE_NEXT_VARIANT (m); --- 928,933 ---- *************** get_object_reference (protocols) *** 954,960 **** tree t, m = TYPE_MAIN_VARIANT (type); t = copy_node (type); - TYPE_BINFO (t) = make_tree_vec (2); /* Add this type to the chain of variants of TYPE. */ TYPE_NEXT_VARIANT (t) = TYPE_NEXT_VARIANT (m); --- 978,983 ---- *************** synth_module_prologue () *** 1131,1144 **** DECL_INLINE (umsg_decl) = 1; DECL_ARTIFICIAL (umsg_decl) = 1; - if (flag_traditional && TAG_MSGSEND[0] != '_') - DECL_BUILT_IN_NONANSI (umsg_decl) = 1; - make_decl_rtl (umsg_decl, NULL); pushdecl (umsg_decl); } else ! umsg_decl = builtin_function (TAG_MSGSEND, temp_type, 0, NOT_BUILT_IN, 0); /* id objc_msgSendSuper (struct objc_super *, SEL, ...); */ --- 1154,1165 ---- DECL_INLINE (umsg_decl) = 1; DECL_ARTIFICIAL (umsg_decl) = 1; make_decl_rtl (umsg_decl, NULL); pushdecl (umsg_decl); } else ! umsg_decl = builtin_function (TAG_MSGSEND, temp_type, 0, NOT_BUILT_IN, ! NULL, NULL_TREE); /* id objc_msgSendSuper (struct objc_super *, SEL, ...); */ *************** synth_module_prologue () *** 1149,1155 **** NULL_TREE))); umsg_super_decl = builtin_function (TAG_MSGSENDSUPER, ! temp_type, 0, NOT_BUILT_IN, 0); /* id objc_getClass (const char *); */ --- 1170,1177 ---- NULL_TREE))); umsg_super_decl = builtin_function (TAG_MSGSENDSUPER, ! temp_type, 0, NOT_BUILT_IN, ! NULL, NULL_TREE); /* id objc_getClass (const char *); */ *************** synth_module_prologue () *** 1160,1171 **** NULL_TREE))); objc_get_class_decl ! = builtin_function (TAG_GETCLASS, temp_type, 0, NOT_BUILT_IN, 0); /* id objc_getMetaClass (const char *); */ objc_get_meta_class_decl ! = builtin_function (TAG_GETMETACLASS, temp_type, 0, NOT_BUILT_IN, 0); /* static SEL _OBJC_SELECTOR_TABLE[]; */ --- 1182,1195 ---- NULL_TREE))); objc_get_class_decl ! = builtin_function (TAG_GETCLASS, temp_type, 0, NOT_BUILT_IN, ! NULL, NULL_TREE); /* id objc_getMetaClass (const char *); */ objc_get_meta_class_decl ! = builtin_function (TAG_GETMETACLASS, temp_type, 0, NOT_BUILT_IN, ! NULL, NULL_TREE); /* static SEL _OBJC_SELECTOR_TABLE[]; */ *************** synth_module_prologue () *** 1176,1182 **** /* Suppress outputting debug symbols, because dbxout_init hasn'r been called yet. */ enum debug_info_type save_write_symbols = write_symbols; ! struct gcc_debug_hooks *save_hooks = debug_hooks; write_symbols = NO_DEBUG; debug_hooks = &do_nothing_debug_hooks; --- 1200,1206 ---- /* Suppress outputting debug symbols, because dbxout_init hasn'r been called yet. */ enum debug_info_type save_write_symbols = write_symbols; ! const struct gcc_debug_hooks *const save_hooks = debug_hooks; write_symbols = NO_DEBUG; debug_hooks = &do_nothing_debug_hooks; *************** my_build_string (len, str) *** 1243,1263 **** int len; const char *str; { ! int wide_flag = 0; ! tree a_string = build_string (len, str); ! ! /* Some code from combine_strings, which is local to c-parse.y. */ ! if (TREE_TYPE (a_string) == int_array_type_node) ! wide_flag = 1; ! ! TREE_TYPE (a_string) ! = build_array_type (wide_flag ? integer_type_node : char_type_node, ! build_index_type (build_int_2 (len - 1, 0))); ! ! TREE_CONSTANT (a_string) = 1; /* Puts string in the readonly segment */ ! TREE_STATIC (a_string) = 1; ! ! return a_string; } /* Given a chain of STRING_CST's, build a static instance of --- 1267,1273 ---- int len; const char *str; { ! return fix_string_type (build_string (len, str)); } /* Given a chain of STRING_CST's, build a static instance of *************** build_objc_string_object (strings) *** 1283,1289 **** add_class_reference (constant_string_id); ! string = combine_strings (strings); TREE_SET_CODE (string, STRING_CST); length = TREE_STRING_LENGTH (string) - 1; --- 1293,1313 ---- add_class_reference (constant_string_id); ! if (TREE_CHAIN (strings)) ! { ! varray_type vstrings; ! VARRAY_TREE_INIT (vstrings, 32, "strings"); ! ! for (; strings ; strings = TREE_CHAIN (strings)) ! VARRAY_PUSH_TREE (vstrings, strings); ! ! string = combine_strings (vstrings); ! } ! else ! string = strings; ! ! string = fix_string_type (string); ! TREE_SET_CODE (string, STRING_CST); length = TREE_STRING_LENGTH (string) - 1; *************** build_constructor (type, elts) *** 1390,1396 **** else { f = TYPE_FIELDS (type); ! for (e = elts; e ; e = TREE_CHAIN (e), f = TREE_CHAIN (f)) if (TREE_CODE (TREE_TYPE (f)) == POINTER_TYPE || TREE_CODE (TREE_TYPE (f)) == INTEGER_TYPE) TREE_VALUE (e) = convert (TREE_TYPE (f), TREE_VALUE (e)); --- 1414,1420 ---- else { f = TYPE_FIELDS (type); ! for (e = elts; e && f; e = TREE_CHAIN (e), f = TREE_CHAIN (f)) if (TREE_CODE (TREE_TYPE (f)) == POINTER_TYPE || TREE_CODE (TREE_TYPE (f)) == INTEGER_TYPE) TREE_VALUE (e) = convert (TREE_TYPE (f), TREE_VALUE (e)); *************** get_objc_string_decl (ident, section) *** 1813,1819 **** else abort (); ! for (; chain != 0; chain = TREE_VALUE (chain)) if (TREE_VALUE (chain) == ident) return (TREE_PURPOSE (chain)); --- 1837,1843 ---- else abort (); ! for (; chain != 0; chain = TREE_CHAIN (chain)) if (TREE_VALUE (chain) == ident) return (TREE_PURPOSE (chain)); *************** build_selector_translation_table () *** 2003,2008 **** --- 2027,2058 ---- { tree expr; + if (warn_selector && objc_implementation_context) + { + tree method_chain; + bool found = false; + for (method_chain = meth_var_names_chain; + method_chain; + method_chain = TREE_CHAIN (method_chain)) + { + if (TREE_VALUE (method_chain) == TREE_VALUE (chain)) + { + found = true; + break; + } + } + if (!found) + { + /* Adjust line number for warning message. */ + int save_lineno = lineno; + if (flag_next_runtime && TREE_PURPOSE (chain)) + lineno = DECL_SOURCE_LINE (TREE_PURPOSE (chain)); + warning ("creating selector for non existant method %s", + IDENTIFIER_POINTER (TREE_VALUE (chain))); + lineno = save_lineno; + } + } + expr = build_selector (TREE_VALUE (chain)); if (flag_next_runtime) *************** get_proto_encoding (proto) *** 2086,2093 **** identifier_node that represent the selector. */ static tree ! build_typed_selector_reference (ident, proto) ! tree ident, proto; { tree *chain = &sel_ref_chain; tree expr; --- 2136,2143 ---- identifier_node that represent the selector. */ static tree ! build_typed_selector_reference (ident, prototype) ! tree ident, prototype; { tree *chain = &sel_ref_chain; tree expr; *************** build_typed_selector_reference (ident, p *** 2095,2108 **** while (*chain) { ! if (TREE_PURPOSE (*chain) == ident && TREE_VALUE (*chain) == proto) goto return_at_index; index++; chain = &TREE_CHAIN (*chain); } ! *chain = tree_cons (proto, ident, NULL_TREE); return_at_index: expr = build_unary_op (ADDR_EXPR, --- 2145,2158 ---- while (*chain) { ! if (TREE_PURPOSE (*chain) == prototype && TREE_VALUE (*chain) == ident) goto return_at_index; index++; chain = &TREE_CHAIN (*chain); } ! *chain = tree_cons (prototype, ident, NULL_TREE); return_at_index: expr = build_unary_op (ADDR_EXPR, *************** is_class_name (ident) *** 2370,2375 **** --- 2420,2436 ---- } tree + objc_is_id (ident) + tree ident; + { + /* NB: This function may be called before the ObjC front-end + has been initialized, in which case ID_TYPE will be NULL. */ + return (id_type && ident && TYPE_P (ident) && IS_ID (ident)) + ? id_type + : NULL_TREE; + } + + tree lookup_interface (ident) tree ident; { *************** lookup_interface (ident) *** 2383,2433 **** return NULL_TREE; } ! static tree ! objc_copy_list (list, head) ! tree list; ! tree *head; ! { ! tree newlist = NULL_TREE, tail = NULL_TREE; ! ! while (list) ! { ! tail = copy_node (list); ! ! /* The following statement fixes a bug when inheriting instance ! variables that are declared to be bitfields. finish_struct ! expects to find the width of the bitfield in DECL_INITIAL. */ ! if (DECL_BIT_FIELD (tail) && DECL_INITIAL (tail) == 0) ! DECL_INITIAL (tail) = DECL_SIZE (tail); ! ! newlist = chainon (newlist, tail); ! list = TREE_CHAIN (list); ! } ! ! *head = newlist; ! return tail; ! } ! ! /* Used by: build_private_template, get_class_ivars, and ! continue_class. COPY is 1 when called from @defs. In this case ! copy all fields. Otherwise don't copy leaf ivars since we rely on ! them being side-effected exactly once by finish_struct. */ ! static tree ! build_ivar_chain (interface, copy) tree interface; - int copy; { tree my_name, super_name, ivar_chain; my_name = CLASS_NAME (interface); super_name = CLASS_SUPER_NAME (interface); ! /* Possibly copy leaf ivars. */ ! if (copy) ! objc_copy_list (CLASS_IVARS (interface), &ivar_chain); ! else ! ivar_chain = CLASS_IVARS (interface); while (super_name) { --- 2444,2466 ---- return NULL_TREE; } ! /* Used by: build_private_template, continue_class, ! and for @defs constructs. */ ! tree ! get_class_ivars (interface) tree interface; { tree my_name, super_name, ivar_chain; my_name = CLASS_NAME (interface); super_name = CLASS_SUPER_NAME (interface); + ivar_chain = CLASS_IVARS (interface); ! /* Save off a pristine copy of the leaf ivars (i.e, those not ! inherited from a super class). */ ! if (!CLASS_OWN_IVARS (interface)) ! CLASS_OWN_IVARS (interface) = copy_list (ivar_chain); while (super_name) { *************** build_ivar_chain (interface, copy) *** 2451,2464 **** my_name = CLASS_NAME (interface); super_name = CLASS_SUPER_NAME (interface); ! op1 = CLASS_IVARS (interface); if (op1) { ! tree head, tail = objc_copy_list (op1, &head); /* Prepend super class ivars...make a copy of the list, we do not want to alter the original. */ ! TREE_CHAIN (tail) = ivar_chain; ivar_chain = head; } } --- 2484,2497 ---- my_name = CLASS_NAME (interface); super_name = CLASS_SUPER_NAME (interface); ! op1 = CLASS_OWN_IVARS (interface); if (op1) { ! tree head = copy_list (op1); /* Prepend super class ivars...make a copy of the list, we do not want to alter the original. */ ! chainon (head, ivar_chain); ivar_chain = head; } } *************** build_private_template (class) *** 2485,2491 **** { uprivate_record = start_struct (RECORD_TYPE, CLASS_NAME (class)); ! ivar_context = build_ivar_chain (class, 0); finish_struct (uprivate_record, ivar_context, NULL_TREE); --- 2518,2524 ---- { uprivate_record = start_struct (RECORD_TYPE, CLASS_NAME (class)); ! ivar_context = get_class_ivars (class); finish_struct (uprivate_record, ivar_context, NULL_TREE); *************** generate_protocol_references (plist) *** 3003,3008 **** --- 3036,3078 ---- } } + /* For each protocol which was referenced either from a @protocol() + expression, or because a class/category implements it (then a + pointer to the protocol is stored in the struct describing the + class/category), we create a statically allocated instance of the + Protocol class. The code is written in such a way as to generate + as few Protocol objects as possible; we generate a unique Protocol + instance for each protocol, and we don't generate a Protocol + instance if the protocol is never referenced (either from a + @protocol() or from a class/category implementation). These + statically allocated objects can be referred to via the static + (that is, private to this module) symbols _OBJC_PROTOCOL_n. + + The statically allocated Protocol objects that we generate here + need to be fixed up at runtime in order to be used: the 'isa' + pointer of the objects need to be set up to point to the 'Protocol' + class, as known at runtime. + + The NeXT runtime fixes up all protocols at program startup time, + before main() is entered. It uses a low-level trick to look up all + those symbols, then loops on them and fixes them up. + + The GNU runtime as well fixes up all protocols before user code + from the module is executed; it requires pointers to those symbols + to be put in the objc_symtab (which is then passed as argument to + the function __objc_exec_class() which the compiler sets up to be + executed automatically when the module is loaded); setup of those + Protocol objects happen in two ways in the GNU runtime: all + Protocol objects referred to by a class or category implementation + are fixed up when the class/category is loaded; all Protocol + objects referred to by a @protocol() expression are added by the + compiler to the list of statically allocated instances to fixup + (the same list holding the statically allocated constant string + objects). Because, as explained above, the compiler generates as + few Protocol objects as possible, some Protocol object might end up + being referenced multiple times when compiled with the GNU runtime, + and end up being fixed up multiple times at runtime inizialization. + But that doesn't hurt, it's just a little inefficient. */ static void generate_protocols () { *************** error_with_ivar (message, decl, rawdecl) *** 3464,3472 **** tree decl; tree rawdecl; { ! count_error (0); ! report_error_function (DECL_SOURCE_FILE (decl)); error_with_file_and_line (DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl), --- 3534,3542 ---- tree decl; tree rawdecl; { ! diagnostic_count_diagnostic (global_dc, DK_ERROR); ! diagnostic_report_current_function (global_dc); error_with_file_and_line (DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl), *************** error_with_ivar (message, decl, rawdecl) *** 3475,3484 **** } - #define USERTYPE(t) \ - (TREE_CODE (t) == RECORD_TYPE || TREE_CODE (t) == UNION_TYPE \ - || TREE_CODE (t) == ENUMERAL_TYPE) - static void check_ivars (inter, imp) tree inter; --- 3545,3550 ---- *************** adjust_type_for_id_default (type) *** 4508,4513 **** --- 4574,4583 ---- chain; chain = TREE_CHAIN (chain)) { + if (TYPED_OBJECT (TREE_VALUE (chain)) + && !(TREE_VALUE (type) + && TREE_CODE (TREE_VALUE (type)) == INDIRECT_REF)) + error ("can not use an object as parameter to a method\n"); if (!is_objc_type_qualifier (TREE_VALUE (chain))) return type; } *************** receiver_is_class_object (receiver) *** 4778,4789 **** the identifier of the selector of the message. This is used when printing warnings about argument mismatches. */ ! static tree building_objc_message_expr = 0; tree ! maybe_building_objc_message_expr () { ! return building_objc_message_expr; } /* Construct an expression for sending a message. --- 4848,4859 ---- the identifier of the selector of the message. This is used when printing warnings about argument mismatches. */ ! static tree current_objc_message_selector = 0; tree ! objc_message_selector () { ! return current_objc_message_selector; } /* Construct an expression for sending a message. *************** finish_message_expr (receiver, sel_name, *** 4924,4930 **** if (iface) method_prototype = lookup_instance_method_static (iface, sel_name); ! if (! method_prototype && TYPE_PROTOCOL_LIST (ctype)) method_prototype = lookup_method_in_protocol_list (TYPE_PROTOCOL_LIST (ctype), sel_name, 0); --- 4994,5000 ---- if (iface) method_prototype = lookup_instance_method_static (iface, sel_name); ! if (! method_prototype && ctype && TYPE_PROTOCOL_LIST (ctype)) method_prototype = lookup_method_in_protocol_list (TYPE_PROTOCOL_LIST (ctype), sel_name, 0); *************** finish_message_expr (receiver, sel_name, *** 5059,5065 **** } /* Save the selector name for printing error messages. */ ! building_objc_message_expr = sel_name; /* Build the parameters list for looking up the method. These are the object itself and the selector. */ --- 5129,5135 ---- } /* Save the selector name for printing error messages. */ ! current_objc_message_selector = sel_name; /* Build the parameters list for looking up the method. These are the object itself and the selector. */ *************** finish_message_expr (receiver, sel_name, *** 5073,5079 **** receiver, self_object, selector, method_params); ! building_objc_message_expr = 0; return retval; } --- 5143,5149 ---- receiver, self_object, selector, method_params); ! current_objc_message_selector = 0; return retval; } *************** build_protocol_reference (p) *** 5217,5222 **** --- 5287,5294 ---- PROTOCOL_FORWARD_DECL (p) = decl; } + /* This function is called by the parser when (and only when) a + @protocol() expression is found, in order to compile it. */ tree build_protocol_expr (protoname) tree protoname; *************** build_protocol_expr (protoname) *** 5238,5246 **** --- 5310,5365 ---- TREE_TYPE (expr) = protocol_type; + /* The @protocol() expression is being compiled into a pointer to a + statically allocated instance of the Protocol class. To become + usable at runtime, the 'isa' pointer of the instance need to be + fixed up at runtime by the runtime library, to point to the + actual 'Protocol' class. */ + + /* For the GNU runtime, put the static Protocol instance in the list + of statically allocated instances, so that we make sure that its + 'isa' pointer is fixed up at runtime by the GNU runtime library + to point to the Protocol class (at runtime, when loading the + module, the GNU runtime library loops on the statically allocated + instances (as found in the defs field in objc_symtab) and fixups + all the 'isa' pointers of those objects). */ + if (! flag_next_runtime) + { + /* This type is a struct containing the fields of a Protocol + object. (Cfr. protocol_type instead is the type of a pointer + to such a struct). */ + tree protocol_struct_type = xref_tag + (RECORD_TYPE, get_identifier (PROTOCOL_OBJECT_CLASS_NAME)); + tree *chain; + + /* Look for the list of Protocol statically allocated instances + to fixup at runtime. Create a new list to hold Protocol + statically allocated instances, if the list is not found. At + present there is only another list, holding NSConstantString + static instances to be fixed up at runtime. */ + for (chain = &objc_static_instances; + *chain && TREE_VALUE (*chain) != protocol_struct_type; + chain = &TREE_CHAIN (*chain)); + if (!*chain) + { + *chain = tree_cons (NULL_TREE, protocol_struct_type, NULL_TREE); + add_objc_string (TYPE_NAME (protocol_struct_type), + class_names); + } + + /* Add this statically allocated instance to the Protocol list. */ + TREE_PURPOSE (*chain) = tree_cons (NULL_TREE, + PROTOCOL_FORWARD_DECL (p), + TREE_PURPOSE (*chain)); + } + + return expr; } + /* This function is called by the parser when a @selector() expression + is found, in order to compile it. It is only called by the parser + and only to compile a @selector(). */ tree build_selector_expr (selnamelist) tree selnamelist; *************** build_selector_expr (selnamelist) *** 5256,5261 **** --- 5375,5406 ---- else abort (); + /* If we are required to check @selector() expressions as they + are found, check that the selector has been declared. */ + if (warn_undeclared_selector) + { + /* Look the selector up in the list of all known class and + instance methods (up to this line) to check that the selector + exists. */ + hash hsh; + + /* First try with instance methods. */ + hsh = hash_lookup (nst_method_hash_list, selname); + + /* If not found, try with class methods. */ + if (!hsh) + { + hsh = hash_lookup (cls_method_hash_list, selname); + } + + /* If still not found, print out a warning. */ + if (!hsh) + { + warning ("undeclared selector `%s'", IDENTIFIER_POINTER (selname)); + } + } + + if (flag_typed_selectors) return build_typed_selector_reference (selname, 0); else *************** hash_func (sel_name) *** 5321,5328 **** static void hash_init () { ! nst_method_hash_list = (hash *) xcalloc (SIZEHASHTABLE, sizeof (hash)); ! cls_method_hash_list = (hash *) xcalloc (SIZEHASHTABLE, sizeof (hash)); } /* WARNING!!!! hash_enter is called with a method, and will peek --- 5466,5473 ---- static void hash_init () { ! nst_method_hash_list = (hash *) ggc_calloc (SIZEHASHTABLE, sizeof (hash)); ! cls_method_hash_list = (hash *) ggc_calloc (SIZEHASHTABLE, sizeof (hash)); } /* WARNING!!!! hash_enter is called with a method, and will peek *************** hash_enter (hashlist, method) *** 5335,5352 **** hash *hashlist; tree method; { - static hash hash_alloc_list = 0; - static int hash_alloc_index = 0; hash obj; int slot = hash_func (METHOD_SEL_NAME (method)) % SIZEHASHTABLE; ! if (! hash_alloc_list || hash_alloc_index >= HASH_ALLOC_LIST_SIZE) ! { ! hash_alloc_index = 0; ! hash_alloc_list = (hash) xmalloc (sizeof (struct hashed_entry) ! * HASH_ALLOC_LIST_SIZE); ! } ! obj = &hash_alloc_list[hash_alloc_index++]; obj->list = 0; obj->next = hashlist[slot]; obj->key = method; --- 5480,5489 ---- hash *hashlist; tree method; { hash obj; int slot = hash_func (METHOD_SEL_NAME (method)) % SIZEHASHTABLE; ! obj = (hash) ggc_alloc (sizeof (struct hashed_entry)); obj->list = 0; obj->next = hashlist[slot]; obj->key = method; *************** hash_add_attr (entry, value) *** 5378,5394 **** hash entry; tree value; { - static attr attr_alloc_list = 0; - static int attr_alloc_index = 0; attr obj; ! if (! attr_alloc_list || attr_alloc_index >= ATTR_ALLOC_LIST_SIZE) ! { ! attr_alloc_index = 0; ! attr_alloc_list = (attr) xmalloc (sizeof (struct hashed_attribute) ! * ATTR_ALLOC_LIST_SIZE); ! } ! obj = &attr_alloc_list[attr_alloc_index++]; obj->next = entry->list; obj->value = value; --- 5515,5523 ---- hash entry; tree value; { attr obj; ! obj = (attr) ggc_alloc (sizeof (struct hashed_attribute)); obj->next = entry->list; obj->value = value; *************** lookup_method (mchain, method) *** 5411,5416 **** --- 5540,5546 ---- { if (METHOD_SEL_NAME (mchain) == key) return mchain; + mchain = TREE_CHAIN (mchain); } return NULL_TREE; *************** is_public (expr, identifier) *** 5782,5799 **** return 1; } - - /* Implement @defs () within struct bodies. */ - - tree - get_class_ivars (interface) - tree interface; - { - /* Make sure we copy the leaf ivars in case @defs is used in a local - context. Otherwise finish_struct will overwrite the layout info - using temporary storage. */ - return build_ivar_chain (interface, 1); - } /* Make sure all entries in CHAIN are also in LIST. */ --- 5912,5917 ---- *************** check_protocol (p, type, name) *** 5940,5946 **** int f1, f2; /* Ensure that all protocols have bodies! */ ! if (flag_warn_protocol) { f1 = check_methods (PROTOCOL_CLS_METHODS (p), CLASS_CLS_METHODS (objc_implementation_context), --- 6058,6064 ---- int f1, f2; /* Ensure that all protocols have bodies! */ ! if (warn_protocol) { f1 = check_methods (PROTOCOL_CLS_METHODS (p), CLASS_CLS_METHODS (objc_implementation_context), *************** start_class (code, class_name, super_nam *** 6025,6031 **** } class = make_node (code); ! TYPE_BINFO (class) = make_tree_vec (5); CLASS_NAME (class) = class_name; CLASS_SUPER_NAME (class) = super_name; --- 6143,6149 ---- } class = make_node (code); ! TYPE_BINFO (class) = make_tree_vec (6); CLASS_NAME (class) = class_name; CLASS_SUPER_NAME (class) = super_name; *************** continue_class (class) *** 6189,6195 **** if (!objc_class_template) build_class_template (); ! imp_entry = (struct imp_entry *) xmalloc (sizeof (struct imp_entry)); imp_entry->next = imp_list; imp_entry->imp_context = class; --- 6307,6313 ---- if (!objc_class_template) build_class_template (); ! imp_entry = (struct imp_entry *) ggc_alloc (sizeof (struct imp_entry)); imp_entry->next = imp_list; imp_entry->imp_context = class; *************** continue_class (class) *** 6215,6221 **** if (!TYPE_FIELDS (record)) { ! finish_struct (record, build_ivar_chain (class, 0), NULL_TREE); CLASS_STATIC_TEMPLATE (class) = record; /* Mark this record as a class template for static typing. */ --- 6333,6339 ---- if (!TYPE_FIELDS (record)) { ! finish_struct (record, get_class_ivars (class), NULL_TREE); CLASS_STATIC_TEMPLATE (class) = record; /* Mark this record as a class template for static typing. */ *************** encode_type (type, curtype, format) *** 6766,6772 **** } static void ! encode_complete_bitfield (int position, tree type, int size) { enum tree_code code = TREE_CODE (type); char buffer[40]; --- 6884,6893 ---- } static void ! encode_complete_bitfield (position, type, size) ! int position; ! tree type; ! int size; { enum tree_code code = TREE_CODE (type); char buffer[40]; *************** encode_field_decl (field_decl, curtype, *** 6836,6849 **** the bitfield typing information. */ if (flag_next_runtime) { ! if (DECL_BIT_FIELD (field_decl)) encode_bitfield (tree_low_cst (DECL_SIZE (field_decl), 1)); else encode_type (TREE_TYPE (field_decl), curtype, format); } else { ! if (DECL_BIT_FIELD (field_decl)) encode_complete_bitfield (int_bit_position (field_decl), DECL_BIT_FIELD_TYPE (field_decl), tree_low_cst (DECL_SIZE (field_decl), 1)); --- 6957,6970 ---- the bitfield typing information. */ if (flag_next_runtime) { ! if (DECL_BIT_FIELD_TYPE (field_decl)) encode_bitfield (tree_low_cst (DECL_SIZE (field_decl), 1)); else encode_type (TREE_TYPE (field_decl), curtype, format); } else { ! if (DECL_BIT_FIELD_TYPE (field_decl)) encode_complete_bitfield (int_bit_position (field_decl), DECL_BIT_FIELD_TYPE (field_decl), tree_low_cst (DECL_SIZE (field_decl), 1)); *************** warn_with_method (message, mtype, method *** 6959,6968 **** int mtype; tree method; { ! if (count_error (1) == 0) return; ! report_error_function (DECL_SOURCE_FILE (method)); /* Add a readable method name to the warning. */ warning_with_file_and_line (DECL_SOURCE_FILE (method), --- 7080,7089 ---- int mtype; tree method; { ! if (!diagnostic_count_diagnostic (global_dc, DK_WARNING)) return; ! diagnostic_report_current_function (global_dc); /* Add a readable method name to the warning. */ warning_with_file_and_line (DECL_SOURCE_FILE (method), *************** get_super_receiver () *** 7203,7211 **** { super_class = get_class_reference (super_name); if (TREE_CODE (objc_method_context) == CLASS_METHOD_DECL) super_class ! = build_component_ref (build_indirect_ref (super_class, "->"), ! get_identifier ("isa")); } else { --- 7324,7336 ---- { super_class = get_class_reference (super_name); if (TREE_CODE (objc_method_context) == CLASS_METHOD_DECL) + /* Cast the super class to 'id', since the user may not have + included , leaving 'struct objc_class' + an incomplete type. */ super_class ! = build_component_ref (build_indirect_ref ! (build_c_cast (id_type, super_class), "->"), ! get_identifier ("isa")); } else { *************** gen_method_decl (method, buf) *** 7963,7974 **** /* Debug info. */ static void dump_interface (fp, chain) FILE *fp; tree chain; { ! char *buf = (char *) xmalloc (256); const char *my_name = IDENTIFIER_POINTER (CLASS_NAME (chain)); tree ivar_decls = CLASS_RAW_IVARS (chain); tree nst_methods = CLASS_NST_METHODS (chain); --- 8088,8108 ---- /* Debug info. */ + + /* Dump an @interface declaration of the supplied class CHAIN to the + supplied file FP. Used to implement the -gen-decls option (which + prints out an @interface declaration of all classes compiled in + this run); potentially useful for debugging the compiler too. */ static void dump_interface (fp, chain) FILE *fp; tree chain; { ! /* FIXME: A heap overflow here whenever a method (or ivar) ! declaration is so long that it doesn't fit in the buffer. The ! code and all the related functions should be rewritten to avoid ! using fixed size buffers. */ ! char *buf = (char *) xmalloc (1024 * 10); const char *my_name = IDENTIFIER_POINTER (CLASS_NAME (chain)); tree ivar_decls = CLASS_RAW_IVARS (chain); tree nst_methods = CLASS_NST_METHODS (chain); *************** dump_interface (fp, chain) *** 7976,7989 **** fprintf (fp, "\n@interface %s", my_name); if (CLASS_SUPER_NAME (chain)) { ! const char *super_name = IDENTIFIER_POINTER (CLASS_SUPER_NAME (chain)); ! fprintf (fp, " : %s\n", super_name); } else fprintf (fp, "\n"); if (ivar_decls) { fprintf (fp, "{\n"); --- 8110,8135 ---- fprintf (fp, "\n@interface %s", my_name); + /* CLASS_SUPER_NAME is used to store the superclass name for + classes, and the category name for categories. */ if (CLASS_SUPER_NAME (chain)) { ! const char *name = IDENTIFIER_POINTER (CLASS_SUPER_NAME (chain)); ! ! if (TREE_CODE (chain) == CATEGORY_IMPLEMENTATION_TYPE ! || TREE_CODE (chain) == CATEGORY_INTERFACE_TYPE) ! { ! fprintf (fp, " (%s)\n", name); ! } ! else ! { ! fprintf (fp, " : %s\n", name); ! } } else fprintf (fp, "\n"); + /* FIXME - the following doesn't seem to work at the moment. */ if (ivar_decls) { fprintf (fp, "{\n"); *************** dump_interface (fp, chain) *** 8007,8013 **** fprintf (fp, "+ %s;\n", gen_method_decl (cls_methods, buf)); cls_methods = TREE_CHAIN (cls_methods); } ! fprintf (fp, "\n@end"); } /* Demangle function for Objective-C */ --- 8153,8160 ---- fprintf (fp, "+ %s;\n", gen_method_decl (cls_methods, buf)); cls_methods = TREE_CHAIN (cls_methods); } ! ! fprintf (fp, "@end\n"); } /* Demangle function for Objective-C */ *************** objc_demangle (mangled) *** 8067,8073 **** return mangled; /* not an objc mangled name */ } ! static const char * objc_printable_name (decl, kind) tree decl; int kind ATTRIBUTE_UNUSED; --- 8214,8220 ---- return mangled; /* not an objc mangled name */ } ! const char * objc_printable_name (decl, kind) tree decl; int kind ATTRIBUTE_UNUSED; *************** objc_printable_name (decl, kind) *** 8075,8096 **** return objc_demangle (IDENTIFIER_POINTER (DECL_NAME (decl))); } - /* Adds the tree codes specific to the ObjC/ObjC++ front end to the - list of all tree codes. */ - - static void - add_objc_tree_codes () - { - int add = (int) LAST_OBJC_TREE_CODE - (int) LAST_BASE_TREE_CODE; - - memcpy (tree_code_type + (int) LAST_BASE_TREE_CODE, - objc_tree_code_type, add); - memcpy (tree_code_length + (int) LAST_BASE_TREE_CODE, - objc_tree_code_length, add * sizeof (int)); - memcpy (tree_code_name + (int) LAST_BASE_TREE_CODE, - objc_tree_code_name, add * sizeof (char *)); - } - static void init_objc () { --- 8222,8227 ---- *************** finish_objc () *** 8143,8149 **** UOBJC_CLASS_decl = impent->class_decl; UOBJC_METACLASS_decl = impent->meta_decl; ! if (TREE_CODE (objc_implementation_context) == CLASS_IMPLEMENTATION_TYPE) { /* all of the following reference the string pool... */ --- 8274,8289 ---- UOBJC_CLASS_decl = impent->class_decl; UOBJC_METACLASS_decl = impent->meta_decl; ! ! /* Dump the @interface of each class as we compile it, if the ! -gen-decls option is in use. TODO: Dump the classes in the ! order they were found, rather than in reverse order as we ! are doing now. */ ! if (flag_gen_declaration) ! { ! dump_interface (gen_declaration_file, objc_implementation_context); ! } ! if (TREE_CODE (objc_implementation_context) == CLASS_IMPLEMENTATION_TYPE) { /* all of the following reference the string pool... */ *************** finish_objc () *** 8194,8205 **** generate_strings (); - if (flag_gen_declaration) - { - add_class (objc_implementation_context); - dump_interface (gen_declaration_file, objc_implementation_context); - } - if (warn_selector) { int slot; --- 8334,8339 ---- *************** handle_impent (impent) *** 8364,8370 **** tree decl, init; init = build_int_2 (0, 0); ! TREE_TYPE (init) = type_for_size (BITS_PER_WORD, 1); decl = build_decl (VAR_DECL, get_identifier (string), TREE_TYPE (init)); TREE_PUBLIC (decl) = 1; TREE_READONLY (decl) = 1; --- 8498,8504 ---- tree decl, init; init = build_int_2 (0, 0); ! TREE_TYPE (init) = c_common_type_for_size (BITS_PER_WORD, 1); decl = build_decl (VAR_DECL, get_identifier (string), TREE_TYPE (init)); TREE_PUBLIC (decl) = 1; TREE_READONLY (decl) = 1; *************** handle_impent (impent) *** 8377,8427 **** } } - static void - ggc_mark_imp_list (arg) - void *arg; - { - struct imp_entry *impent; - - for (impent = *(struct imp_entry **)arg; impent; impent = impent->next) - { - ggc_mark_tree (impent->imp_context); - ggc_mark_tree (impent->imp_template); - ggc_mark_tree (impent->class_decl); - ggc_mark_tree (impent->meta_decl); - } - } - - static void - ggc_mark_hash_table (arg) - void *arg; - { - hash *hash_table = *(hash **)arg; - hash hst; - attr list; - int i; - - if (hash_table == NULL) - return; - for (i = 0; i < SIZEHASHTABLE; i++) - for (hst = hash_table [i]; hst; hst = hst->next) - { - ggc_mark_tree (hst->key); - for (list = hst->list; list; list = list->next) - ggc_mark_tree (list->value); - } - } - - /* Add GC roots for variables local to this file. */ - static void - objc_act_parse_init () - { - ggc_add_tree_root (objc_global_trees, OCTI_MAX); - ggc_add_root (&imp_list, 1, sizeof imp_list, ggc_mark_imp_list); - ggc_add_root (&nst_method_hash_list, 1, sizeof nst_method_hash_list, ggc_mark_hash_table); - ggc_add_root (&cls_method_hash_list, 1, sizeof cls_method_hash_list, ggc_mark_hash_table); - } - /* Look up ID as an instance variable. */ tree lookup_objc_ivar (id) --- 8511,8516 ---- *************** lookup_objc_ivar (id) *** 8429,8436 **** { tree decl; ! if (objc_receiver_context && !strcmp (IDENTIFIER_POINTER (id), "super")) ! /* we have a message to super */ return get_super_receiver (); else if (objc_method_context && (decl = is_ivar (objc_ivar_chain, id))) { --- 8518,8525 ---- { tree decl; ! if (objc_method_context && !strcmp (IDENTIFIER_POINTER (id), "super")) ! /* We have a message to super. */ return get_super_receiver (); else if (objc_method_context && (decl = is_ivar (objc_ivar_chain, id))) { *************** lookup_objc_ivar (id) *** 8442,8444 **** --- 8531,8535 ---- else return 0; } + + #include "gtype-objc.h" diff -Nrc3pad gcc-3.2.3/gcc/objc/objc-act.h gcc-3.3/gcc/objc/objc-act.h *** gcc-3.2.3/gcc/objc/objc-act.h 2001-12-04 00:25:20.000000000 +0000 --- gcc-3.3/gcc/objc/objc-act.h 2002-08-20 01:27:38.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 24,30 **** /*** Public Interface (procedures) ***/ const char *objc_init PARAMS ((const char *)); ! int objc_decode_option PARAMS ((int, char **)); /* used by yyparse */ --- 24,30 ---- /*** Public Interface (procedures) ***/ const char *objc_init PARAMS ((const char *)); ! const char *objc_printable_name PARAMS ((tree, int)); /* used by yyparse */ *************** void objc_declare_alias PARAMS ((tree *** 63,70 **** void objc_declare_class PARAMS ((tree)); void objc_declare_protocols PARAMS ((tree)); - extern int objc_receiver_context; - /* the following routines are used to implement statically typed objects */ int objc_comptypes PARAMS ((tree, tree, int)); --- 63,68 ---- *************** tree build_encode_expr PARAMS ((tree) *** 99,104 **** --- 97,103 ---- #define CLASS_STATIC_TEMPLATE(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 2) #define CLASS_CATEGORY_LIST(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 3) #define CLASS_PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 4) + #define CLASS_OWN_IVARS(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 5) #define PROTOCOL_NAME(CLASS) ((CLASS)->type.name) #define PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 0) #define PROTOCOL_NST_METHODS(CLASS) ((CLASS)->type.minval) *************** enum objc_tree_code { *** 132,159 **** typedef struct hashed_entry *hash; typedef struct hashed_attribute *attr; ! struct hashed_attribute { attr next; tree value; }; ! struct hashed_entry { attr list; hash next; tree key; }; ! extern hash *nst_method_hash_list; ! extern hash *cls_method_hash_list; - #define HASH_ALLOC_LIST_SIZE 170 - #define ATTR_ALLOC_LIST_SIZE 170 #define SIZEHASHTABLE 257 /* Objective-C/Objective-C++ @implementation list. */ ! struct imp_entry { struct imp_entry *next; tree imp_context; --- 131,156 ---- typedef struct hashed_entry *hash; typedef struct hashed_attribute *attr; ! struct hashed_attribute GTY(()) { attr next; tree value; }; ! struct hashed_entry GTY(()) { attr list; hash next; tree key; }; ! extern GTY ((length ("SIZEHASHTABLE"))) hash *nst_method_hash_list; ! extern GTY ((length ("SIZEHASHTABLE"))) hash *cls_method_hash_list; #define SIZEHASHTABLE 257 /* Objective-C/Objective-C++ @implementation list. */ ! struct imp_entry GTY(()) { struct imp_entry *next; tree imp_context; *************** struct imp_entry *** 162,168 **** tree meta_decl; /* _OBJC_METACLASS_; */ }; ! extern struct imp_entry *imp_list; extern int imp_count; /* `@implementation' */ extern int cat_count; /* `@category' */ --- 159,165 ---- tree meta_decl; /* _OBJC_METACLASS_; */ }; ! extern GTY(()) struct imp_entry *imp_list; extern int imp_count; /* `@implementation' */ extern int cat_count; /* `@category' */ *************** enum objc_tree_index *** 247,253 **** OCTI_MAX }; ! extern tree objc_global_trees[OCTI_MAX]; /* List of classes with list of their static instances. */ #define objc_static_instances objc_global_trees[OCTI_STATIC_NST] --- 244,250 ---- OCTI_MAX }; ! extern GTY(()) tree objc_global_trees[OCTI_MAX]; /* List of classes with list of their static instances. */ #define objc_static_instances objc_global_trees[OCTI_STATIC_NST] diff -Nrc3pad gcc-3.2.3/gcc/objc/objc-lang.c gcc-3.3/gcc/objc/objc-lang.c *** gcc-3.2.3/gcc/objc/objc-lang.c 2002-06-06 08:46:05.000000000 +0000 --- gcc-3.3/gcc/objc/objc-lang.c 2002-08-10 02:18:28.000000000 +0000 *************** static void objc_init_options *** 40,58 **** #undef LANG_HOOKS_INIT_OPTIONS #define LANG_HOOKS_INIT_OPTIONS objc_init_options #undef LANG_HOOKS_DECODE_OPTION ! #define LANG_HOOKS_DECODE_OPTION objc_decode_option #undef LANG_HOOKS_POST_OPTIONS #define LANG_HOOKS_POST_OPTIONS c_common_post_options #undef LANG_HOOKS_GET_ALIAS_SET #define LANG_HOOKS_GET_ALIAS_SET c_common_get_alias_set #undef LANG_HOOKS_SAFE_FROM_P #define LANG_HOOKS_SAFE_FROM_P c_safe_from_p #undef LANG_HOOKS_STATICP #define LANG_HOOKS_STATICP c_staticp #undef LANG_HOOKS_PRINT_IDENTIFIER #define LANG_HOOKS_PRINT_IDENTIFIER c_print_identifier ! #undef LANG_HOOKS_SET_YYDEBUG ! #define LANG_HOOKS_SET_YYDEBUG c_set_yydebug /* Inlining hooks same as the C front end. */ #undef LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN #define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \ --- 40,88 ---- #undef LANG_HOOKS_INIT_OPTIONS #define LANG_HOOKS_INIT_OPTIONS objc_init_options #undef LANG_HOOKS_DECODE_OPTION ! #define LANG_HOOKS_DECODE_OPTION c_common_decode_option #undef LANG_HOOKS_POST_OPTIONS #define LANG_HOOKS_POST_OPTIONS c_common_post_options #undef LANG_HOOKS_GET_ALIAS_SET #define LANG_HOOKS_GET_ALIAS_SET c_common_get_alias_set #undef LANG_HOOKS_SAFE_FROM_P #define LANG_HOOKS_SAFE_FROM_P c_safe_from_p + #undef LANG_HOOKS_PARSE_FILE + #define LANG_HOOKS_PARSE_FILE c_common_parse_file + #undef LANG_HOOKS_EXPAND_EXPR + #define LANG_HOOKS_EXPAND_EXPR c_expand_expr + #undef LANG_HOOKS_MARK_ADDRESSABLE + #define LANG_HOOKS_MARK_ADDRESSABLE c_mark_addressable + #undef LANG_HOOKS_TRUTHVALUE_CONVERSION + #define LANG_HOOKS_TRUTHVALUE_CONVERSION c_common_truthvalue_conversion + #undef LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES + #define LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES c_insert_default_attributes + #undef LANG_HOOKS_FINISH_INCOMPLETE_DECL + #define LANG_HOOKS_FINISH_INCOMPLETE_DECL c_finish_incomplete_decl + #undef LANG_HOOKS_UNSAFE_FOR_REEVAL + #define LANG_HOOKS_UNSAFE_FOR_REEVAL c_common_unsafe_for_reeval #undef LANG_HOOKS_STATICP #define LANG_HOOKS_STATICP c_staticp + #undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL + #define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL c_dup_lang_specific_decl #undef LANG_HOOKS_PRINT_IDENTIFIER #define LANG_HOOKS_PRINT_IDENTIFIER c_print_identifier ! #undef LANG_HOOKS_DECL_PRINTABLE_NAME ! #define LANG_HOOKS_DECL_PRINTABLE_NAME objc_printable_name ! #undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL ! #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL c_warn_unused_global_decl ! ! #undef LANG_HOOKS_FUNCTION_ENTER_NESTED ! #define LANG_HOOKS_FUNCTION_ENTER_NESTED c_push_function_context ! #undef LANG_HOOKS_FUNCTION_LEAVE_NESTED ! #define LANG_HOOKS_FUNCTION_LEAVE_NESTED c_pop_function_context ! ! /* Attribute hooks. */ ! #undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE ! #define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE c_common_attribute_table ! #undef LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE ! #define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE c_common_format_attribute_table ! /* Inlining hooks same as the C front end. */ #undef LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN #define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \ *************** static void objc_init_options *** 67,77 **** #define LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING \ c_convert_parm_for_inlining /* Each front end provides its own hooks, for toplev.c. */ const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; static void objc_init_options () { ! c_common_init_options (clk_objective_c); ! } --- 97,167 ---- #define LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING \ c_convert_parm_for_inlining + #undef LANG_HOOKS_TYPE_FOR_MODE + #define LANG_HOOKS_TYPE_FOR_MODE c_common_type_for_mode + #undef LANG_HOOKS_TYPE_FOR_SIZE + #define LANG_HOOKS_TYPE_FOR_SIZE c_common_type_for_size + #undef LANG_HOOKS_SIGNED_TYPE + #define LANG_HOOKS_SIGNED_TYPE c_common_signed_type + #undef LANG_HOOKS_UNSIGNED_TYPE + #define LANG_HOOKS_UNSIGNED_TYPE c_common_unsigned_type + #undef LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE + #define LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE c_common_signed_or_unsigned_type + #undef LANG_HOOKS_INCOMPLETE_TYPE_ERROR + #define LANG_HOOKS_INCOMPLETE_TYPE_ERROR c_incomplete_type_error + #undef LANG_HOOKS_TYPE_PROMOTES_TO + #define LANG_HOOKS_TYPE_PROMOTES_TO c_type_promotes_to + /* Each front end provides its own hooks, for toplev.c. */ const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; + /* Define the special tree codes that we use. */ + + /* Table indexed by tree code giving a string containing a character + classifying the tree code. */ + + #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE, + + const char tree_code_type[] = { + #include "tree.def" + 'x', + #include "c-common.def" + 'x', + #include "objc-tree.def" + }; + #undef DEFTREECODE + + /* Table indexed by tree code giving number of expression + operands beyond the fixed part of the node structure. + Not used for types or decls. */ + + #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH, + + const unsigned char tree_code_length[] = { + #include "tree.def" + 0, + #include "c-common.def" + 0, + #include "objc-tree.def" + }; + #undef DEFTREECODE + + /* Names of tree components. + Used for printing out the tree and error messages. */ + #define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME, + + const char * const tree_code_name[] = { + #include "tree.def" + "@@dummy", + #include "c-common.def" + "@@dummy", + #include "objc-tree.def" + }; + #undef DEFTREECODE + static void objc_init_options () { ! flag_objc = 1; ! c_common_init_options (clk_c); ! } diff -Nrc3pad gcc-3.2.3/gcc/objc/objc-parse.c gcc-3.3/gcc/objc/objc-parse.c *** gcc-3.2.3/gcc/objc/objc-parse.c 2003-04-22 08:19:12.000000000 +0000 --- gcc-3.3/gcc/objc/objc-parse.c 2003-05-14 01:01:42.000000000 +0000 *************** *** 1,197 **** ! /* A Bison parser, made by GNU Bison 1.875. */ ! ! /* Skeleton parser for Yacc-like parsing with Bison, ! Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 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. ! ! 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., 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! ! /* As a special exception, when this file is copied by Bison into a ! Bison output file, you may use that output file without restriction. ! This special exception was added by the Free Software Foundation ! in version 1.24 of Bison. */ ! ! /* Written by Richard Stallman by simplifying the original so called ! ``semantic'' parser. */ ! ! /* All symbols defined below should begin with yy or YY, to avoid ! infringing on user name space. This should be done even for local ! variables, as they might otherwise be expanded by user macros. ! There are some unavoidable exceptions within include files to ! define necessary library symbols; they are noted "INFRINGES ON ! USER NAME SPACE" below. */ ! ! /* Identify Bison output. */ ! #define YYBISON 1 ! ! /* Skeleton name. */ ! #define YYSKELETON_NAME "yacc.c" ! ! /* Pure parsers. */ ! #define YYPURE 0 ! ! /* Using locations. */ ! #define YYLSP_NEEDED 0 ! ! ! ! /* Tokens. */ ! #ifndef YYTOKENTYPE ! # define YYTOKENTYPE ! /* Put the tokens into the symbol table, so that GDB and other debuggers ! know about them. */ ! enum yytokentype { ! IDENTIFIER = 258, ! TYPENAME = 259, ! SCSPEC = 260, ! TYPESPEC = 261, ! TYPE_QUAL = 262, ! CONSTANT = 263, ! STRING = 264, ! ELLIPSIS = 265, ! SIZEOF = 266, ! ENUM = 267, ! STRUCT = 268, ! UNION = 269, ! IF = 270, ! ELSE = 271, ! WHILE = 272, ! DO = 273, ! FOR = 274, ! SWITCH = 275, ! CASE = 276, ! DEFAULT = 277, ! BREAK = 278, ! CONTINUE = 279, ! RETURN = 280, ! GOTO = 281, ! ASM_KEYWORD = 282, ! TYPEOF = 283, ! ALIGNOF = 284, ! ATTRIBUTE = 285, ! EXTENSION = 286, ! LABEL = 287, ! REALPART = 288, ! IMAGPART = 289, ! VA_ARG = 290, ! CHOOSE_EXPR = 291, ! TYPES_COMPATIBLE_P = 292, ! PTR_VALUE = 293, ! PTR_BASE = 294, ! PTR_EXTENT = 295, ! STRING_FUNC_NAME = 296, ! VAR_FUNC_NAME = 297, ! ASSIGN = 298, ! OROR = 299, ! ANDAND = 300, ! EQCOMPARE = 301, ! ARITHCOMPARE = 302, ! RSHIFT = 303, ! LSHIFT = 304, ! MINUSMINUS = 305, ! PLUSPLUS = 306, ! UNARY = 307, ! HYPERUNARY = 308, ! POINTSAT = 309, ! INTERFACE = 310, ! IMPLEMENTATION = 311, ! END = 312, ! SELECTOR = 313, ! DEFS = 314, ! ENCODE = 315, ! CLASSNAME = 316, ! PUBLIC = 317, ! PRIVATE = 318, ! PROTECTED = 319, ! PROTOCOL = 320, ! OBJECTNAME = 321, ! CLASS = 322, ! ALIAS = 323 ! }; ! #endif ! #define IDENTIFIER 258 ! #define TYPENAME 259 ! #define SCSPEC 260 ! #define TYPESPEC 261 ! #define TYPE_QUAL 262 ! #define CONSTANT 263 ! #define STRING 264 ! #define ELLIPSIS 265 ! #define SIZEOF 266 ! #define ENUM 267 ! #define STRUCT 268 ! #define UNION 269 ! #define IF 270 ! #define ELSE 271 ! #define WHILE 272 ! #define DO 273 ! #define FOR 274 ! #define SWITCH 275 ! #define CASE 276 ! #define DEFAULT 277 ! #define BREAK 278 ! #define CONTINUE 279 ! #define RETURN 280 ! #define GOTO 281 ! #define ASM_KEYWORD 282 ! #define TYPEOF 283 ! #define ALIGNOF 284 ! #define ATTRIBUTE 285 ! #define EXTENSION 286 ! #define LABEL 287 ! #define REALPART 288 ! #define IMAGPART 289 ! #define VA_ARG 290 ! #define CHOOSE_EXPR 291 ! #define TYPES_COMPATIBLE_P 292 ! #define PTR_VALUE 293 ! #define PTR_BASE 294 ! #define PTR_EXTENT 295 ! #define STRING_FUNC_NAME 296 ! #define VAR_FUNC_NAME 297 ! #define ASSIGN 298 ! #define OROR 299 ! #define ANDAND 300 ! #define EQCOMPARE 301 ! #define ARITHCOMPARE 302 ! #define RSHIFT 303 ! #define LSHIFT 304 ! #define MINUSMINUS 305 ! #define PLUSPLUS 306 ! #define UNARY 307 ! #define HYPERUNARY 308 ! #define POINTSAT 309 ! #define INTERFACE 310 ! #define IMPLEMENTATION 311 ! #define END 312 ! #define SELECTOR 313 ! #define DEFS 314 ! #define ENCODE 315 ! #define CLASSNAME 316 ! #define PUBLIC 317 ! #define PRIVATE 318 ! #define PROTECTED 319 ! #define PROTOCOL 320 ! #define OBJECTNAME 321 ! #define CLASS 322 ! #define ALIAS 323 ! - /* Copy the first part of user declarations. */ #line 33 "objc-parse.y" #include "config.h" --- 1,76 ---- ! /* A Bison parser, made from objc-parse.y ! by GNU bison 1.35. */ + #define YYBISON 1 /* Identify Bison output. */ + # define IDENTIFIER 257 + # define TYPENAME 258 + # define SCSPEC 259 + # define STATIC 260 + # define TYPESPEC 261 + # define TYPE_QUAL 262 + # define CONSTANT 263 + # define STRING 264 + # define ELLIPSIS 265 + # define SIZEOF 266 + # define ENUM 267 + # define STRUCT 268 + # define UNION 269 + # define IF 270 + # define ELSE 271 + # define WHILE 272 + # define DO 273 + # define FOR 274 + # define SWITCH 275 + # define CASE 276 + # define DEFAULT 277 + # define BREAK 278 + # define CONTINUE 279 + # define RETURN 280 + # define GOTO 281 + # define ASM_KEYWORD 282 + # define TYPEOF 283 + # define ALIGNOF 284 + # define ATTRIBUTE 285 + # define EXTENSION 286 + # define LABEL 287 + # define REALPART 288 + # define IMAGPART 289 + # define VA_ARG 290 + # define CHOOSE_EXPR 291 + # define TYPES_COMPATIBLE_P 292 + # define PTR_VALUE 293 + # define PTR_BASE 294 + # define PTR_EXTENT 295 + # define STRING_FUNC_NAME 296 + # define VAR_FUNC_NAME 297 + # define ASSIGN 298 + # define OROR 299 + # define ANDAND 300 + # define EQCOMPARE 301 + # define ARITHCOMPARE 302 + # define LSHIFT 303 + # define RSHIFT 304 + # define UNARY 305 + # define PLUSPLUS 306 + # define MINUSMINUS 307 + # define HYPERUNARY 308 + # define POINTSAT 309 + # define INTERFACE 310 + # define IMPLEMENTATION 311 + # define END 312 + # define SELECTOR 313 + # define DEFS 314 + # define ENCODE 315 + # define CLASSNAME 316 + # define PUBLIC 317 + # define PRIVATE 318 + # define PROTECTED 319 + # define PROTOCOL 320 + # define OBJECTNAME 321 + # define CLASS 322 + # define ALIAS 323 #line 33 "objc-parse.y" #include "config.h" *************** *** 201,214 **** #include "cpplib.h" #include "intl.h" #include "timevar.h" ! #include "c-lex.h" #include "c-tree.h" - #include "c-pragma.h" #include "flags.h" #include "output.h" #include "toplev.h" #include "ggc.h" ! #ifdef MULTIBYTE_CHARS #include #endif --- 80,92 ---- #include "cpplib.h" #include "intl.h" #include "timevar.h" ! #include "c-pragma.h" /* For YYDEBUG definition, and parse_in. */ #include "c-tree.h" #include "flags.h" #include "output.h" #include "toplev.h" #include "ggc.h" ! #ifdef MULTIBYTE_CHARS #include #endif *************** *** 218,281 **** /* Like YYERROR but do call yyerror. */ #define YYERROR1 { yyerror ("syntax error"); YYERROR; } ! /* Cause the "yydebug" variable to be defined. */ ! #define YYDEBUG 1 ! ! /* Rename the "yyparse" function so that we can override it elsewhere. */ ! #define yyparse yyparse_1 ! /* 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 ! #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) ! #line 67 "objc-parse.y" ! typedef union YYSTYPE {long itype; tree ttype; enum tree_code code; ! const char *filename; int lineno; } YYSTYPE; ! /* Line 191 of yacc.c. */ ! #line 246 "op2534.c" ! # 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 211 "objc-parse.y" ! ! /* Number of statements (loosely speaking) and compound statements seen so far. */ static int stmt_count; static int compstmt_count; ! /* Input file and line number of the end of the body of last simple_if; used by the stmt-rule immediately after simple_if returns. */ static const char *if_stmt_file; static int if_stmt_line; /* List of types and structure classes of the current declaration. */ ! static tree current_declspecs = NULL_TREE; ! static tree prefix_attributes = NULL_TREE; /* List of all the attributes applying to the identifier currently being declared; includes prefix_attributes and possibly some more attributes just after a comma. */ ! static tree all_prefix_attributes = NULL_TREE; /* Stack of saved values of current_declspecs, prefix_attributes and all_prefix_attributes. */ ! static tree declspec_stack; /* PUSH_DECLSPEC_STACK is called from setspecs; POP_DECLSPEC_STACK should be called from the productions making use of setspecs. */ --- 96,175 ---- /* Like YYERROR but do call yyerror. */ #define YYERROR1 { yyerror ("syntax error"); YYERROR; } ! /* Like the default stack expander, except (1) use realloc when possible, ! (2) impose no hard maxiumum on stack size, (3) REALLY do not use alloca. + Irritatingly, YYSTYPE is defined after this %{ %} block, so we cannot + give malloced_yyvs its proper type. This is ok since all we need from + it is to be able to free it. */ ! static short *malloced_yyss; ! static void *malloced_yyvs; ! #define yyoverflow(MSG, SS, SSSIZE, VS, VSSIZE, YYSSZ) \ ! do { \ ! size_t newsize; \ ! short *newss; \ ! YYSTYPE *newvs; \ ! newsize = *(YYSSZ) *= 2; \ ! if (malloced_yyss) \ ! { \ ! newss = (short *) \ ! really_call_realloc (*(SS), newsize * sizeof (short)); \ ! newvs = (YYSTYPE *) \ ! really_call_realloc (*(VS), newsize * sizeof (YYSTYPE)); \ ! } \ ! else \ ! { \ ! newss = (short *) really_call_malloc (newsize * sizeof (short)); \ ! newvs = (YYSTYPE *) really_call_malloc (newsize * sizeof (YYSTYPE)); \ ! if (newss) \ ! memcpy (newss, *(SS), (SSSIZE)); \ ! if (newvs) \ ! memcpy (newvs, *(VS), (VSSIZE)); \ ! } \ ! if (!newss || !newvs) \ ! { \ ! yyerror (MSG); \ ! return 2; \ ! } \ ! *(SS) = newss; \ ! *(VS) = newvs; \ ! malloced_yyss = newss; \ ! malloced_yyvs = (void *) newvs; \ ! } while (0) ! #line 103 "objc-parse.y" ! #ifndef YYSTYPE ! typedef union {long itype; tree ttype; enum tree_code code; ! const char *filename; int lineno; } yystype; ! # define YYSTYPE yystype # define YYSTYPE_IS_TRIVIAL 1 #endif + #line 248 "objc-parse.y" ! /* Number of statements (loosely speaking) and compound statements seen so far. */ static int stmt_count; static int compstmt_count; ! /* Input file and line number of the end of the body of last simple_if; used by the stmt-rule immediately after simple_if returns. */ static const char *if_stmt_file; static int if_stmt_line; /* List of types and structure classes of the current declaration. */ ! static GTY(()) tree current_declspecs; ! static GTY(()) tree prefix_attributes; /* List of all the attributes applying to the identifier currently being declared; includes prefix_attributes and possibly some more attributes just after a comma. */ ! static GTY(()) tree all_prefix_attributes; /* Stack of saved values of current_declspecs, prefix_attributes and all_prefix_attributes. */ ! static GTY(()) tree declspec_stack; /* PUSH_DECLSPEC_STACK is called from setspecs; POP_DECLSPEC_STACK should be called from the productions making use of setspecs. */ *************** static tree declspec_stack; *** 297,313 **** /* For __extension__, save/restore the warning flags which are controlled by __extension__. */ ! #define SAVE_WARN_FLAGS() \ size_int (pedantic \ | (warn_pointer_arith << 1) \ ! | (warn_traditional << 2)) ! #define RESTORE_WARN_FLAGS(tval) \ do { \ int val = tree_low_cst (tval, 0); \ pedantic = val & 1; \ warn_pointer_arith = (val >> 1) & 1; \ warn_traditional = (val >> 2) & 1; \ } while (0) /* Objective-C specific parser/lexer information */ --- 191,209 ---- /* For __extension__, save/restore the warning flags which are controlled by __extension__. */ ! #define SAVE_EXT_FLAGS() \ size_int (pedantic \ | (warn_pointer_arith << 1) \ ! | (warn_traditional << 2) \ ! | (flag_iso << 3)) ! #define RESTORE_EXT_FLAGS(tval) \ do { \ int val = tree_low_cst (tval, 0); \ pedantic = val & 1; \ warn_pointer_arith = (val >> 1) & 1; \ warn_traditional = (val >> 2) & 1; \ + flag_iso = (val >> 3) & 1; \ } while (0) /* Objective-C specific parser/lexer information */ *************** static enum tree_code objc_inherit_code; *** 316,328 **** static int objc_pq_context = 0, objc_public_flag = 0; /* The following flag is needed to contextualize ObjC lexical analysis. ! In some cases (e.g., 'int NSObject;'), it is undesirable to bind ! an identifier to an ObjC class, even if a class with that name exists. */ static int objc_need_raw_identifier; #define OBJC_NEED_RAW_IDENTIFIER(VAL) objc_need_raw_identifier = VAL /* Tell yyparse how to print a token's value, if yydebug is set. */ #define YYPRINT(FILE,YYCHAR,YYLVAL) yyprint(FILE,YYCHAR,YYLVAL) --- 212,226 ---- static int objc_pq_context = 0, objc_public_flag = 0; /* The following flag is needed to contextualize ObjC lexical analysis. ! In some cases (e.g., 'int NSObject;'), it is undesirable to bind ! an identifier to an ObjC class, even if a class with that name exists. */ static int objc_need_raw_identifier; #define OBJC_NEED_RAW_IDENTIFIER(VAL) objc_need_raw_identifier = VAL + static bool parsing_iso_function_signature; + /* Tell yyparse how to print a token's value, if yydebug is set. */ #define YYPRINT(FILE,YYCHAR,YYLVAL) yyprint(FILE,YYCHAR,YYLVAL) *************** static int objc_need_raw_identifier; *** 330,487 **** static void yyprint PARAMS ((FILE *, int, YYSTYPE)); static void yyerror PARAMS ((const char *)); static int yylexname PARAMS ((void)); static inline int _yylex PARAMS ((void)); static int yylex PARAMS ((void)); static void init_reswords PARAMS ((void)); ! /* Add GC roots for variables local to this file. */ void c_parse_init () { init_reswords (); - - ggc_add_tree_root (&declspec_stack, 1); - ggc_add_tree_root (¤t_declspecs, 1); - ggc_add_tree_root (&prefix_attributes, 1); - ggc_add_tree_root (&all_prefix_attributes, 1); } ! ! ! /* Line 214 of yacc.c. */ ! #line 352 "op2534.c" ! ! #if ! defined (yyoverflow) || YYERROR_VERBOSE ! ! /* The parser invokes alloca or malloc; define the necessary symbols. */ ! ! # if YYSTACK_USE_ALLOCA ! # define YYSTACK_ALLOC alloca ! # else ! # ifndef YYSTACK_USE_ALLOCA ! # if defined (alloca) || defined (_ALLOCA_H) ! # define YYSTACK_ALLOC alloca ! # else ! # ifdef __GNUC__ ! # define YYSTACK_ALLOC __builtin_alloca ! # endif ! # endif ! # endif ! # endif ! ! # ifdef YYSTACK_ALLOC ! /* Pacify GCC's `empty if-body' warning. */ ! # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) ! # else ! # if defined (__STDC__) || defined (__cplusplus) ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T size_t ! # endif ! # define YYSTACK_ALLOC malloc ! # define YYSTACK_FREE free ! # endif ! #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ ! ! ! #if (! defined (yyoverflow) \ ! && (! defined (__cplusplus) \ ! || (YYSTYPE_IS_TRIVIAL))) ! ! /* A type that is properly aligned for any stack member. */ ! union yyalloc ! { ! short yyss; ! YYSTYPE yyvs; ! }; ! ! /* The size of the maximum gap between one aligned stack and the next. */ ! # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) ! ! /* The size of an array large to enough to hold all stacks, each with ! N elements. */ ! # define YYSTACK_BYTES(N) \ ! ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ ! + YYSTACK_GAP_MAXIMUM) ! ! /* Copy COUNT objects from FROM to TO. The source and destination do ! not overlap. */ ! # ifndef YYCOPY ! # if 1 < __GNUC__ ! # define YYCOPY(To, From, Count) \ ! __builtin_memcpy (To, From, (Count) * sizeof (*(From))) ! # else ! # define YYCOPY(To, From, Count) \ ! do \ ! { \ ! register YYSIZE_T yyi; \ ! for (yyi = 0; yyi < (Count); yyi++) \ ! (To)[yyi] = (From)[yyi]; \ ! } \ ! while (0) ! # endif ! # endif ! ! /* Relocate STACK from its old location to the new one. The ! local variables YYSIZE and YYSTACKSIZE give the old and new number of ! 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) \ ! do \ ! { \ ! YYSIZE_T yynewbytes; \ ! YYCOPY (&yyptr->Stack, Stack, yysize); \ ! Stack = &yyptr->Stack; \ ! yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ ! yyptr += yynewbytes / sizeof (*yyptr); \ ! } \ ! while (0) ! ! #endif ! ! #if defined (__STDC__) || defined (__cplusplus) ! typedef signed char yysigned_char; ! #else ! typedef short yysigned_char; #endif - /* YYFINAL -- State number of the termination state. */ - #define YYFINAL 4 - /* YYLAST -- Last index in YYTABLE. */ - #define YYLAST 4983 - /* YYNTOKENS -- Number of terminals. */ - #define YYNTOKENS 92 - /* YYNNTS -- Number of nonterminals. */ - #define YYNNTS 266 - /* YYNRULES -- Number of rules. */ - #define YYNRULES 724 - /* YYNRULES -- Number of states. */ - #define YYNSTATES 1164 ! /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ ! #define YYUNDEFTOK 2 ! #define YYMAXUTOK 323 ! #define YYTRANSLATE(YYX) \ ! ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) ! /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ ! static const unsigned char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 87, 2, 2, 2, 60, 51, 2, ! 66, 83, 58, 56, 88, 57, 65, 59, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 46, 84, ! 2, 43, 2, 45, 91, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 67, 2, 90, 50, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 89, 49, 85, 86, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, --- 228,274 ---- static void yyprint PARAMS ((FILE *, int, YYSTYPE)); static void yyerror PARAMS ((const char *)); static int yylexname PARAMS ((void)); + static int yylexstring PARAMS ((void)); static inline int _yylex PARAMS ((void)); static int yylex PARAMS ((void)); static void init_reswords PARAMS ((void)); ! /* Initialisation routine for this file. */ void c_parse_init () { init_reswords (); } ! #ifndef YYDEBUG ! # define YYDEBUG 0 #endif ! #define YYFINAL 1165 ! #define YYFLAG -32768 ! #define YYNTBASE 93 ! /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ ! #define YYTRANSLATE(x) ((unsigned)(x) <= 323 ? yytranslate[x] : 358) ! /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ ! static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 88, 2, 2, 2, 61, 52, 2, ! 68, 84, 59, 57, 89, 58, 67, 60, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 47, 85, ! 2, 45, 2, 46, 92, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 69, 2, 91, 51, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 90, 50, 86, 87, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, *************** static const unsigned char yytranslate[] *** 494,917 **** 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, ! 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, ! 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, ! 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, ! 35, 36, 37, 38, 39, 40, 41, 42, 44, 47, ! 48, 52, 53, 54, 55, 61, 62, 63, 64, 68, ! 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, ! 79, 80, 81, 82 }; #if YYDEBUG ! /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in ! YYRHS. */ ! static const unsigned short yyprhs[] = { ! 0, 0, 3, 4, 6, 7, 10, 11, 15, 17, ! 19, 21, 27, 30, 34, 39, 44, 47, 50, 53, ! 55, 56, 57, 67, 72, 73, 74, 84, 89, 90, ! 91, 100, 104, 106, 108, 110, 112, 114, 116, 118, ! 120, 122, 124, 126, 128, 129, 131, 133, 137, 139, ! 142, 145, 148, 151, 154, 159, 162, 167, 170, 173, ! 175, 177, 179, 181, 186, 188, 192, 196, 200, 204, ! 208, 212, 216, 220, 224, 228, 232, 236, 237, 242, ! 243, 248, 249, 250, 258, 259, 265, 269, 273, 275, ! 277, 279, 281, 282, 290, 294, 298, 302, 306, 311, ! 318, 327, 334, 339, 343, 347, 350, 353, 355, 357, ! 359, 361, 363, 365, 368, 371, 375, 376, 378, 381, ! 385, 387, 389, 392, 395, 400, 405, 408, 411, 415, ! 416, 418, 423, 428, 432, 436, 439, 442, 444, 447, ! 450, 453, 456, 459, 461, 464, 466, 469, 472, 475, ! 478, 481, 484, 486, 489, 492, 495, 498, 501, 504, ! 507, 510, 513, 516, 519, 522, 525, 528, 531, 534, ! 536, 539, 542, 545, 548, 551, 554, 557, 560, 563, ! 566, 569, 572, 575, 578, 581, 584, 587, 590, 593, ! 596, 599, 602, 605, 608, 611, 614, 617, 620, 623, ! 626, 629, 632, 635, 638, 641, 644, 647, 650, 653, ! 656, 659, 662, 665, 668, 670, 672, 674, 676, 678, ! 680, 682, 684, 686, 688, 690, 692, 694, 696, 698, ! 700, 702, 704, 706, 708, 710, 712, 714, 716, 718, ! 720, 722, 724, 726, 728, 730, 732, 734, 736, 738, ! 740, 742, 744, 746, 748, 750, 752, 754, 756, 758, ! 760, 762, 764, 766, 768, 770, 772, 774, 776, 778, ! 780, 781, 783, 785, 787, 789, 791, 793, 795, 797, ! 800, 803, 805, 810, 815, 817, 822, 824, 829, 830, ! 835, 836, 843, 847, 848, 855, 859, 860, 862, 864, ! 867, 874, 876, 880, 881, 883, 888, 895, 900, 902, ! 904, 906, 908, 910, 911, 916, 918, 919, 922, 924, ! 928, 932, 935, 936, 941, 943, 944, 949, 951, 953, ! 955, 958, 961, 962, 963, 971, 972, 973, 981, 983, ! 985, 990, 994, 997, 1001, 1003, 1005, 1007, 1009, 1013, ! 1016, 1018, 1020, 1024, 1027, 1031, 1035, 1040, 1044, 1049, ! 1053, 1056, 1058, 1060, 1063, 1065, 1068, 1070, 1073, 1074, ! 1082, 1088, 1089, 1097, 1103, 1104, 1113, 1114, 1122, 1125, ! 1128, 1131, 1132, 1134, 1135, 1137, 1139, 1142, 1143, 1147, ! 1150, 1155, 1159, 1164, 1168, 1170, 1172, 1175, 1177, 1182, ! 1184, 1189, 1194, 1201, 1207, 1212, 1219, 1225, 1227, 1231, ! 1233, 1235, 1239, 1240, 1244, 1245, 1247, 1248, 1250, 1253, ! 1255, 1257, 1259, 1263, 1266, 1270, 1275, 1279, 1282, 1285, ! 1287, 1291, 1296, 1299, 1303, 1307, 1312, 1317, 1323, 1329, ! 1331, 1333, 1335, 1337, 1339, 1342, 1345, 1348, 1351, 1353, ! 1356, 1359, 1362, 1364, 1367, 1370, 1373, 1376, 1378, 1381, ! 1383, 1385, 1387, 1389, 1392, 1393, 1394, 1395, 1396, 1397, ! 1399, 1401, 1404, 1408, 1410, 1413, 1415, 1417, 1423, 1425, ! 1427, 1430, 1433, 1436, 1439, 1440, 1446, 1447, 1452, 1453, ! 1454, 1456, 1459, 1463, 1467, 1471, 1472, 1477, 1479, 1483, ! 1484, 1485, 1493, 1499, 1502, 1503, 1504, 1505, 1506, 1519, ! 1520, 1527, 1530, 1532, 1534, 1537, 1541, 1544, 1547, 1550, ! 1554, 1561, 1570, 1581, 1594, 1598, 1603, 1605, 1609, 1615, ! 1618, 1624, 1625, 1627, 1628, 1630, 1631, 1633, 1635, 1639, ! 1644, 1652, 1654, 1658, 1659, 1663, 1666, 1667, 1668, 1675, ! 1678, 1679, 1681, 1683, 1687, 1689, 1693, 1698, 1703, 1707, ! 1712, 1716, 1721, 1726, 1730, 1735, 1739, 1741, 1742, 1746, ! 1748, 1751, 1753, 1757, 1759, 1763, 1765, 1767, 1769, 1771, ! 1773, 1775, 1777, 1779, 1783, 1787, 1792, 1793, 1794, 1805, ! 1806, 1813, 1814, 1815, 1828, 1829, 1838, 1839, 1846, 1849, ! 1850, 1859, 1864, 1865, 1875, 1881, 1882, 1889, 1893, 1894, ! 1896, 1900, 1904, 1906, 1908, 1910, 1912, 1913, 1917, 1920, ! 1924, 1928, 1930, 1931, 1933, 1938, 1940, 1944, 1947, 1949, ! 1951, 1952, 1953, 1954, 1962, 1963, 1964, 1967, 1969, 1971, ! 1974, 1975, 1979, 1981, 1983, 1984, 1985, 1991, 1996, 1998, ! 2004, 2007, 2008, 2011, 2012, 2014, 2016, 2018, 2021, 2024, ! 2029, 2032, 2035, 2037, 2041, 2044, 2047, 2049, 2050, 2053, ! 2054, 2058, 2060, 2062, 2065, 2067, 2069, 2071, 2073, 2075, ! 2077, 2079, 2081, 2083, 2085, 2087, 2089, 2091, 2093, 2095, ! 2097, 2099, 2101, 2103, 2105, 2107, 2109, 2111, 2113, 2115, ! 2117, 2124, 2128, 2134, 2137, 2139, 2141, 2143, 2146, 2148, ! 2152, 2155, 2157, 2159, 2160, 2161, 2168, 2170, 2172, 2174, ! 2177, 2180, 2182, 2187, 2192 }; - - /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const short yyrhs[] = { ! 93, 0, -1, -1, 94, -1, -1, 95, 97, -1, ! -1, 94, 96, 97, -1, 99, -1, 98, -1, 293, ! -1, 27, 66, 108, 83, 84, -1, 292, 97, -1, ! 131, 165, 84, -1, 151, 131, 165, 84, -1, 150, ! 131, 164, 84, -1, 157, 84, -1, 1, 84, -1, ! 1, 85, -1, 84, -1, -1, -1, 150, 131, 193, ! 100, 126, 101, 253, 254, 242, -1, 150, 131, 193, ! 1, -1, -1, -1, 151, 131, 198, 102, 126, 103, ! 253, 254, 242, -1, 151, 131, 198, 1, -1, -1, ! -1, 131, 198, 104, 126, 105, 253, 254, 242, -1, ! 131, 198, 1, -1, 3, -1, 4, -1, 80, -1, ! 75, -1, 51, -1, 57, -1, 56, -1, 62, -1, ! 61, -1, 86, -1, 87, -1, 110, -1, -1, 110, ! -1, 116, -1, 110, 88, 116, -1, 122, -1, 58, ! 115, -1, 292, 115, -1, 107, 115, -1, 48, 106, ! -1, 112, 111, -1, 112, 66, 219, 83, -1, 113, ! 111, -1, 113, 66, 219, 83, -1, 33, 115, -1, ! 34, 115, -1, 11, -1, 29, -1, 28, -1, 111, ! -1, 66, 219, 83, 115, -1, 115, -1, 116, 56, ! 116, -1, 116, 57, 116, -1, 116, 58, 116, -1, ! 116, 59, 116, -1, 116, 60, 116, -1, 116, 55, ! 116, -1, 116, 54, 116, -1, 116, 53, 116, -1, ! 116, 52, 116, -1, 116, 51, 116, -1, 116, 49, ! 116, -1, 116, 50, 116, -1, -1, 116, 48, 117, ! 116, -1, -1, 116, 47, 118, 116, -1, -1, -1, ! 116, 45, 119, 108, 46, 120, 116, -1, -1, 116, ! 45, 121, 46, 116, -1, 116, 43, 116, -1, 116, ! 44, 116, -1, 3, -1, 8, -1, 124, -1, 42, ! -1, -1, 66, 219, 83, 89, 123, 179, 85, -1, ! 66, 108, 83, -1, 66, 1, 83, -1, 246, 244, ! 83, -1, 246, 1, 83, -1, 122, 66, 109, 83, ! -1, 35, 66, 116, 88, 219, 83, -1, 36, 66, ! 116, 88, 116, 88, 116, 83, -1, 37, 66, 219, ! 88, 219, 83, -1, 122, 67, 108, 90, -1, 122, ! 65, 106, -1, 122, 68, 106, -1, 122, 62, -1, ! 122, 61, -1, 349, -1, 355, -1, 356, -1, 357, ! -1, 125, -1, 9, -1, 124, 9, -1, 91, 9, ! -1, 125, 91, 9, -1, -1, 128, -1, 128, 10, ! -1, 253, 254, 129, -1, 127, -1, 234, -1, 128, ! 127, -1, 127, 234, -1, 152, 131, 164, 84, -1, ! 153, 131, 165, 84, -1, 152, 84, -1, 153, 84, ! -1, 253, 254, 133, -1, -1, 171, -1, 150, 131, ! 164, 84, -1, 151, 131, 165, 84, -1, 150, 131, ! 187, -1, 151, 131, 190, -1, 157, 84, -1, 292, ! 133, -1, 7, -1, 134, 7, -1, 135, 7, -1, ! 134, 172, -1, 136, 7, -1, 137, 7, -1, 172, ! -1, 136, 172, -1, 159, -1, 138, 7, -1, 139, ! 7, -1, 138, 161, -1, 139, 161, -1, 134, 159, ! -1, 135, 159, -1, 160, -1, 138, 172, -1, 138, ! 162, -1, 139, 162, -1, 134, 160, -1, 135, 160, ! -1, 140, 7, -1, 141, 7, -1, 140, 161, -1, ! 141, 161, -1, 136, 159, -1, 137, 159, -1, 140, ! 172, -1, 140, 162, -1, 141, 162, -1, 136, 160, ! -1, 137, 160, -1, 5, -1, 142, 7, -1, 143, ! 7, -1, 134, 5, -1, 135, 5, -1, 142, 5, ! -1, 143, 5, -1, 142, 172, -1, 144, 7, -1, ! 145, 7, -1, 136, 5, -1, 137, 5, -1, 144, ! 5, -1, 145, 5, -1, 144, 172, -1, 146, 7, ! -1, 147, 7, -1, 146, 161, -1, 147, 161, -1, ! 142, 159, -1, 143, 159, -1, 138, 5, -1, 139, ! 5, -1, 146, 5, -1, 147, 5, -1, 146, 172, ! -1, 146, 162, -1, 147, 162, -1, 142, 160, -1, ! 143, 160, -1, 148, 7, -1, 149, 7, -1, 148, ! 161, -1, 149, 161, -1, 144, 159, -1, 145, 159, ! -1, 140, 5, -1, 141, 5, -1, 148, 5, -1, ! 149, 5, -1, 148, 172, -1, 148, 162, -1, 149, ! 162, -1, 144, 160, -1, 145, 160, -1, 138, -1, ! 139, -1, 140, -1, 141, -1, 146, -1, 147, -1, ! 148, -1, 149, -1, 134, -1, 135, -1, 136, -1, ! 137, -1, 142, -1, 143, -1, 144, -1, 145, -1, ! 138, -1, 139, -1, 146, -1, 147, -1, 134, -1, ! 135, -1, 142, -1, 143, -1, 138, -1, 139, -1, ! 140, -1, 141, -1, 134, -1, 135, -1, 136, -1, ! 137, -1, 138, -1, 139, -1, 140, -1, 141, -1, ! 134, -1, 135, -1, 136, -1, 137, -1, 134, -1, ! 135, -1, 136, -1, 137, -1, 138, -1, 139, -1, ! 140, -1, 141, -1, 142, -1, 143, -1, 144, -1, ! 145, -1, 146, -1, 147, -1, 148, -1, 149, -1, ! -1, 155, -1, 161, -1, 163, -1, 162, -1, 6, ! -1, 207, -1, 202, -1, 4, -1, 75, 309, -1, ! 80, 309, -1, 310, -1, 114, 66, 108, 83, -1, ! 114, 66, 219, 83, -1, 167, -1, 164, 88, 132, ! 167, -1, 169, -1, 165, 88, 132, 169, -1, -1, ! 27, 66, 124, 83, -1, -1, 193, 166, 171, 43, ! 168, 177, -1, 193, 166, 171, -1, -1, 198, 166, ! 171, 43, 170, 177, -1, 198, 166, 171, -1, -1, ! 172, -1, 173, -1, 172, 173, -1, 30, 66, 66, ! 174, 83, 83, -1, 175, -1, 174, 88, 175, -1, ! -1, 176, -1, 176, 66, 3, 83, -1, 176, 66, ! 3, 88, 110, 83, -1, 176, 66, 109, 83, -1, ! 106, -1, 5, -1, 6, -1, 7, -1, 116, -1, ! -1, 89, 178, 179, 85, -1, 1, -1, -1, 180, ! 208, -1, 181, -1, 180, 88, 181, -1, 185, 43, ! 183, -1, 186, 183, -1, -1, 106, 46, 182, 183, ! -1, 183, -1, -1, 89, 184, 179, 85, -1, 116, ! -1, 1, -1, 186, -1, 185, 186, -1, 65, 106, ! -1, -1, -1, 193, 188, 126, 189, 253, 254, 247, ! -1, -1, -1, 198, 191, 126, 192, 253, 254, 247, ! -1, 194, -1, 198, -1, 66, 171, 194, 83, -1, ! 194, 66, 287, -1, 194, 227, -1, 58, 158, 194, ! -1, 4, -1, 80, -1, 196, -1, 197, -1, 196, ! 66, 287, -1, 196, 227, -1, 4, -1, 80, -1, ! 197, 66, 287, -1, 197, 227, -1, 58, 158, 196, ! -1, 58, 158, 197, -1, 66, 171, 197, 83, -1, ! 198, 66, 287, -1, 66, 171, 198, 83, -1, 58, ! 158, 198, -1, 198, 227, -1, 3, -1, 13, -1, ! 13, 172, -1, 14, -1, 14, 172, -1, 12, -1, ! 12, 172, -1, -1, 199, 106, 89, 203, 210, 85, ! 171, -1, 199, 89, 210, 85, 171, -1, -1, 200, ! 106, 89, 204, 210, 85, 171, -1, 200, 89, 210, ! 85, 171, -1, -1, 201, 106, 89, 205, 217, 209, ! 85, 171, -1, -1, 201, 89, 206, 217, 209, 85, ! 171, -1, 199, 106, -1, 200, 106, -1, 201, 106, ! -1, -1, 88, -1, -1, 88, -1, 211, -1, 211, ! 212, -1, -1, 211, 212, 84, -1, 211, 84, -1, ! 73, 66, 75, 83, -1, 154, 131, 213, -1, 154, ! 131, 253, 254, -1, 155, 131, 214, -1, 155, -1, ! 1, -1, 292, 212, -1, 215, -1, 213, 88, 132, ! 215, -1, 216, -1, 214, 88, 132, 216, -1, 253, ! 254, 193, 171, -1, 253, 254, 193, 46, 116, 171, ! -1, 253, 254, 46, 116, 171, -1, 253, 254, 198, ! 171, -1, 253, 254, 198, 46, 116, 171, -1, 253, ! 254, 46, 116, 171, -1, 218, -1, 217, 88, 218, ! -1, 1, -1, 106, -1, 106, 43, 116, -1, -1, ! 156, 220, 221, -1, -1, 223, -1, -1, 223, -1, ! 224, 172, -1, 225, -1, 224, -1, 226, -1, 58, ! 158, 224, -1, 58, 158, -1, 58, 158, 225, -1, ! 66, 171, 223, 83, -1, 226, 66, 277, -1, 226, ! 227, -1, 66, 277, -1, 227, -1, 67, 108, 90, ! -1, 67, 156, 108, 90, -1, 67, 90, -1, 67, ! 156, 90, -1, 67, 58, 90, -1, 67, 156, 58, ! 90, -1, 67, 5, 108, 90, -1, 67, 5, 156, ! 108, 90, -1, 67, 156, 5, 108, 90, -1, 229, ! -1, 230, -1, 231, -1, 232, -1, 257, -1, 229, ! 257, -1, 230, 257, -1, 231, 257, -1, 232, 257, ! -1, 130, -1, 229, 130, -1, 230, 130, -1, 232, ! 130, -1, 258, -1, 229, 258, -1, 230, 258, -1, ! 231, 258, -1, 232, 258, -1, 234, -1, 233, 234, ! -1, 229, -1, 230, -1, 231, -1, 232, -1, 1, ! 84, -1, -1, -1, -1, -1, -1, 240, -1, 241, ! -1, 240, 241, -1, 32, 291, 84, -1, 247, -1, ! 1, 247, -1, 89, -1, 85, -1, 235, 239, 245, ! 85, 236, -1, 228, -1, 1, -1, 66, 89, -1, ! 243, 244, -1, 249, 256, -1, 249, 1, -1, -1, ! 15, 250, 66, 108, 83, -1, -1, 18, 252, 256, ! 17, -1, -1, -1, 257, -1, 258, 255, -1, 237, ! 255, 238, -1, 253, 254, 269, -1, 253, 254, 270, ! -1, -1, 248, 16, 260, 256, -1, 248, -1, 248, ! 16, 1, -1, -1, -1, 17, 261, 66, 108, 83, ! 262, 256, -1, 251, 66, 108, 83, 84, -1, 251, ! 1, -1, -1, -1, -1, -1, 19, 263, 66, 268, ! 264, 272, 84, 265, 272, 83, 266, 256, -1, -1, ! 20, 66, 108, 83, 267, 256, -1, 272, 84, -1, ! 133, -1, 247, -1, 108, 84, -1, 237, 259, 238, ! -1, 23, 84, -1, 24, 84, -1, 25, 84, -1, ! 25, 108, 84, -1, 27, 271, 66, 108, 83, 84, ! -1, 27, 271, 66, 108, 46, 273, 83, 84, -1, ! 27, 271, 66, 108, 46, 273, 46, 273, 83, 84, ! -1, 27, 271, 66, 108, 46, 273, 46, 273, 46, ! 276, 83, 84, -1, 26, 106, 84, -1, 26, 58, ! 108, 84, -1, 84, -1, 21, 116, 46, -1, 21, ! 116, 10, 116, 46, -1, 22, 46, -1, 106, 253, ! 254, 46, 171, -1, -1, 7, -1, -1, 108, -1, ! -1, 274, -1, 275, -1, 274, 88, 275, -1, 9, ! 66, 108, 83, -1, 67, 106, 90, 9, 66, 108, ! 83, -1, 124, -1, 276, 88, 124, -1, -1, 171, ! 278, 279, -1, 282, 83, -1, -1, -1, 283, 84, ! 280, 171, 281, 279, -1, 1, 83, -1, -1, 10, ! -1, 283, -1, 283, 88, 10, -1, 285, -1, 283, ! 88, 284, -1, 150, 131, 195, 171, -1, 150, 131, ! 198, 171, -1, 150, 131, 222, -1, 151, 131, 198, ! 171, -1, 151, 131, 222, -1, 152, 286, 195, 171, ! -1, 152, 286, 198, 171, -1, 152, 286, 222, -1, ! 153, 286, 198, 171, -1, 153, 286, 222, -1, 131, ! -1, -1, 171, 288, 289, -1, 279, -1, 290, 83, ! -1, 3, -1, 290, 88, 3, -1, 106, -1, 291, ! 88, 106, -1, 31, -1, 297, -1, 295, -1, 296, ! -1, 307, -1, 318, -1, 71, -1, 106, -1, 294, ! 88, 106, -1, 81, 294, 84, -1, 82, 106, 106, ! 84, -1, -1, -1, 69, 106, 309, 89, 298, 311, ! 85, 299, 322, 71, -1, -1, 69, 106, 309, 300, ! 322, 71, -1, -1, -1, 69, 106, 46, 106, 309, ! 89, 301, 311, 85, 302, 322, 71, -1, -1, 69, ! 106, 46, 106, 309, 303, 322, 71, -1, -1, 70, ! 106, 89, 304, 311, 85, -1, 70, 106, -1, -1, ! 70, 106, 46, 106, 89, 305, 311, 85, -1, 70, ! 106, 46, 106, -1, -1, 69, 106, 66, 106, 83, ! 309, 306, 322, 71, -1, 70, 106, 66, 106, 83, ! -1, -1, 79, 106, 309, 308, 322, 71, -1, 79, ! 294, 84, -1, -1, 310, -1, 53, 294, 53, -1, ! 311, 312, 313, -1, 313, -1, 77, -1, 78, -1, ! 76, -1, -1, 313, 314, 84, -1, 313, 84, -1, ! 154, 131, 315, -1, 155, 131, 315, -1, 1, -1, ! -1, 316, -1, 315, 88, 132, 316, -1, 193, -1, ! 193, 46, 116, -1, 46, 116, -1, 56, -1, 57, ! -1, -1, -1, -1, 317, 319, 330, 320, 331, 321, ! 242, -1, -1, -1, 323, 324, -1, 327, -1, 98, ! -1, 324, 327, -1, -1, 324, 325, 98, -1, 84, ! -1, 1, -1, -1, -1, 317, 328, 330, 329, 326, ! -1, 66, 219, 83, 339, -1, 339, -1, 66, 219, ! 83, 340, 337, -1, 340, 337, -1, -1, 84, 332, ! -1, -1, 333, -1, 334, -1, 234, -1, 333, 334, ! -1, 334, 234, -1, 150, 131, 335, 84, -1, 150, ! 84, -1, 151, 84, -1, 336, -1, 335, 88, 336, ! -1, 195, 171, -1, 198, 171, -1, 222, -1, -1, ! 88, 10, -1, -1, 88, 338, 282, -1, 341, -1, ! 343, -1, 340, 343, -1, 3, -1, 4, -1, 75, ! -1, 80, -1, 342, -1, 12, -1, 13, -1, 14, ! -1, 15, -1, 16, -1, 17, -1, 18, -1, 19, ! -1, 20, -1, 21, -1, 22, -1, 23, -1, 24, ! -1, 25, -1, 26, -1, 27, -1, 11, -1, 28, ! -1, 29, -1, 6, -1, 7, -1, 341, 46, 66, ! 219, 83, 106, -1, 341, 46, 106, -1, 46, 66, ! 219, 83, 106, -1, 46, 106, -1, 341, -1, 345, ! -1, 347, -1, 345, 347, -1, 110, -1, 341, 46, ! 346, -1, 46, 346, -1, 108, -1, 75, -1, -1, ! -1, 67, 350, 348, 351, 344, 90, -1, 341, -1, ! 353, -1, 354, -1, 353, 354, -1, 341, 46, -1, ! 46, -1, 72, 66, 352, 83, -1, 79, 66, 106, ! 83, -1, 74, 66, 219, 83, -1 }; ! /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ ! static const unsigned short yyrline[] = { ! 0, 308, 308, 312, 327, 327, 328, 328, 332, 333, ! 334, 335, 343, 348, 355, 357, 359, 361, 362, 363, ! 370, 375, 369, 381, 384, 389, 383, 395, 398, 403, ! 397, 409, 414, 415, 416, 417, 420, 422, 424, 427, ! 429, 431, 433, 437, 443, 444, 448, 450, 455, 456, ! 459, 462, 466, 483, 489, 492, 495, 498, 500, 505, ! 509, 513, 517, 518, 523, 524, 526, 528, 530, 532, ! 534, 536, 538, 540, 542, 544, 546, 549, 548, 555, ! 554, 561, 564, 560, 570, 569, 579, 586, 597, 603, ! 604, 606, 609, 608, 621, 626, 628, 644, 651, 653, ! 656, 666, 676, 678, 685, 694, 696, 698, 700, 702, ! 704, 706, 712, 713, 722, 724, 728, 730, 731, 742, ! 747, 748, 749, 750, 758, 760, 762, 765, 774, 783, ! 793, 798, 800, 802, 804, 806, 808, 865, 868, 871, ! 877, 883, 886, 892, 895, 901, 904, 907, 910, 913, ! 916, 919, 925, 928, 931, 934, 937, 940, 946, 949, ! 952, 955, 958, 961, 967, 970, 973, 976, 979, 985, ! 988, 991, 994, 1000, 1006, 1012, 1021, 1027, 1030, 1033, ! 1039, 1045, 1051, 1060, 1066, 1069, 1072, 1075, 1078, 1081, ! 1084, 1090, 1096, 1102, 1111, 1114, 1117, 1120, 1123, 1129, ! 1132, 1135, 1138, 1141, 1144, 1147, 1153, 1159, 1165, 1174, ! 1177, 1180, 1183, 1186, 1193, 1194, 1195, 1196, 1197, 1198, ! 1199, 1200, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, ! 1215, 1216, 1217, 1218, 1222, 1223, 1224, 1225, 1229, 1230, ! 1231, 1232, 1236, 1237, 1238, 1239, 1243, 1244, 1245, 1246, ! 1247, 1248, 1249, 1250, 1254, 1255, 1256, 1257, 1258, 1259, ! 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, ! 1275, 1276, 1302, 1303, 1307, 1311, 1313, 1317, 1321, 1325, ! 1327, 1332, 1334, 1336, 1343, 1344, 1348, 1349, 1354, 1355, ! 1363, 1362, 1370, 1379, 1378, 1386, 1395, 1396, 1401, 1403, ! 1408, 1413, 1415, 1421, 1422, 1424, 1426, 1428, 1436, 1437, ! 1438, 1439, 1445, 1447, 1446, 1450, 1457, 1459, 1463, 1464, ! 1470, 1473, 1477, 1476, 1482, 1487, 1486, 1490, 1492, 1496, ! 1497, 1501, 1510, 1522, 1509, 1540, 1552, 1539, 1572, 1573, ! 1579, 1581, 1586, 1588, 1590, 1591, 1599, 1600, 1604, 1609, ! 1611, 1612, 1616, 1621, 1623, 1625, 1627, 1635, 1640, 1642, ! 1644, 1646, 1650, 1652, 1657, 1659, 1664, 1666, 1678, 1677, ! 1683, 1688, 1687, 1691, 1696, 1695, 1701, 1700, 1708, 1710, ! 1712, 1720, 1722, 1725, 1727, 1733, 1735, 1741, 1742, 1744, ! 1748, 1764, 1767, 1777, 1780, 1785, 1787, 1793, 1794, 1799, ! 1800, 1805, 1808, 1812, 1818, 1821, 1825, 1836, 1837, 1842, ! 1848, 1850, 1856, 1855, 1864, 1865, 1870, 1873, 1877, 1884, ! 1885, 1889, 1890, 1895, 1897, 1902, 1904, 1906, 1908, 1910, ! 1917, 1919, 1921, 1923, 1925, 1927, 1929, 1933, 1937, 1950, ! 1951, 1952, 1956, 1960, 1961, 1962, 1963, 1964, 1968, 1969, ! 1972, 1973, 1977, 1978, 1979, 1980, 1981, 1985, 1986, 1990, ! 1991, 1992, 1993, 1996, 2000, 2009, 2014, 2032, 2046, 2048, ! 2054, 2055, 2059, 2073, 2075, 2078, 2082, 2084, 2092, 2093, ! 2097, 2114, 2122, 2127, 2140, 2139, 2154, 2153, 2173, 2179, ! 2185, 2186, 2191, 2197, 2211, 2221, 2220, 2228, 2240, 2251, ! 2254, 2250, 2260, 2263, 2266, 2270, 2273, 2276, 2265, 2280, ! 2279, 2287, 2289, 2295, 2297, 2300, 2304, 2307, 2310, 2313, ! 2316, 2320, 2324, 2329, 2333, 2345, 2351, 2359, 2362, 2365, ! 2368, 2385, 2387, 2393, 2394, 2400, 2401, 2405, 2406, 2411, ! 2413, 2418, 2420, 2431, 2430, 2441, 2443, 2451, 2442, 2455, ! 2462, 2463, 2473, 2475, 2480, 2482, 2489, 2494, 2499, 2502, ! 2508, 2516, 2521, 2526, 2529, 2535, 2541, 2551, 2550, 2561, ! 2562, 2580, 2582, 2588, 2590, 2595, 2605, 2606, 2607, 2608, ! 2609, 2610, 2625, 2627, 2632, 2639, 2647, 2653, 2646, 2664, ! 2663, 2677, 2683, 2676, 2694, 2693, 2707, 2706, 2718, 2727, ! 2726, 2738, 2747, 2746, 2759, 2770, 2769, 2784, 2792, 2795, ! 2799, 2809, 2810, 2814, 2815, 2816, 2821, 2824, 2825, 2843, ! 2846, 2849, 2855, 2856, 2857, 2861, 2868, 2874, 2884, 2886, ! 2892, 2898, 2907, 2891, 2920, 2922, 2922, 2926, 2927, 2928, ! 2929, 2929, 2933, 2934, 2939, 2944, 2938, 2956, 2961, 2966, ! 2971, 2980, 2982, 2988, 2990, 2994, 2995, 2996, 2997, 3001, ! 3003, 3005, 3010, 3012, 3020, 3024, 3028, 3034, 3037, 3043, ! 3042, 3055, 3059, 3061, 3068, 3069, 3070, 3071, 3072, 3076, ! 3076, 3076, 3076, 3076, 3076, 3076, 3076, 3077, 3077, 3077, ! 3077, 3077, 3077, 3078, 3078, 3078, 3078, 3078, 3079, 3079, ! 3083, 3088, 3093, 3098, 3105, 3106, 3110, 3111, 3119, 3131, ! 3135, 3142, 3143, 3151, 3153, 3150, 3161, 3162, 3166, 3167, ! 3174, 3178, 3185, 3192, 3201 }; #endif ! #if YYDEBUG || YYERROR_VERBOSE ! /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. ! First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { ! "$end", "error", "$undefined", "IDENTIFIER", "TYPENAME", "SCSPEC", "TYPESPEC", "TYPE_QUAL", "CONSTANT", "STRING", "ELLIPSIS", "SIZEOF", "ENUM", "STRUCT", "UNION", "IF", "ELSE", "WHILE", "DO", "FOR", "SWITCH", "CASE", "DEFAULT", "BREAK", "CONTINUE", "RETURN", "GOTO", "ASM_KEYWORD", "TYPEOF", "ALIGNOF", "ATTRIBUTE", "EXTENSION", "LABEL", "REALPART", "IMAGPART", "VA_ARG", "CHOOSE_EXPR", "TYPES_COMPATIBLE_P", "PTR_VALUE", ! "PTR_BASE", "PTR_EXTENT", "STRING_FUNC_NAME", "VAR_FUNC_NAME", "'='", ! "ASSIGN", "'?'", "':'", "OROR", "ANDAND", "'|'", "'^'", "'&'", ! "EQCOMPARE", "ARITHCOMPARE", "RSHIFT", "LSHIFT", "'+'", "'-'", "'*'", ! "'/'", "'%'", "MINUSMINUS", "PLUSPLUS", "UNARY", "HYPERUNARY", "'.'", ! "'('", "'['", "POINTSAT", "INTERFACE", "IMPLEMENTATION", "END", ! "SELECTOR", "DEFS", "ENCODE", "CLASSNAME", "PUBLIC", "PRIVATE", ! "PROTECTED", "PROTOCOL", "OBJECTNAME", "CLASS", "ALIAS", "')'", "';'", ! "'}'", "'~'", "'!'", "','", "'{'", "']'", "'@'", "$accept", "program", ! "extdefs", "@1", "@2", "extdef", "datadef", "fndef", "@3", "@4", "@5", ! "@6", "@7", "@8", "identifier", "unop", "expr", "exprlist", ! "nonnull_exprlist", "unary_expr", "sizeof", "alignof", "typeof", ! "cast_expr", "expr_no_commas", "@9", "@10", "@11", "@12", "@13", ! "primary", "@14", "string", "objc_string", "old_style_parm_decls", "lineno_datadecl", "datadecls", "datadecl", "lineno_decl", "setspecs", "maybe_resetattrs", "decl", "declspecs_nosc_nots_nosa_noea", "declspecs_nosc_nots_nosa_ea", "declspecs_nosc_nots_sa_noea", --- 281,703 ---- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, ! 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ! 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, ! 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, ! 36, 37, 38, 39, 40, 41, 42, 43, 44, 48, ! 49, 53, 54, 55, 56, 62, 63, 64, 65, 66, ! 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, ! 80, 81, 82, 83 }; #if YYDEBUG ! static const short yyprhs[] = { ! 0, 0, 1, 3, 4, 7, 8, 12, 14, 16, ! 18, 20, 26, 29, 33, 38, 43, 46, 49, 52, ! 54, 55, 56, 66, 71, 72, 73, 83, 88, 89, ! 90, 99, 103, 105, 107, 109, 111, 113, 115, 117, ! 119, 121, 123, 125, 127, 128, 130, 132, 136, 138, ! 141, 144, 147, 150, 153, 158, 161, 166, 169, 172, ! 174, 176, 178, 180, 185, 187, 191, 195, 199, 203, ! 207, 211, 215, 219, 223, 227, 231, 235, 236, 241, ! 242, 247, 248, 249, 257, 258, 264, 268, 272, 274, ! 276, 278, 280, 281, 289, 293, 297, 301, 305, 310, ! 317, 326, 333, 338, 342, 346, 349, 352, 354, 356, ! 358, 360, 362, 365, 369, 371, 372, 374, 378, 380, ! 382, 385, 388, 393, 398, 401, 404, 408, 409, 411, ! 416, 421, 425, 429, 432, 435, 437, 440, 443, 446, ! 449, 452, 454, 457, 459, 462, 465, 468, 471, 474, ! 477, 479, 482, 485, 488, 491, 494, 497, 500, 503, ! 506, 509, 512, 515, 518, 521, 524, 527, 529, 532, ! 535, 538, 541, 544, 547, 550, 553, 556, 559, 562, ! 565, 568, 571, 574, 577, 580, 583, 586, 589, 592, ! 595, 598, 601, 604, 607, 610, 613, 616, 619, 622, ! 625, 628, 631, 634, 637, 640, 643, 646, 649, 652, ! 655, 658, 661, 663, 665, 667, 669, 671, 673, 675, ! 677, 679, 681, 683, 685, 687, 689, 691, 693, 695, ! 697, 699, 701, 703, 705, 707, 709, 711, 713, 715, ! 717, 719, 721, 723, 725, 727, 729, 731, 733, 735, ! 737, 739, 741, 743, 745, 747, 749, 751, 753, 755, ! 757, 759, 761, 763, 765, 767, 769, 771, 773, 774, ! 776, 778, 780, 782, 784, 786, 788, 790, 793, 796, ! 798, 803, 808, 810, 815, 817, 822, 823, 828, 829, ! 836, 840, 841, 848, 852, 853, 855, 857, 860, 867, ! 869, 873, 874, 876, 881, 888, 893, 895, 897, 899, ! 901, 903, 905, 907, 908, 913, 915, 916, 919, 921, ! 925, 929, 932, 933, 938, 940, 941, 946, 948, 950, ! 952, 955, 958, 964, 968, 969, 970, 978, 979, 980, ! 988, 990, 992, 997, 1001, 1004, 1008, 1010, 1012, 1014, ! 1016, 1020, 1023, 1025, 1027, 1031, 1034, 1038, 1042, 1047, ! 1051, 1056, 1060, 1063, 1065, 1067, 1070, 1072, 1075, 1077, ! 1080, 1081, 1089, 1095, 1096, 1104, 1110, 1111, 1120, 1121, ! 1129, 1132, 1135, 1138, 1139, 1141, 1142, 1144, 1146, 1149, ! 1150, 1154, 1157, 1162, 1166, 1171, 1175, 1177, 1179, 1182, ! 1184, 1189, 1191, 1196, 1201, 1208, 1214, 1219, 1226, 1232, ! 1234, 1238, 1240, 1242, 1246, 1247, 1251, 1252, 1254, 1255, ! 1257, 1260, 1262, 1264, 1266, 1270, 1273, 1277, 1282, 1286, ! 1289, 1292, 1294, 1299, 1303, 1308, 1314, 1320, 1322, 1324, ! 1326, 1328, 1330, 1333, 1336, 1339, 1342, 1344, 1347, 1350, ! 1353, 1355, 1358, 1361, 1364, 1367, 1369, 1372, 1374, 1376, ! 1378, 1380, 1383, 1384, 1385, 1386, 1387, 1388, 1390, 1392, ! 1395, 1399, 1401, 1404, 1406, 1408, 1414, 1416, 1418, 1421, ! 1424, 1427, 1430, 1431, 1437, 1438, 1443, 1444, 1445, 1447, ! 1450, 1454, 1458, 1462, 1463, 1468, 1470, 1474, 1475, 1476, ! 1484, 1490, 1493, 1494, 1495, 1496, 1497, 1510, 1511, 1518, ! 1521, 1523, 1525, 1528, 1532, 1535, 1538, 1541, 1545, 1552, ! 1561, 1572, 1585, 1589, 1594, 1596, 1600, 1606, 1609, 1615, ! 1616, 1618, 1619, 1621, 1622, 1624, 1626, 1630, 1635, 1643, ! 1645, 1649, 1650, 1654, 1657, 1658, 1659, 1666, 1669, 1670, ! 1672, 1674, 1678, 1680, 1684, 1689, 1694, 1698, 1703, 1707, ! 1712, 1717, 1721, 1726, 1730, 1732, 1733, 1737, 1739, 1742, ! 1744, 1748, 1750, 1754, 1756, 1758, 1760, 1762, 1764, 1766, ! 1768, 1770, 1774, 1778, 1783, 1784, 1785, 1796, 1797, 1804, ! 1805, 1806, 1819, 1820, 1829, 1830, 1837, 1840, 1841, 1850, ! 1855, 1856, 1866, 1872, 1873, 1880, 1884, 1885, 1887, 1891, ! 1895, 1897, 1899, 1901, 1903, 1904, 1908, 1911, 1915, 1919, ! 1921, 1922, 1924, 1929, 1931, 1935, 1938, 1940, 1942, 1943, ! 1944, 1945, 1953, 1954, 1955, 1958, 1960, 1962, 1965, 1966, ! 1970, 1972, 1974, 1975, 1976, 1982, 1987, 1989, 1995, 1998, ! 1999, 2002, 2003, 2005, 2007, 2009, 2012, 2015, 2020, 2023, ! 2026, 2028, 2032, 2035, 2038, 2040, 2041, 2044, 2045, 2049, ! 2051, 2053, 2056, 2058, 2060, 2062, 2064, 2066, 2068, 2070, ! 2072, 2074, 2076, 2078, 2080, 2082, 2084, 2086, 2088, 2090, ! 2092, 2094, 2096, 2098, 2100, 2102, 2104, 2106, 2108, 2115, ! 2119, 2125, 2128, 2130, 2132, 2134, 2137, 2139, 2143, 2146, ! 2148, 2150, 2155, 2157, 2159, 2161, 2164, 2167, 2169, 2174, ! 2179 }; static const short yyrhs[] = { ! -1, 94, 0, 0, 95, 97, 0, 0, 94, 96, ! 97, 0, 98, 0, 100, 0, 99, 0, 295, 0, ! 28, 68, 109, 84, 85, 0, 294, 97, 0, 132, ! 166, 85, 0, 152, 132, 166, 85, 0, 151, 132, ! 165, 85, 0, 158, 85, 0, 1, 85, 0, 1, ! 86, 0, 85, 0, 0, 0, 151, 132, 195, 101, ! 126, 102, 255, 256, 244, 0, 151, 132, 195, 1, ! 0, 0, 0, 152, 132, 200, 103, 126, 104, 255, ! 256, 244, 0, 152, 132, 200, 1, 0, 0, 0, ! 132, 200, 105, 126, 106, 255, 256, 244, 0, 132, ! 200, 1, 0, 3, 0, 4, 0, 81, 0, 76, ! 0, 52, 0, 58, 0, 57, 0, 63, 0, 64, ! 0, 87, 0, 88, 0, 111, 0, 0, 111, 0, ! 117, 0, 111, 89, 117, 0, 123, 0, 59, 116, ! 0, 294, 116, 0, 108, 116, 0, 49, 107, 0, ! 113, 112, 0, 113, 68, 221, 84, 0, 114, 112, ! 0, 114, 68, 221, 84, 0, 34, 116, 0, 35, ! 116, 0, 12, 0, 30, 0, 29, 0, 112, 0, ! 68, 221, 84, 116, 0, 116, 0, 117, 57, 117, ! 0, 117, 58, 117, 0, 117, 59, 117, 0, 117, ! 60, 117, 0, 117, 61, 117, 0, 117, 55, 117, ! 0, 117, 56, 117, 0, 117, 54, 117, 0, 117, ! 53, 117, 0, 117, 52, 117, 0, 117, 50, 117, ! 0, 117, 51, 117, 0, 0, 117, 49, 118, 117, ! 0, 0, 117, 48, 119, 117, 0, 0, 0, 117, ! 46, 120, 109, 47, 121, 117, 0, 0, 117, 46, ! 122, 47, 117, 0, 117, 45, 117, 0, 117, 44, ! 117, 0, 3, 0, 9, 0, 10, 0, 43, 0, ! 0, 68, 221, 84, 90, 124, 181, 86, 0, 68, ! 109, 84, 0, 68, 1, 84, 0, 248, 246, 84, ! 0, 248, 1, 84, 0, 123, 68, 110, 84, 0, ! 36, 68, 117, 89, 221, 84, 0, 37, 68, 117, ! 89, 117, 89, 117, 84, 0, 38, 68, 221, 89, ! 221, 84, 0, 123, 69, 109, 91, 0, 123, 67, ! 107, 0, 123, 66, 107, 0, 123, 63, 0, 123, ! 64, 0, 351, 0, 355, 0, 356, 0, 357, 0, ! 125, 0, 92, 10, 0, 125, 92, 10, 0, 127, ! 0, 0, 129, 0, 255, 256, 130, 0, 128, 0, ! 236, 0, 129, 128, 0, 128, 236, 0, 153, 132, ! 165, 85, 0, 154, 132, 166, 85, 0, 153, 85, ! 0, 154, 85, 0, 255, 256, 134, 0, 0, 172, ! 0, 151, 132, 165, 85, 0, 152, 132, 166, 85, ! 0, 151, 132, 189, 0, 152, 132, 192, 0, 158, ! 85, 0, 294, 134, 0, 8, 0, 135, 8, 0, ! 136, 8, 0, 135, 173, 0, 137, 8, 0, 138, ! 8, 0, 173, 0, 137, 173, 0, 160, 0, 139, ! 8, 0, 140, 8, 0, 139, 162, 0, 140, 162, ! 0, 135, 160, 0, 136, 160, 0, 161, 0, 139, ! 173, 0, 139, 163, 0, 140, 163, 0, 135, 161, ! 0, 136, 161, 0, 141, 8, 0, 142, 8, 0, ! 141, 162, 0, 142, 162, 0, 137, 160, 0, 138, ! 160, 0, 141, 173, 0, 141, 163, 0, 142, 163, ! 0, 137, 161, 0, 138, 161, 0, 178, 0, 143, ! 8, 0, 144, 8, 0, 135, 178, 0, 136, 178, ! 0, 143, 178, 0, 144, 178, 0, 143, 173, 0, ! 145, 8, 0, 146, 8, 0, 137, 178, 0, 138, ! 178, 0, 145, 178, 0, 146, 178, 0, 145, 173, ! 0, 147, 8, 0, 148, 8, 0, 147, 162, 0, ! 148, 162, 0, 143, 160, 0, 144, 160, 0, 139, ! 178, 0, 140, 178, 0, 147, 178, 0, 148, 178, ! 0, 147, 173, 0, 147, 163, 0, 148, 163, 0, ! 143, 161, 0, 144, 161, 0, 149, 8, 0, 150, ! 8, 0, 149, 162, 0, 150, 162, 0, 145, 160, ! 0, 146, 160, 0, 141, 178, 0, 142, 178, 0, ! 149, 178, 0, 150, 178, 0, 149, 173, 0, 149, ! 163, 0, 150, 163, 0, 145, 161, 0, 146, 161, ! 0, 139, 0, 140, 0, 141, 0, 142, 0, 147, ! 0, 148, 0, 149, 0, 150, 0, 135, 0, 136, ! 0, 137, 0, 138, 0, 143, 0, 144, 0, 145, ! 0, 146, 0, 139, 0, 140, 0, 147, 0, 148, ! 0, 135, 0, 136, 0, 143, 0, 144, 0, 139, ! 0, 140, 0, 141, 0, 142, 0, 135, 0, 136, ! 0, 137, 0, 138, 0, 139, 0, 140, 0, 141, ! 0, 142, 0, 135, 0, 136, 0, 137, 0, 138, ! 0, 135, 0, 136, 0, 137, 0, 138, 0, 139, ! 0, 140, 0, 141, 0, 142, 0, 143, 0, 144, ! 0, 145, 0, 146, 0, 147, 0, 148, 0, 149, ! 0, 150, 0, 0, 156, 0, 162, 0, 164, 0, ! 163, 0, 7, 0, 209, 0, 204, 0, 4, 0, ! 76, 311, 0, 81, 311, 0, 312, 0, 115, 68, ! 109, 84, 0, 115, 68, 221, 84, 0, 168, 0, ! 165, 89, 133, 168, 0, 170, 0, 166, 89, 133, ! 170, 0, 0, 28, 68, 10, 84, 0, 0, 195, ! 167, 172, 45, 169, 179, 0, 195, 167, 172, 0, ! 0, 200, 167, 172, 45, 171, 179, 0, 200, 167, ! 172, 0, 0, 173, 0, 174, 0, 173, 174, 0, ! 31, 68, 68, 175, 84, 84, 0, 176, 0, 175, ! 89, 176, 0, 0, 177, 0, 177, 68, 3, 84, ! 0, 177, 68, 3, 89, 111, 84, 0, 177, 68, ! 110, 84, 0, 107, 0, 178, 0, 7, 0, 8, ! 0, 6, 0, 5, 0, 117, 0, 0, 90, 180, ! 181, 86, 0, 1, 0, 0, 182, 210, 0, 183, ! 0, 182, 89, 183, 0, 187, 45, 185, 0, 188, ! 185, 0, 0, 107, 47, 184, 185, 0, 185, 0, ! 0, 90, 186, 181, 86, 0, 117, 0, 1, 0, ! 188, 0, 187, 188, 0, 67, 107, 0, 69, 117, ! 11, 117, 91, 0, 69, 117, 91, 0, 0, 0, ! 195, 190, 126, 191, 255, 256, 249, 0, 0, 0, ! 200, 193, 126, 194, 255, 256, 249, 0, 196, 0, ! 200, 0, 68, 172, 196, 84, 0, 196, 68, 289, ! 0, 196, 229, 0, 59, 159, 196, 0, 4, 0, ! 81, 0, 198, 0, 199, 0, 198, 68, 289, 0, ! 198, 229, 0, 4, 0, 81, 0, 199, 68, 289, ! 0, 199, 229, 0, 59, 159, 198, 0, 59, 159, ! 199, 0, 68, 172, 199, 84, 0, 200, 68, 289, ! 0, 68, 172, 200, 84, 0, 59, 159, 200, 0, ! 200, 229, 0, 3, 0, 14, 0, 14, 173, 0, ! 15, 0, 15, 173, 0, 13, 0, 13, 173, 0, ! 0, 201, 107, 90, 205, 212, 86, 172, 0, 201, ! 90, 212, 86, 172, 0, 0, 202, 107, 90, 206, ! 212, 86, 172, 0, 202, 90, 212, 86, 172, 0, ! 0, 203, 107, 90, 207, 219, 211, 86, 172, 0, ! 0, 203, 90, 208, 219, 211, 86, 172, 0, 201, ! 107, 0, 202, 107, 0, 203, 107, 0, 0, 89, ! 0, 0, 89, 0, 213, 0, 213, 214, 0, 0, ! 213, 214, 85, 0, 213, 85, 0, 74, 68, 76, ! 84, 0, 155, 132, 215, 0, 155, 132, 255, 256, ! 0, 156, 132, 216, 0, 156, 0, 1, 0, 294, ! 214, 0, 217, 0, 215, 89, 133, 217, 0, 218, ! 0, 216, 89, 133, 218, 0, 255, 256, 195, 172, ! 0, 255, 256, 195, 47, 117, 172, 0, 255, 256, ! 47, 117, 172, 0, 255, 256, 200, 172, 0, 255, ! 256, 200, 47, 117, 172, 0, 255, 256, 47, 117, ! 172, 0, 220, 0, 219, 89, 220, 0, 1, 0, ! 107, 0, 107, 45, 117, 0, 0, 157, 222, 223, ! 0, 0, 225, 0, 0, 225, 0, 226, 173, 0, ! 227, 0, 226, 0, 228, 0, 59, 159, 226, 0, ! 59, 159, 0, 59, 159, 227, 0, 68, 172, 225, ! 84, 0, 228, 68, 279, 0, 228, 229, 0, 68, ! 279, 0, 229, 0, 69, 159, 109, 91, 0, 69, ! 159, 91, 0, 69, 159, 59, 91, 0, 69, 6, ! 159, 109, 91, 0, 69, 156, 6, 109, 91, 0, ! 231, 0, 232, 0, 233, 0, 234, 0, 259, 0, ! 231, 259, 0, 232, 259, 0, 233, 259, 0, 234, ! 259, 0, 131, 0, 231, 131, 0, 232, 131, 0, ! 234, 131, 0, 260, 0, 231, 260, 0, 232, 260, ! 0, 233, 260, 0, 234, 260, 0, 236, 0, 235, ! 236, 0, 231, 0, 232, 0, 233, 0, 234, 0, ! 1, 85, 0, 0, 0, 0, 0, 0, 242, 0, ! 243, 0, 242, 243, 0, 33, 293, 85, 0, 249, ! 0, 1, 249, 0, 90, 0, 86, 0, 237, 241, ! 247, 86, 238, 0, 230, 0, 1, 0, 68, 90, ! 0, 245, 246, 0, 251, 258, 0, 251, 1, 0, ! 0, 16, 252, 68, 109, 84, 0, 0, 19, 254, ! 258, 18, 0, 0, 0, 259, 0, 260, 257, 0, ! 239, 257, 240, 0, 255, 256, 271, 0, 255, 256, ! 272, 0, 0, 250, 17, 262, 258, 0, 250, 0, ! 250, 17, 1, 0, 0, 0, 18, 263, 68, 109, ! 84, 264, 258, 0, 253, 68, 109, 84, 85, 0, ! 253, 1, 0, 0, 0, 0, 0, 20, 265, 68, ! 270, 266, 274, 85, 267, 274, 84, 268, 258, 0, ! 0, 21, 68, 109, 84, 269, 258, 0, 274, 85, ! 0, 134, 0, 249, 0, 109, 85, 0, 239, 261, ! 240, 0, 24, 85, 0, 25, 85, 0, 26, 85, ! 0, 26, 109, 85, 0, 28, 273, 68, 109, 84, ! 85, 0, 28, 273, 68, 109, 47, 275, 84, 85, ! 0, 28, 273, 68, 109, 47, 275, 47, 275, 84, ! 85, 0, 28, 273, 68, 109, 47, 275, 47, 275, ! 47, 278, 84, 85, 0, 27, 107, 85, 0, 27, ! 59, 109, 85, 0, 85, 0, 22, 117, 47, 0, ! 22, 117, 11, 117, 47, 0, 23, 47, 0, 107, ! 255, 256, 47, 172, 0, 0, 8, 0, 0, 109, ! 0, 0, 276, 0, 277, 0, 276, 89, 277, 0, ! 10, 68, 109, 84, 0, 69, 107, 91, 10, 68, ! 109, 84, 0, 10, 0, 278, 89, 10, 0, 0, ! 172, 280, 281, 0, 284, 84, 0, 0, 0, 285, ! 85, 282, 172, 283, 281, 0, 1, 84, 0, 0, ! 11, 0, 285, 0, 285, 89, 11, 0, 287, 0, ! 285, 89, 286, 0, 151, 132, 197, 172, 0, 151, ! 132, 200, 172, 0, 151, 132, 224, 0, 152, 132, ! 200, 172, 0, 152, 132, 224, 0, 153, 288, 197, ! 172, 0, 153, 288, 200, 172, 0, 153, 288, 224, ! 0, 154, 288, 200, 172, 0, 154, 288, 224, 0, ! 132, 0, 0, 172, 290, 291, 0, 281, 0, 292, ! 84, 0, 3, 0, 292, 89, 3, 0, 107, 0, ! 293, 89, 107, 0, 32, 0, 299, 0, 297, 0, ! 298, 0, 309, 0, 320, 0, 72, 0, 107, 0, ! 296, 89, 107, 0, 82, 296, 85, 0, 83, 107, ! 107, 85, 0, 0, 0, 70, 107, 311, 90, 300, ! 313, 86, 301, 324, 72, 0, 0, 70, 107, 311, ! 302, 324, 72, 0, 0, 0, 70, 107, 47, 107, ! 311, 90, 303, 313, 86, 304, 324, 72, 0, 0, ! 70, 107, 47, 107, 311, 305, 324, 72, 0, 0, ! 71, 107, 90, 306, 313, 86, 0, 71, 107, 0, ! 0, 71, 107, 47, 107, 90, 307, 313, 86, 0, ! 71, 107, 47, 107, 0, 0, 70, 107, 68, 107, ! 84, 311, 308, 324, 72, 0, 71, 107, 68, 107, ! 84, 0, 0, 80, 107, 311, 310, 324, 72, 0, ! 80, 296, 85, 0, 0, 312, 0, 54, 296, 54, ! 0, 313, 314, 315, 0, 315, 0, 78, 0, 79, ! 0, 77, 0, 0, 315, 316, 85, 0, 315, 85, ! 0, 155, 132, 317, 0, 156, 132, 317, 0, 1, ! 0, 0, 318, 0, 317, 89, 133, 318, 0, 195, ! 0, 195, 47, 117, 0, 47, 117, 0, 57, 0, ! 58, 0, 0, 0, 0, 319, 321, 332, 322, 333, ! 323, 244, 0, 0, 0, 325, 326, 0, 329, 0, ! 99, 0, 326, 329, 0, 0, 326, 327, 99, 0, ! 85, 0, 1, 0, 0, 0, 319, 330, 332, 331, ! 328, 0, 68, 221, 84, 341, 0, 341, 0, 68, ! 221, 84, 342, 339, 0, 342, 339, 0, 0, 85, ! 334, 0, 0, 335, 0, 336, 0, 236, 0, 335, ! 336, 0, 336, 236, 0, 151, 132, 337, 85, 0, ! 151, 85, 0, 152, 85, 0, 338, 0, 337, 89, ! 338, 0, 197, 172, 0, 200, 172, 0, 224, 0, ! 0, 89, 11, 0, 0, 89, 340, 284, 0, 343, ! 0, 345, 0, 342, 345, 0, 3, 0, 4, 0, ! 76, 0, 81, 0, 344, 0, 13, 0, 14, 0, ! 15, 0, 16, 0, 17, 0, 18, 0, 19, 0, ! 20, 0, 21, 0, 22, 0, 23, 0, 24, 0, ! 25, 0, 26, 0, 27, 0, 28, 0, 12, 0, ! 29, 0, 30, 0, 7, 0, 8, 0, 343, 47, ! 68, 221, 84, 107, 0, 343, 47, 107, 0, 47, ! 68, 221, 84, 107, 0, 47, 107, 0, 343, 0, ! 347, 0, 349, 0, 347, 349, 0, 111, 0, 343, ! 47, 348, 0, 47, 348, 0, 109, 0, 76, 0, ! 69, 350, 346, 91, 0, 343, 0, 353, 0, 354, ! 0, 353, 354, 0, 343, 47, 0, 47, 0, 73, ! 68, 352, 84, 0, 80, 68, 107, 84, 0, 75, ! 68, 221, 84, 0 }; ! #endif ! ! #if YYDEBUG ! /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ ! static const short yyrline[] = { ! 0, 344, 349, 367, 367, 369, 369, 372, 377, 379, ! 380, 381, 389, 393, 401, 403, 405, 407, 408, 409, ! 414, 414, 414, 427, 429, 429, 429, 441, 443, 443, ! 443, 455, 459, 461, 462, 463, 466, 468, 470, 473, ! 475, 477, 479, 483, 487, 490, 493, 496, 500, 502, ! 505, 508, 512, 514, 520, 523, 526, 529, 531, 535, ! 539, 543, 547, 549, 553, 555, 557, 559, 561, 563, ! 565, 567, 569, 571, 573, 575, 577, 579, 579, 586, ! 586, 593, 593, 593, 603, 603, 614, 621, 632, 639, ! 640, 642, 644, 644, 657, 662, 664, 680, 687, 689, ! 692, 702, 712, 714, 721, 730, 732, 734, 736, 738, ! 740, 742, 748, 751, 755, 762, 770, 776, 781, 783, ! 784, 785, 792, 795, 797, 800, 808, 817, 827, 832, ! 835, 837, 839, 841, 843, 899, 903, 906, 911, 917, ! 921, 926, 930, 935, 939, 942, 945, 948, 951, 954, ! 959, 963, 966, 969, 972, 975, 980, 984, 987, 990, ! 993, 996, 1001, 1005, 1008, 1011, 1014, 1019, 1023, 1026, ! 1029, 1035, 1041, 1047, 1055, 1061, 1065, 1068, 1074, 1080, ! 1086, 1094, 1100, 1104, 1107, 1110, 1113, 1116, 1119, 1125, ! 1131, 1137, 1145, 1149, 1152, 1155, 1158, 1163, 1167, 1170, ! 1173, 1176, 1179, 1182, 1188, 1194, 1200, 1208, 1212, 1215, ! 1218, 1221, 1227, 1229, 1230, 1231, 1232, 1233, 1234, 1235, ! 1238, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1249, 1251, ! 1252, 1253, 1256, 1258, 1259, 1260, 1263, 1265, 1266, 1267, ! 1270, 1272, 1273, 1274, 1277, 1279, 1280, 1281, 1282, 1283, ! 1284, 1285, 1288, 1290, 1291, 1292, 1293, 1294, 1295, 1296, ! 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1308, 1311, ! 1336, 1338, 1341, 1345, 1348, 1351, 1355, 1360, 1362, 1367, ! 1369, 1371, 1377, 1379, 1382, 1384, 1387, 1390, 1394, 1394, ! 1403, 1410, 1410, 1419, 1426, 1429, 1433, 1436, 1440, 1445, ! 1448, 1452, 1455, 1457, 1459, 1461, 1468, 1470, 1471, 1472, ! 1475, 1477, 1482, 1484, 1484, 1488, 1493, 1497, 1500, 1502, ! 1507, 1511, 1514, 1514, 1520, 1523, 1523, 1528, 1530, 1533, ! 1535, 1538, 1541, 1545, 1549, 1549, 1549, 1580, 1580, 1580, ! 1614, 1616, 1621, 1624, 1629, 1631, 1633, 1634, 1641, 1643, ! 1646, 1652, 1654, 1655, 1658, 1664, 1666, 1668, 1670, 1677, ! 1683, 1685, 1687, 1689, 1692, 1695, 1699, 1702, 1706, 1709, ! 1719, 1719, 1726, 1730, 1730, 1734, 1738, 1738, 1743, 1743, ! 1750, 1753, 1755, 1763, 1765, 1768, 1770, 1775, 1778, 1783, ! 1785, 1787, 1791, 1806, 1810, 1820, 1823, 1828, 1830, 1835, ! 1837, 1841, 1843, 1847, 1851, 1855, 1860, 1864, 1868, 1878, ! 1880, 1885, 1890, 1893, 1897, 1897, 1905, 1908, 1911, 1916, ! 1920, 1926, 1928, 1931, 1933, 1937, 1940, 1944, 1947, 1949, ! 1951, 1953, 1959, 1962, 1964, 1966, 1969, 1979, 1981, 1982, ! 1986, 1989, 1991, 1992, 1993, 1994, 1997, 1999, 2002, 2003, ! 2006, 2008, 2009, 2010, 2011, 2014, 2016, 2019, 2021, 2022, ! 2023, 2026, 2029, 2038, 2043, 2061, 2076, 2078, 2083, 2085, ! 2088, 2102, 2105, 2108, 2112, 2114, 2121, 2123, 2126, 2144, ! 2151, 2157, 2160, 2160, 2182, 2182, 2202, 2208, 2214, 2216, ! 2220, 2226, 2240, 2249, 2249, 2258, 2270, 2280, 2280, 2280, ! 2290, 2293, 2295, 2295, 2295, 2295, 2295, 2310, 2310, 2317, ! 2320, 2325, 2328, 2331, 2335, 2338, 2341, 2344, 2347, 2351, ! 2355, 2360, 2364, 2376, 2382, 2390, 2393, 2396, 2399, 2414, ! 2418, 2422, 2425, 2430, 2432, 2435, 2437, 2441, 2444, 2450, ! 2453, 2462, 2462, 2473, 2475, 2475, 2475, 2488, 2494, 2496, ! 2506, 2510, 2514, 2517, 2523, 2529, 2534, 2537, 2543, 2550, ! 2556, 2561, 2564, 2570, 2575, 2584, 2584, 2595, 2597, 2614, ! 2617, 2622, 2625, 2629, 2640, 2642, 2643, 2644, 2645, 2646, ! 2660, 2663, 2667, 2674, 2681, 2681, 2681, 2699, 2699, 2712, ! 2712, 2712, 2729, 2729, 2742, 2742, 2754, 2762, 2762, 2774, ! 2782, 2782, 2795, 2804, 2804, 2820, 2826, 2831, 2834, 2844, ! 2846, 2849, 2851, 2852, 2855, 2860, 2861, 2878, 2882, 2885, ! 2889, 2892, 2893, 2896, 2904, 2910, 2919, 2922, 2926, 2926, ! 2926, 2926, 2956, 2958, 2958, 2961, 2963, 2964, 2965, 2965, ! 2968, 2970, 2973, 2973, 2973, 2991, 2997, 3002, 3007, 3016, ! 3018, 3024, 3026, 3029, 3031, 3032, 3033, 3036, 3039, 3041, ! 3045, 3048, 3055, 3060, 3064, 3068, 3073, 3078, 3078, 3090, ! 3094, 3097, 3103, 3105, 3106, 3107, 3108, 3111, 3112, 3112, ! 3112, 3112, 3112, 3112, 3112, 3113, 3113, 3113, 3113, 3113, ! 3113, 3114, 3114, 3114, 3114, 3114, 3115, 3115, 3118, 3124, ! 3129, 3134, 3140, 3142, 3145, 3147, 3154, 3166, 3171, 3177, ! 3179, 3185, 3190, 3192, 3195, 3197, 3203, 3208, 3214, 3221, ! 3230 }; #endif ! ! #if (YYDEBUG) || defined YYERROR_VERBOSE ! ! /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ static const char *const yytname[] = { ! "$", "error", "$undefined.", "IDENTIFIER", "TYPENAME", "SCSPEC", "STATIC", "TYPESPEC", "TYPE_QUAL", "CONSTANT", "STRING", "ELLIPSIS", "SIZEOF", "ENUM", "STRUCT", "UNION", "IF", "ELSE", "WHILE", "DO", "FOR", "SWITCH", "CASE", "DEFAULT", "BREAK", "CONTINUE", "RETURN", "GOTO", "ASM_KEYWORD", "TYPEOF", "ALIGNOF", "ATTRIBUTE", "EXTENSION", "LABEL", "REALPART", "IMAGPART", "VA_ARG", "CHOOSE_EXPR", "TYPES_COMPATIBLE_P", "PTR_VALUE", ! "PTR_BASE", "PTR_EXTENT", "STRING_FUNC_NAME", "VAR_FUNC_NAME", "ASSIGN", ! "'='", "'?'", "':'", "OROR", "ANDAND", "'|'", "'^'", "'&'", "EQCOMPARE", ! "ARITHCOMPARE", "LSHIFT", "RSHIFT", "'+'", "'-'", "'*'", "'/'", "'%'", ! "UNARY", "PLUSPLUS", "MINUSMINUS", "HYPERUNARY", "POINTSAT", "'.'", ! "'('", "'['", "INTERFACE", "IMPLEMENTATION", "END", "SELECTOR", "DEFS", ! "ENCODE", "CLASSNAME", "PUBLIC", "PRIVATE", "PROTECTED", "PROTOCOL", ! "OBJECTNAME", "CLASS", "ALIAS", "')'", "';'", "'}'", "'~'", "'!'", ! "','", "'{'", "']'", "'@'", "program", "extdefs", "@1", "@2", "extdef", ! "extdef_1", "datadef", "fndef", "@3", "@4", "@5", "@6", "@7", "@8", ! "identifier", "unop", "expr", "exprlist", "nonnull_exprlist", ! "unary_expr", "sizeof", "alignof", "typeof", "cast_expr", ! "expr_no_commas", "@9", "@10", "@11", "@12", "@13", "primary", "@14", ! "objc_string", "old_style_parm_decls", "old_style_parm_decls_1", "lineno_datadecl", "datadecls", "datadecl", "lineno_decl", "setspecs", "maybe_resetattrs", "decl", "declspecs_nosc_nots_nosa_noea", "declspecs_nosc_nots_nosa_ea", "declspecs_nosc_nots_sa_noea", *************** static const char *const yytname[] = *** 929,935 **** "typespec_nonreserved_nonattr", "initdecls", "notype_initdecls", "maybeasm", "initdcl", "@15", "notype_initdcl", "@16", "maybe_attribute", "attributes", "attribute", "attribute_list", ! "attrib", "any_word", "init", "@17", "initlist_maybe_comma", "initlist1", "initelt", "@18", "initval", "@19", "designator_list", "designator", "nested_function", "@20", "@21", "notype_nested_function", "@22", "@23", "declarator", "after_type_declarator", "parm_declarator", --- 715,721 ---- "typespec_nonreserved_nonattr", "initdecls", "notype_initdecls", "maybeasm", "initdcl", "@15", "notype_initdcl", "@16", "maybe_attribute", "attributes", "attribute", "attribute_list", ! "attrib", "any_word", "scspec", "init", "@17", "initlist_maybe_comma", "initlist1", "initelt", "@18", "initval", "@19", "designator_list", "designator", "nested_function", "@20", "@21", "notype_nested_function", "@22", "@23", "declarator", "after_type_declarator", "parm_declarator", *************** static const char *const yytname[] = *** 969,1080 **** "mydecls", "mydecl", "myparms", "myparm", "optparmlist", "@60", "unaryselector", "keywordselector", "selector", "reservedwords", "keyworddecl", "messageargs", "keywordarglist", "keywordexpr", ! "keywordarg", "receiver", "objcmessageexpr", "@61", "@62", ! "selectorarg", "keywordnamelist", "keywordname", "objcselectorexpr", "objcprotocolexpr", "objcencodeexpr", 0 }; #endif ! # ifdef YYPRINT ! /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to ! token YYLEX-NUM. */ ! static const unsigned short yytoknum[] = ! { ! 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, ! 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, ! 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, ! 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, ! 295, 296, 297, 61, 298, 63, 58, 299, 300, 124, ! 94, 38, 301, 302, 303, 304, 43, 45, 42, 47, ! 37, 305, 306, 307, 308, 46, 40, 91, 309, 310, ! 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, ! 321, 322, 323, 41, 59, 125, 126, 33, 44, 123, ! 93, 64 ! }; ! # endif ! ! /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ ! static const unsigned short yyr1[] = { ! 0, 92, 93, 93, 95, 94, 96, 94, 97, 97, ! 97, 97, 97, 98, 98, 98, 98, 98, 98, 98, ! 100, 101, 99, 99, 102, 103, 99, 99, 104, 105, ! 99, 99, 106, 106, 106, 106, 107, 107, 107, 107, ! 107, 107, 107, 108, 109, 109, 110, 110, 111, 111, ! 111, 111, 111, 111, 111, 111, 111, 111, 111, 112, ! 113, 114, 115, 115, 116, 116, 116, 116, 116, 116, ! 116, 116, 116, 116, 116, 116, 116, 117, 116, 118, ! 116, 119, 120, 116, 121, 116, 116, 116, 122, 122, ! 122, 122, 123, 122, 122, 122, 122, 122, 122, 122, ! 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, ! 122, 122, 124, 124, 125, 125, 126, 126, 126, 127, ! 128, 128, 128, 128, 129, 129, 129, 129, 130, 131, ! 132, 133, 133, 133, 133, 133, 133, 134, 134, 134, ! 135, 136, 136, 137, 137, 138, 138, 138, 138, 138, ! 138, 138, 139, 139, 139, 139, 139, 139, 140, 140, ! 140, 140, 140, 140, 141, 141, 141, 141, 141, 142, ! 142, 142, 142, 142, 142, 142, 143, 144, 144, 144, ! 144, 144, 144, 145, 146, 146, 146, 146, 146, 146, ! 146, 146, 146, 146, 147, 147, 147, 147, 147, 148, ! 148, 148, 148, 148, 148, 148, 148, 148, 148, 149, ! 149, 149, 149, 149, 150, 150, 150, 150, 150, 150, 150, 150, 151, 151, 151, 151, 151, 151, 151, 151, ! 152, 152, 152, 152, 153, 153, 153, 153, 154, 154, ! 154, 154, 155, 155, 155, 155, 156, 156, 156, 156, 156, 156, 156, 156, 157, 157, 157, 157, 157, 157, ! 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, ! 158, 158, 159, 159, 160, 161, 161, 162, 163, 163, ! 163, 163, 163, 163, 164, 164, 165, 165, 166, 166, ! 168, 167, 167, 170, 169, 169, 171, 171, 172, 172, ! 173, 174, 174, 175, 175, 175, 175, 175, 176, 176, ! 176, 176, 177, 178, 177, 177, 179, 179, 180, 180, ! 181, 181, 182, 181, 181, 184, 183, 183, 183, 185, ! 185, 186, 188, 189, 187, 191, 192, 190, 193, 193, ! 194, 194, 194, 194, 194, 194, 195, 195, 196, 196, ! 196, 196, 197, 197, 197, 197, 197, 198, 198, 198, ! 198, 198, 199, 199, 200, 200, 201, 201, 203, 202, ! 202, 204, 202, 202, 205, 202, 206, 202, 207, 207, ! 207, 208, 208, 209, 209, 210, 210, 211, 211, 211, ! 211, 212, 212, 212, 212, 212, 212, 213, 213, 214, ! 214, 215, 215, 215, 216, 216, 216, 217, 217, 217, ! 218, 218, 220, 219, 221, 221, 222, 222, 222, 223, ! 223, 224, 224, 225, 225, 226, 226, 226, 226, 226, ! 227, 227, 227, 227, 227, 227, 227, 227, 227, 228, ! 228, 228, 228, 229, 229, 229, 229, 229, 230, 230, ! 230, 230, 231, 231, 231, 231, 231, 232, 232, 233, ! 233, 233, 233, 234, 235, 236, 237, 238, 239, 239, ! 240, 240, 241, 242, 242, 243, 244, 244, 245, 245, ! 246, 247, 248, 248, 250, 249, 252, 251, 253, 254, ! 255, 255, 256, 257, 258, 260, 259, 259, 259, 261, ! 262, 259, 259, 259, 263, 264, 265, 266, 259, 267, ! 259, 268, 268, 269, 269, 269, 269, 269, 269, 269, ! 269, 269, 269, 269, 269, 269, 269, 270, 270, 270, ! 270, 271, 271, 272, 272, 273, 273, 274, 274, 275, ! 275, 276, 276, 278, 277, 279, 280, 281, 279, 279, ! 282, 282, 282, 282, 283, 283, 284, 284, 284, 284, ! 284, 285, 285, 285, 285, 285, 286, 288, 287, 289, ! 289, 290, 290, 291, 291, 292, 293, 293, 293, 293, ! 293, 293, 294, 294, 295, 296, 298, 299, 297, 300, ! 297, 301, 302, 297, 303, 297, 304, 297, 297, 305, ! 297, 297, 306, 297, 297, 308, 307, 307, 309, 309, ! 310, 311, 311, 312, 312, 312, 313, 313, 313, 314, ! 314, 314, 315, 315, 315, 316, 316, 316, 317, 317, ! 319, 320, 321, 318, 322, 323, 322, 324, 324, 324, ! 325, 324, 326, 326, 328, 329, 327, 330, 330, 330, ! 330, 331, 331, 332, 332, 333, 333, 333, 333, 334, ! 334, 334, 335, 335, 336, 336, 336, 337, 337, 338, ! 337, 339, 340, 340, 341, 341, 341, 341, 341, 342, ! 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, ! 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, ! 343, 343, 343, 343, 344, 344, 345, 345, 346, 347, ! 347, 348, 348, 350, 351, 349, 352, 352, 353, 353, ! 354, 354, 355, 356, 357 }; ! /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ ! static const unsigned char yyr2[] = { ! 0, 2, 0, 1, 0, 2, 0, 3, 1, 1, 1, 5, 2, 3, 4, 4, 2, 2, 2, 1, 0, 0, 9, 4, 0, 0, 9, 4, 0, 0, 8, 3, 1, 1, 1, 1, 1, 1, 1, 1, --- 755,848 ---- "mydecls", "mydecl", "myparms", "myparm", "optparmlist", "@60", "unaryselector", "keywordselector", "selector", "reservedwords", "keyworddecl", "messageargs", "keywordarglist", "keywordexpr", ! "keywordarg", "receiver", "objcmessageexpr", "selectorarg", ! "keywordnamelist", "keywordname", "objcselectorexpr", "objcprotocolexpr", "objcencodeexpr", 0 }; #endif ! /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ ! static const short yyr1[] = { ! 0, 93, 93, 95, 94, 96, 94, 97, 98, 98, ! 98, 98, 98, 99, 99, 99, 99, 99, 99, 99, ! 101, 102, 100, 100, 103, 104, 100, 100, 105, 106, ! 100, 100, 107, 107, 107, 107, 108, 108, 108, 108, ! 108, 108, 108, 109, 110, 110, 111, 111, 112, 112, ! 112, 112, 112, 112, 112, 112, 112, 112, 112, 113, ! 114, 115, 116, 116, 117, 117, 117, 117, 117, 117, ! 117, 117, 117, 117, 117, 117, 117, 118, 117, 119, ! 117, 120, 121, 117, 122, 117, 117, 117, 123, 123, ! 123, 123, 124, 123, 123, 123, 123, 123, 123, 123, ! 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, ! 123, 123, 125, 125, 126, 127, 127, 128, 129, 129, ! 129, 129, 130, 130, 130, 130, 131, 132, 133, 134, ! 134, 134, 134, 134, 134, 135, 135, 135, 136, 137, ! 137, 138, 138, 139, 139, 139, 139, 139, 139, 139, ! 140, 140, 140, 140, 140, 140, 141, 141, 141, 141, ! 141, 141, 142, 142, 142, 142, 142, 143, 143, 143, ! 143, 143, 143, 143, 144, 145, 145, 145, 145, 145, ! 145, 146, 147, 147, 147, 147, 147, 147, 147, 147, ! 147, 147, 148, 148, 148, 148, 148, 149, 149, 149, ! 149, 149, 149, 149, 149, 149, 149, 150, 150, 150, 150, 150, 151, 151, 151, 151, 151, 151, 151, 151, ! 152, 152, 152, 152, 152, 152, 152, 152, 153, 153, ! 153, 153, 154, 154, 154, 154, 155, 155, 155, 155, 156, 156, 156, 156, 157, 157, 157, 157, 157, 157, ! 157, 157, 158, 158, 158, 158, 158, 158, 158, 158, ! 158, 158, 158, 158, 158, 158, 158, 158, 159, 159, ! 160, 160, 161, 162, 162, 163, 164, 164, 164, 164, ! 164, 164, 165, 165, 166, 166, 167, 167, 169, 168, ! 168, 171, 170, 170, 172, 172, 173, 173, 174, 175, ! 175, 176, 176, 176, 176, 176, 177, 177, 177, 177, ! 178, 178, 179, 180, 179, 179, 181, 181, 182, 182, ! 183, 183, 184, 183, 183, 186, 185, 185, 185, 187, ! 187, 188, 188, 188, 190, 191, 189, 193, 194, 192, ! 195, 195, 196, 196, 196, 196, 196, 196, 197, 197, ! 198, 198, 198, 198, 199, 199, 199, 199, 199, 200, ! 200, 200, 200, 200, 201, 201, 202, 202, 203, 203, ! 205, 204, 204, 206, 204, 204, 207, 204, 208, 204, ! 209, 209, 209, 210, 210, 211, 211, 212, 212, 213, ! 213, 213, 213, 214, 214, 214, 214, 214, 214, 215, ! 215, 216, 216, 217, 217, 217, 218, 218, 218, 219, ! 219, 219, 220, 220, 222, 221, 223, 223, 224, 224, ! 224, 225, 225, 226, 226, 227, 227, 228, 228, 228, ! 228, 228, 229, 229, 229, 229, 229, 230, 230, 230, ! 230, 231, 231, 231, 231, 231, 232, 232, 232, 232, ! 233, 233, 233, 233, 233, 234, 234, 235, 235, 235, ! 235, 236, 237, 238, 239, 240, 241, 241, 242, 242, ! 243, 244, 244, 245, 246, 246, 247, 247, 248, 249, ! 250, 250, 252, 251, 254, 253, 255, 256, 257, 257, ! 258, 259, 260, 262, 261, 261, 261, 263, 264, 261, ! 261, 261, 265, 266, 267, 268, 261, 269, 261, 270, ! 270, 271, 271, 271, 271, 271, 271, 271, 271, 271, ! 271, 271, 271, 271, 271, 272, 272, 272, 272, 273, ! 273, 274, 274, 275, 275, 276, 276, 277, 277, 278, ! 278, 280, 279, 281, 282, 283, 281, 281, 284, 284, ! 284, 284, 285, 285, 286, 286, 286, 286, 286, 287, ! 287, 287, 287, 287, 288, 290, 289, 291, 291, 292, ! 292, 293, 293, 294, 295, 295, 295, 295, 295, 295, ! 296, 296, 297, 298, 300, 301, 299, 302, 299, 303, ! 304, 299, 305, 299, 306, 299, 299, 307, 299, 299, ! 308, 299, 299, 310, 309, 309, 311, 311, 312, 313, ! 313, 314, 314, 314, 315, 315, 315, 316, 316, 316, ! 317, 317, 317, 318, 318, 318, 319, 319, 321, 322, ! 323, 320, 324, 325, 324, 326, 326, 326, 327, 326, ! 328, 328, 330, 331, 329, 332, 332, 332, 332, 333, ! 333, 334, 334, 335, 335, 335, 335, 336, 336, 336, ! 337, 337, 338, 338, 338, 339, 339, 340, 339, 341, ! 342, 342, 343, 343, 343, 343, 343, 344, 344, 344, ! 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, ! 344, 344, 344, 344, 344, 344, 344, 344, 345, 345, ! 345, 345, 346, 346, 347, 347, 348, 349, 349, 350, ! 350, 351, 352, 352, 353, 353, 354, 354, 355, 356, ! 357 }; ! /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ ! static const short yyr2[] = { ! 0, 0, 1, 0, 2, 0, 3, 1, 1, 1, 1, 5, 2, 3, 4, 4, 2, 2, 2, 1, 0, 0, 9, 4, 0, 0, 9, 4, 0, 0, 8, 3, 1, 1, 1, 1, 1, 1, 1, 1, *************** static const unsigned char yyr2[] = *** 1085,2600 **** 4, 0, 0, 7, 0, 5, 3, 3, 1, 1, 1, 1, 0, 7, 3, 3, 3, 3, 4, 6, 8, 6, 4, 3, 3, 2, 2, 1, 1, 1, ! 1, 1, 1, 2, 2, 3, 0, 1, 2, 3, ! 1, 1, 2, 2, 4, 4, 2, 2, 3, 0, ! 1, 4, 4, 3, 3, 2, 2, 1, 2, 2, ! 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, ! 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, ! 2, 1, 4, 4, 1, 4, 1, 4, 0, 4, ! 0, 6, 3, 0, 6, 3, 0, 1, 1, 2, ! 6, 1, 3, 0, 1, 4, 6, 4, 1, 1, 1, 1, 1, 0, 4, 1, 0, 2, 1, 3, 3, 2, 0, 4, 1, 0, 4, 1, 1, 1, ! 2, 2, 0, 0, 7, 0, 0, 7, 1, 1, ! 4, 3, 2, 3, 1, 1, 1, 1, 3, 2, ! 1, 1, 3, 2, 3, 3, 4, 3, 4, 3, ! 2, 1, 1, 2, 1, 2, 1, 2, 0, 7, ! 5, 0, 7, 5, 0, 8, 0, 7, 2, 2, ! 2, 0, 1, 0, 1, 1, 2, 0, 3, 2, ! 4, 3, 4, 3, 1, 1, 2, 1, 4, 1, ! 4, 4, 6, 5, 4, 6, 5, 1, 3, 1, ! 1, 3, 0, 3, 0, 1, 0, 1, 2, 1, ! 1, 1, 3, 2, 3, 4, 3, 2, 2, 1, ! 3, 4, 2, 3, 3, 4, 4, 5, 5, 1, ! 1, 1, 1, 1, 2, 2, 2, 2, 1, 2, ! 2, 2, 1, 2, 2, 2, 2, 1, 2, 1, ! 1, 1, 1, 2, 0, 0, 0, 0, 0, 1, ! 1, 2, 3, 1, 2, 1, 1, 5, 1, 1, ! 2, 2, 2, 2, 0, 5, 0, 4, 0, 0, ! 1, 2, 3, 3, 3, 0, 4, 1, 3, 0, ! 0, 7, 5, 2, 0, 0, 0, 0, 12, 0, ! 6, 2, 1, 1, 2, 3, 2, 2, 2, 3, ! 6, 8, 10, 12, 3, 4, 1, 3, 5, 2, ! 5, 0, 1, 0, 1, 0, 1, 1, 3, 4, ! 7, 1, 3, 0, 3, 2, 0, 0, 6, 2, ! 0, 1, 1, 3, 1, 3, 4, 4, 3, 4, ! 3, 4, 4, 3, 4, 3, 1, 0, 3, 1, ! 2, 1, 3, 1, 3, 1, 1, 1, 1, 1, ! 1, 1, 1, 3, 3, 4, 0, 0, 10, 0, ! 6, 0, 0, 12, 0, 8, 0, 6, 2, 0, ! 8, 4, 0, 9, 5, 0, 6, 3, 0, 1, ! 3, 3, 1, 1, 1, 1, 0, 3, 2, 3, ! 3, 1, 0, 1, 4, 1, 3, 2, 1, 1, ! 0, 0, 0, 7, 0, 0, 2, 1, 1, 2, ! 0, 3, 1, 1, 0, 0, 5, 4, 1, 5, ! 2, 0, 2, 0, 1, 1, 1, 2, 2, 4, ! 2, 2, 1, 3, 2, 2, 1, 0, 2, 0, ! 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 6, 3, 5, 2, 1, 1, 1, 2, 1, 3, ! 2, 1, 1, 0, 0, 6, 1, 1, 1, 2, ! 2, 1, 4, 4, 4 }; ! /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state ! STATE-NUM when YYTABLE doesn't specify something else to do. Zero ! means the default is an error. */ ! static const unsigned short yydefact[] = { ! 4, 0, 6, 0, 1, 0, 0, 278, 169, 275, ! 137, 366, 362, 364, 0, 61, 0, 575, 0, 628, ! 629, 0, 0, 581, 608, 0, 608, 0, 0, 19, ! 5, 9, 8, 0, 0, 222, 223, 224, 225, 214, ! 215, 216, 217, 226, 227, 228, 229, 218, 219, 220, ! 221, 129, 129, 0, 145, 152, 272, 274, 273, 143, ! 298, 0, 0, 0, 277, 276, 0, 10, 577, 578, ! 576, 579, 281, 630, 580, 7, 17, 18, 367, 363, ! 365, 0, 0, 32, 33, 35, 34, 582, 0, 608, ! 598, 279, 609, 608, 0, 280, 0, 0, 0, 361, ! 270, 296, 0, 286, 0, 172, 138, 150, 156, 140, ! 173, 139, 151, 157, 179, 141, 162, 167, 144, 180, ! 142, 163, 168, 190, 146, 148, 154, 153, 191, 147, ! 149, 155, 205, 158, 160, 165, 164, 206, 159, 161, ! 166, 174, 170, 188, 197, 176, 175, 171, 189, 198, ! 181, 177, 203, 212, 183, 182, 178, 204, 213, 192, ! 184, 186, 195, 194, 193, 185, 187, 196, 207, 199, ! 201, 210, 209, 208, 200, 202, 211, 0, 0, 16, ! 299, 387, 378, 387, 379, 376, 380, 12, 0, 88, ! 89, 112, 59, 60, 0, 0, 0, 0, 0, 91, ! 0, 36, 38, 37, 0, 40, 39, 0, 713, 0, ! 0, 0, 41, 42, 0, 0, 0, 43, 62, 0, ! 0, 64, 46, 48, 90, 111, 0, 0, 107, 108, ! 109, 110, 303, 610, 0, 0, 0, 589, 0, 0, ! 596, 605, 607, 584, 0, 0, 250, 251, 252, 253, ! 246, 247, 248, 249, 412, 0, 242, 243, 244, 245, ! 271, 0, 0, 297, 13, 296, 31, 0, 296, 0, ! 0, 296, 360, 344, 270, 296, 345, 0, 284, 0, ! 338, 339, 0, 0, 0, 0, 0, 368, 0, 371, ! 0, 374, 674, 675, 698, 699, 695, 679, 680, 681, ! 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, ! 692, 693, 694, 696, 697, 0, 0, 676, 677, 631, ! 648, 667, 671, 678, 672, 57, 58, 0, 0, 0, ! 52, 49, 0, 480, 0, 0, 0, 0, 0, 0, ! 114, 51, 0, 0, 0, 53, 0, 55, 0, 0, ! 81, 79, 77, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 106, 105, 0, 44, 0, ! 0, 113, 0, 0, 476, 468, 0, 50, 309, 310, ! 311, 308, 0, 301, 304, 583, 608, 0, 586, 635, ! 601, 0, 616, 635, 585, 282, 414, 283, 359, 0, ! 0, 130, 0, 567, 357, 0, 0, 432, 0, 0, ! 0, 29, 0, 488, 121, 489, 295, 0, 0, 15, ! 296, 23, 0, 296, 296, 342, 14, 27, 0, 0, ! 296, 395, 389, 242, 243, 244, 245, 238, 239, 240, ! 241, 129, 129, 386, 0, 387, 296, 387, 409, 410, ! 383, 407, 0, 0, 703, 0, 651, 669, 650, 0, ! 673, 0, 0, 0, 0, 95, 94, 0, 712, 711, ! 714, 721, 716, 0, 717, 718, 0, 0, 11, 47, ! 0, 0, 86, 87, 0, 0, 0, 0, 75, 76, ! 74, 73, 72, 71, 70, 65, 66, 67, 68, 69, ! 103, 0, 45, 0, 104, 115, 97, 0, 0, 469, ! 470, 96, 0, 303, 44, 594, 608, 616, 0, 0, ! 599, 604, 0, 0, 0, 270, 296, 413, 415, 420, ! 419, 421, 429, 358, 287, 288, 0, 0, 0, 0, ! 434, 430, 0, 0, 433, 0, 463, 488, 123, 118, ! 122, 0, 293, 343, 0, 0, 21, 292, 341, 25, ! 0, 370, 488, 488, 388, 396, 0, 373, 0, 0, ! 384, 0, 383, 0, 0, 0, 632, 668, 550, 0, ! 701, 0, 0, 0, 92, 63, 0, 720, 722, 0, ! 719, 724, 723, 54, 56, 0, 0, 80, 78, 98, ! 102, 573, 0, 479, 448, 478, 488, 488, 488, 488, ! 0, 457, 0, 489, 443, 452, 471, 300, 302, 88, ! 0, 591, 635, 602, 0, 590, 638, 0, 129, 129, ! 644, 640, 637, 616, 615, 613, 614, 597, 616, 621, ! 618, 129, 129, 0, 606, 423, 543, 428, 296, 427, ! 289, 0, 571, 551, 234, 235, 230, 231, 236, 237, ! 232, 233, 129, 129, 569, 0, 552, 554, 568, 0, ! 436, 0, 0, 435, 431, 489, 119, 129, 129, 0, ! 340, 285, 288, 488, 290, 488, 390, 391, 397, 489, ! 393, 399, 489, 296, 296, 411, 408, 296, 0, 0, ! 647, 667, 222, 223, 224, 225, 214, 215, 216, 217, ! 226, 227, 228, 229, 218, 219, 220, 221, 129, 0, ! 656, 652, 654, 0, 0, 670, 552, 0, 0, 0, ! 0, 0, 0, 704, 0, 705, 706, 82, 85, 472, ! 0, 449, 444, 453, 450, 445, 454, 489, 446, 455, ! 451, 447, 456, 458, 465, 466, 305, 0, 307, 616, ! 0, 635, 587, 0, 0, 0, 0, 639, 0, 0, ! 622, 622, 617, 422, 424, 0, 0, 543, 426, 549, ! 566, 416, 416, 545, 546, 0, 570, 0, 437, 438, ! 0, 126, 0, 127, 0, 315, 313, 312, 294, 489, ! 0, 489, 296, 392, 296, 0, 369, 372, 377, 296, ! 702, 649, 660, 416, 661, 657, 658, 0, 475, 633, ! 464, 473, 0, 99, 0, 101, 328, 88, 0, 325, ! 0, 327, 0, 381, 318, 324, 0, 0, 708, 710, ! 0, 715, 0, 707, 0, 574, 466, 477, 278, 0, ! 0, 0, 0, 0, 0, 531, 608, 608, 526, 488, ! 0, 128, 129, 129, 0, 0, 513, 493, 494, 0, ! 0, 0, 595, 0, 635, 645, 641, 600, 0, 625, ! 619, 623, 620, 425, 544, 350, 270, 296, 351, 296, ! 346, 347, 296, 563, 417, 420, 270, 296, 296, 565, ! 296, 553, 129, 129, 555, 572, 30, 0, 0, 0, ! 0, 291, 0, 488, 0, 296, 488, 0, 296, 375, ! 296, 296, 666, 0, 662, 474, 481, 700, 0, 331, ! 0, 322, 93, 0, 317, 0, 330, 321, 709, 83, ! 0, 529, 516, 517, 518, 0, 0, 0, 532, 0, ! 489, 514, 0, 0, 135, 484, 499, 486, 504, 0, ! 497, 0, 0, 467, 136, 306, 592, 603, 0, 0, ! 627, 0, 296, 423, 543, 561, 296, 349, 296, 353, ! 562, 418, 423, 543, 564, 547, 416, 416, 124, 125, ! 0, 22, 26, 398, 489, 296, 0, 401, 400, 296, ! 0, 404, 664, 665, 659, 416, 100, 0, 0, 319, ! 320, 0, 527, 519, 0, 524, 0, 0, 0, 133, ! 332, 0, 134, 335, 0, 0, 466, 0, 0, 0, ! 483, 488, 482, 503, 0, 515, 635, 588, 643, 642, ! 646, 626, 0, 354, 355, 0, 348, 352, 0, 296, ! 296, 558, 296, 560, 314, 0, 403, 296, 406, 296, ! 663, 326, 323, 0, 525, 0, 296, 131, 0, 132, ! 0, 0, 0, 0, 533, 0, 498, 466, 467, 490, ! 488, 0, 0, 624, 356, 548, 556, 557, 559, 402, ! 405, 528, 535, 0, 530, 333, 336, 0, 0, 487, ! 534, 512, 505, 0, 509, 496, 492, 491, 0, 593, ! 0, 0, 0, 536, 537, 520, 488, 488, 485, 500, ! 533, 511, 466, 502, 0, 0, 535, 0, 0, 489, ! 489, 466, 0, 510, 0, 0, 0, 521, 538, 0, ! 0, 501, 506, 539, 0, 0, 0, 334, 337, 533, ! 0, 541, 0, 522, 0, 0, 0, 0, 507, 540, ! 523, 542, 466, 508 }; - /* YYDEFGOTO[NTERM-NUM]. */ static const short yydefgoto[] = { ! -1, 1, 2, 3, 5, 30, 31, 32, 422, 683, ! 428, 685, 270, 547, 830, 215, 334, 501, 217, 218, ! 219, 220, 33, 221, 222, 487, 486, 484, 844, 485, ! 223, 731, 224, 225, 411, 412, 413, 676, 604, 34, ! 400, 861, 246, 247, 248, 249, 250, 251, 252, 253, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, ! 662, 663, 441, 260, 254, 53, 261, 54, 55, 56, ! 57, 58, 277, 102, 271, 278, 800, 103, 679, 401, ! 263, 60, 382, 383, 384, 798, 909, 832, 833, 834, ! 1008, 835, 930, 836, 837, 1019, 1068, 1116, 1022, 1070, ! 1117, 682, 280, 920, 890, 891, 281, 61, 62, 63, ! 64, 445, 447, 452, 290, 65, 934, 571, 285, 286, ! 443, 687, 690, 688, 691, 450, 451, 255, 396, 527, ! 922, 894, 895, 530, 531, 272, 605, 606, 607, 608, ! 609, 610, 414, 375, 847, 1031, 1035, 508, 509, 510, ! 819, 820, 376, 612, 226, 821, 960, 961, 1024, 962, ! 1026, 415, 551, 1078, 1032, 1079, 1080, 963, 1077, 1025, ! 1131, 1027, 1120, 1149, 1162, 1122, 1102, 867, 868, 949, ! 1103, 1112, 1113, 1114, 1152, 647, 776, 664, 900, 1048, ! 665, 666, 904, 667, 781, 404, 537, 668, 669, 602, ! 227, 67, 88, 68, 69, 70, 517, 874, 389, 759, ! 1036, 622, 392, 633, 761, 71, 393, 91, 72, 522, ! 638, 523, 643, 880, 881, 73, 74, 188, 456, 724, ! 518, 519, 631, 766, 1040, 632, 765, 969, 319, 576, ! 721, 722, 723, 923, 924, 458, 578, 320, 321, 322, ! 323, 324, 734, 735, 839, 736, 470, 228, 336, 586, ! 473, 474, 475, 229, 230, 231 }; - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ - #define YYPACT_NINF -972 static const short yypact[] = { ! 123, 143, 153, 3997, -972, 3997, 453, -972, -972, -972, ! -972, 75, 75, 75, 45, -972, 127, -972, 805, -972, ! -972, 805, 805, -972, 162, 805, 162, 805, 805, -972, ! -972, -972, -972, 185, 216, 2496, 4262, 4170, 4279, 498, ! 121, 687, 557, 4181, 4291, 4234, 4317, 812, 848, 858, ! 1003, -972, -972, 210, -972, -972, -972, -972, -972, 75, ! -972, 337, 382, 402, -972, -972, 3997, -972, -972, -972, ! -972, -972, -972, -972, -972, -972, -972, -972, 75, 75, ! 75, 3527, 236, -972, -972, -972, -972, -972, 110, 322, ! 78, -972, -972, 285, 41, -972, 260, 805, 3046, -972, ! 91, 75, 392, -972, 1290, -972, -972, -972, -972, 75, ! -972, -972, -972, -972, -972, -972, -972, -972, 75, -972, ! -972, -972, -972, -972, -972, -972, -972, 75, -972, -972, ! -972, -972, -972, -972, -972, -972, 75, -972, -972, -972, ! -972, -972, -972, -972, -972, 75, -972, -972, -972, -972, ! -972, -972, -972, -972, 75, -972, -972, -972, -972, -972, ! -972, -972, -972, 75, -972, -972, -972, -972, -972, -972, ! -972, -972, 75, -972, -972, -972, -972, 142, 216, -972, ! -972, 251, 241, 251, 267, -972, 305, -972, 4392, -972, ! -972, -972, -972, -972, 3527, 3527, 239, 331, 341, -972, ! 805, -972, -972, -972, 3527, -972, -972, 1501, -972, 347, ! 349, 357, -972, -972, 416, 3527, 353, 361, -972, 3594, ! 3661, -972, 4329, 1418, 442, 373, 1954, 3527, -972, -972, ! -972, -972, 1096, -972, 805, 805, 805, 384, 805, 805, ! -972, -972, -972, -972, 397, 403, 4682, 1753, 4686, 4830, ! 729, 1067, 999, 1179, -972, 410, 254, 476, 269, 489, ! -972, 216, 216, 75, -972, 75, -972, 433, 75, 2798, ! 3768, 75, -972, -972, 91, 75, -972, 400, -972, 1619, ! 623, 690, 406, 1354, 436, 422, 3977, -972, 435, -972, ! 464, -972, -972, -972, -972, -972, -972, -972, -972, -972, ! -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, ! -972, -972, -972, -972, -972, 315, 4714, -972, -972, -972, ! -972, 3847, 497, -972, -972, -972, -972, 3527, 3527, 4714, ! -972, -972, 465, -972, 473, 478, 3186, 4428, 4714, 805, ! -972, -972, 475, 3527, 1501, -972, 1501, -972, 3527, 3527, ! 526, -972, -972, 3527, 3527, 3527, 3527, 3527, 3527, 3527, ! 3527, 3527, 3527, 3527, 3527, -972, -972, 805, 3527, 3527, ! 805, -972, 574, 502, -972, 559, 521, -972, -972, -972, ! -972, -972, 232, -972, 541, -972, 162, 527, -972, 548, ! 523, 555, -972, 548, -972, -972, 362, -972, 690, 146, ! 216, -972, 616, -972, -972, 3046, 3259, -972, 562, 3119, ! 601, -972, 1464, 70, -972, -972, 644, 142, 142, -972, ! 75, -972, 3768, 75, 75, -972, -972, -972, 3768, 630, ! 75, -972, -972, 4682, 1753, 4686, 4830, 729, 1067, 999, ! 1179, -972, 678, 614, 971, 251, 75, 251, -972, 675, ! 638, -972, 464, 4714, -972, 645, 646, 722, -972, 497, ! -972, 870, 1882, 4812, 652, -972, -972, 3326, -972, -972, ! -972, -972, 699, 670, 4428, -972, 682, 701, -972, 4329, ! 707, 731, 4329, 4329, 3527, 736, 3527, 3527, 1394, 1802, ! 1213, 1358, 1331, 906, 906, 649, 649, -972, -972, -972, ! -972, 755, 361, 721, -972, -972, -972, 805, 2043, 559, ! -972, -972, 756, 1096, 3728, 741, 162, -972, 772, 4030, ! -972, -972, 441, 3876, 775, 91, 75, -972, -972, -972, ! -972, 702, -972, -972, -972, 180, 67, 4116, 757, 3527, ! -972, -972, 3527, 3393, -972, 761, -972, -972, -972, -972, ! -972, 4742, -972, 623, 352, 142, -972, 809, -972, -972, ! 783, -972, -972, -972, -972, -972, 773, -972, 782, 3527, ! 805, 791, 638, 794, 4472, 1708, -972, -972, 4564, 4714, ! -972, 4714, 3527, 4714, -972, -972, 4508, -972, -972, 699, ! -972, -972, -972, 798, 798, 846, 3527, 1675, 1601, -972, ! -972, -972, 443, 601, -972, -972, 73, 85, 93, 96, ! 896, -972, 822, -972, -972, -972, -972, -972, -972, 283, ! 826, -972, 548, -972, 546, -972, -972, 216, -972, -972, ! -972, 509, -972, -972, -972, -972, -972, -972, -972, -972, ! -972, -972, -972, 833, -972, 362, 362, -972, 75, -972, ! -972, 827, -972, -972, 4590, 4746, 1130, 917, 4594, 4772, ! 1276, 1054, -972, -972, -972, 838, 462, -972, -972, 310, ! -972, 837, 845, -972, -972, -972, -972, 855, 857, 2553, ! -972, -972, 916, -972, -972, -972, -972, 860, -972, -972, ! 865, -972, -972, 75, 75, 4329, -972, 75, 861, 805, ! -972, 3847, 4590, 4746, 4622, 4800, 1130, 917, 1317, 1160, ! 4594, 4772, 4650, 4826, 1276, 1054, 1339, 1205, 871, 872, ! -972, -972, 4654, 1812, 83, -972, 866, 877, 884, 4864, ! 886, 2310, 3527, 925, 883, 4508, -972, -972, 2275, -972, ! 805, -972, -972, -972, -972, -972, -972, -972, -972, -972, ! -972, -972, -972, -972, -972, 2709, -972, 3527, -972, -972, ! 903, 548, -972, 142, 216, 4392, 4088, -972, 619, 3895, ! 455, 455, -972, -972, -972, 897, 4152, -972, -972, -972, ! -972, 712, 165, -972, -972, 4536, -972, 976, -972, -972, ! 83, -972, 142, -972, 216, -972, -972, 4329, -972, -972, ! 2553, -972, 75, 747, 75, 111, -972, -972, -972, 75, ! -972, -972, -972, 712, -972, -972, -972, 899, -972, -972, ! 909, -972, 805, -972, 3527, -972, -972, 949, 805, -972, ! 951, 4329, 913, 912, -972, -972, 48, 2486, 361, -972, ! 3527, -972, 925, -972, 3527, -972, 2871, -972, 968, 3527, ! 972, 936, 937, 3460, 680, 1015, 356, 393, -972, -972, ! 939, -972, -972, -972, 946, 627, -972, -972, -972, 2960, ! 359, 817, -972, 963, 548, -972, -972, -972, 3527, 985, ! 947, -972, 947, -972, -972, -972, 91, 75, -972, 75, ! 714, 728, 292, -972, -972, 75, 91, 75, 292, -972, ! 75, -972, -972, -972, -972, -972, -972, 470, 542, 2310, ! 83, -972, 83, -972, 3527, 213, -972, 3527, 247, -972, ! 75, 292, -972, 573, -972, -972, -972, -972, 4882, -972, ! 2310, -972, -972, 2399, -972, 2620, -972, -972, -972, 2275, ! 1550, -972, -972, -972, -972, 957, 3527, 959, -972, 979, ! -972, -972, 142, 216, -972, -972, -972, -972, -972, 981, ! 1033, 2132, 76, -972, -972, -972, -972, -972, 982, 118, ! 4329, 3527, 75, 712, 325, -972, 75, -972, 75, -972, ! -972, 75, 165, 165, -972, -972, 712, 165, -972, -972, ! 965, -972, -972, -972, -972, 3779, 3527, -972, -972, 3779, ! 3527, -972, -972, -972, -972, 712, -972, 969, 2620, -972, ! -972, 3527, -972, -972, 973, -972, 3527, 1010, 586, -972, ! 636, 592, -972, 960, 992, 1005, -972, 1011, 3527, 2221, ! -972, -972, -972, -972, 3527, -972, 548, -972, -972, -972, ! -972, 4329, 455, 714, 728, 449, -972, -972, 4152, 75, ! 292, -972, 292, -972, -972, 747, -972, 3779, -972, 3779, ! -972, -972, -972, 4923, -972, 66, 75, -972, 3768, -972, ! 3768, 3527, 3527, 1052, 2960, 1007, -972, -972, -972, -972, ! -972, 1009, 1023, -972, -972, -972, -972, -972, -972, -972, ! -972, -972, 69, 998, -972, -972, -972, 1012, 1014, -972, ! -972, -972, -972, 1002, -972, -972, -972, -972, 1021, -972, ! 1040, 805, 101, 1020, -972, -972, -972, -972, -972, -972, ! 3527, -972, -972, -972, 3527, 1019, 69, 1026, 69, -972, ! -972, -972, 1028, -972, 1031, 1108, 128, -972, -972, 899, ! 899, -972, -972, -972, 1053, 616, 1034, -972, -972, 3527, ! 3527, 442, 372, -972, 1037, 1038, 1043, 616, -972, -972, ! -972, 442, -972, -972 }; - /* YYPGOTO[NTERM-NUM]. */ static const short yypgoto[] = { ! -972, -972, -972, -972, -972, 82, -487, -972, -972, -972, ! -972, -972, -972, -972, -18, -972, -9, 608, -353, 578, ! -972, -972, -972, -95, 841, -972, -972, -972, -972, -972, ! -972, -972, -396, -972, -417, 715, -972, -972, 105, 597, ! -394, -819, 30, 65, 22, 90, 113, 135, 159, 183, ! -345, -225, -551, -535, -208, -148, -533, -528, -485, -468, ! 579, 587, -484, -240, -202, -732, -257, 1088, 1209, 1174, ! 1237, -972, -743, -177, -266, 593, -972, 751, -972, 343, ! 17, 117, -972, 640, -972, 354, -972, -621, -972, 222, ! -972, -780, -972, -972, 321, -972, -972, -972, -972, -972, ! -972, -136, 383, -722, 197, -152, 176, -972, -972, -972, ! -972, -972, -972, -972, -972, -972, -972, 584, -122, -972, ! 733, -972, -972, 262, 264, 730, 618, 726, -972, -972, ! -680, -388, -314, -608, -972, 102, -972, -972, -972, -972, ! -972, -972, -309, -972, -972, -692, 100, -972, -972, 697, ! -737, -972, 387, -972, -972, -707, -972, -972, -972, -972, ! -972, -84, -509, 140, -971, -367, -272, -972, -972, -972, ! -972, -972, -972, -972, -972, -972, -972, -972, -972, -972, ! -893, 103, -972, 80, -972, 580, -972, -738, -972, -972, ! 653, 656, -972, -972, 564, -403, -972, -972, -972, -972, ! 9, -972, 320, -972, -972, -972, -972, -972, -972, -972, ! -972, -972, -972, -972, -972, -972, -972, -24, -8, -481, ! -972, 598, -972, 466, 200, -446, -972, -972, -972, -972, ! -374, -972, -972, -972, -972, 617, -972, -972, 484, -972, ! -972, -972, 528, -972, 246, 561, -972, 706, 718, -229, ! -972, -290, -972, -972, 458, 558, -972, -972, -972, -972, ! -972, -972, 825, -972, -972, -972 }; ! /* 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 -656 static const short yytable[] = { ! 87, 282, 95, 89, 90, 556, 536, 93, 528, 87, ! 97, 559, 66, 423, 66, 502, 92, 417, 92, 524, ! 59, 558, 59, 864, 712, 37, 555, 37, 78, 79, ! 80, 460, 626, 35, 628, 35, 624, 774, 884, 641, ! 713, 279, 716, 182, 184, 186, 442, 717, 866, 907, ! 964, 629, 109, 906, 118, 1073, 127, 937, 136, 889, ! 145, 288, 154, 865, 163, 237, 172, 409, 36, 241, ! 36, -117, 216, 630, -459, 66, 371, 1033, 1110, 244, ! 549, 92, 529, 59, 817, 92, -460, 75, 37, 245, ! 718, 935, 459, 38, -461, 38, 35, -462, 10, 325, ! 326, 893, 899, 548, 755, 16, 1105, 719, 472, 331, ! 925, 81, 1092, 828, 99, 59, 39, 59, 39, 1038, ! 341, 16, 258, -2, 238, 242, 128, 9, 129, 234, ! 256, 36, 377, 11, 12, 13, 1111, 864, 40, 866, ! 40, 614, 1034, 4, 239, 99, 273, 1126, 187, 1093, ! 650, 1133, 768, -3, 865, 1010, 38, 917, -439, -117, ! 1141, 502, 41, 233, 41, 257, 790, 240, 99, 100, ! -440, 712, 818, 991, 1145, 992, 180, 101, -441, 39, ! 803, -442, 330, 805, 1127, 630, 42, 713, 42, 716, ! 259, 1163, 658, 82, 717, 180, 180, 180, 234, 611, ! 274, 40, 1039, 539, 442, -259, 658, 267, 275, 1018, ! 104, 1146, 268, 269, 381, 18, 385, 386, 387, 99, ! 390, 391, 276, 896, 59, 41, 180, 1132, 1062, 533, ! 710, 897, 269, 658, 712, 180, 615, 718, 846, 742, ! 745, 748, 751, 16, 180, 589, 268, 269, 760, 42, ! 713, 98, 716, 180, 719, 1101, 1154, 717, 775, 996, ! 408, 106, 180, 109, 1049, 118, 720, 127, 645, 136, ! 862, 180, 449, 109, 100, 118, 115, 16, 871, 876, ! 180, 628, 101, 642, 16, 641, 59, 863, 990, 180, ! 910, 59, 912, 1000, 179, 444, 258, 454, 629, 16, ! 902, 753, 232, 59, 256, 327, 1051, 1053, 435, 1007, ! 1085, 331, 659, 268, 269, 512, 433, 903, 83, 84, ! 513, 477, 16, 566, 284, 568, 659, 469, 99, 660, ! 287, 773, 529, 59, 743, 746, 749, 752, 18, 257, ! 83, 84, 864, 660, 243, 94, 59, 96, 234, 500, ! 711, 434, 504, 659, 283, 59, 289, 733, 268, 269, ! 503, 59, 515, 59, 259, 774, 756, 714, 235, -582, ! 660, 757, 585, -582, 774, 18, 436, 710, 92, 838, ! 180, 453, 425, 886, 862, 83, 84, 873, 236, 661, ! 85, 887, 269, 786, 291, 86, 538, 328, 787, 437, ! 545, 863, -35, 661, 870, 83, 84, 329, 913, 18, ! 916, 460, 85, 337, 816, 338, 423, 86, 424, 269, ! 525, 438, 59, 339, 613, 340, 181, 715, 526, 269, ! 661, 658, 1147, 1148, 449, 680, 342, 398, 399, -34, ! 710, 1017, 965, 580, 262, 439, 18, 343, 331, 343, ! 109, 371, 118, 444, 127, 1156, 136, 85, 99, 273, ! 1157, 59, 86, 675, 372, 448, 435, 83, 84, 440, ! 59, 183, 459, 388, 433, 595, 264, 85, 689, 692, ! 265, 394, 86, 111, 419, 1055, 395, 838, 420, 601, ! 426, 185, 623, 397, 265, 381, 120, 711, 532, 402, ! 968, 878, 429, 123, 9, 124, 842, 430, 92, 434, ! 11, 12, 13, 274, 714, 978, 269, 634, 635, 636, ! 446, 275, 613, 613, 747, 613, 637, 739, 16, 642, ! 671, 740, 1084, 672, 436, 276, 59, 76, 77, 85, ! 59, 37, 59, 461, 86, 435, 784, 258, 465, 35, ! 785, 659, 449, 433, 988, 256, 466, 437, 420, 478, ! 711, 467, 137, 9, 138, 19, 20, 654, 660, 11, ! 12, 13, -84, 1046, 715, 1047, 535, 714, 1042, 438, ! -636, 654, -258, 505, 36, 506, 775, 282, 434, 862, ! 257, 507, 59, 398, 399, 775, 59, 704, 59, 799, ! 59, 801, 655, 439, 511, 702, 863, 514, 654, 38, ! 516, 403, 520, 436, 416, 259, 655, 908, 418, -634, ! 1139, 1140, 634, 635, 636, 191, 989, 440, 661, 973, ! 265, 762, 39, 649, 879, 879, 437, 715, 521, 982, ! 703, -261, 955, 655, 956, 957, 958, 959, 177, 178, ! 656, 1095, 541, 1096, 40, 425, 425, 1004, 438, 773, ! 529, 1005, 1082, 267, 656, 705, -288, 915, 773, 529, ! 1067, 109, 657, 127, 420, 145, 1069, 163, 41, -288, ! 265, 810, 439, 83, 84, 546, 657, 552, 706, 424, ! 269, 656, 132, 9, 133, 634, 635, 636, 564, 11, ! 12, 13, 42, 658, 877, 560, 440, 362, 363, 364, ! 707, 741, 744, 657, 750, 99, 885, 16, 569, 109, ! -288, 118, 845, 127, -288, 136, 570, 145, 574, 154, ! 575, 163, 577, 172, 708, 9, 124, 859, 946, 59, ! 583, 11, 12, 13, 704, 587, 860, 532, 532, 1151, ! 99, 273, 702, 588, 423, 85, 268, 269, 709, 16, ! 86, 1161, -394, -394, 869, 591, 557, 403, 648, 269, ! 886, -260, 59, 561, 377, 950, 1021, 37, 887, 269, ! 976, 269, 596, 59, 592, 35, 59, 703, 37, 567, ! 593, 435, 888, 914, 978, 269, 35, 345, 347, 433, ! 553, 554, 59, 535, 927, 274, 654, 704, 83, 84, ! 929, 600, 705, 275, 594, 702, 1020, 159, 9, 160, ! 36, 1044, 1045, 659, 11, 12, 13, 276, 859, 994, ! 621, 36, 692, 95, 434, 706, 947, 860, 599, 617, ! 660, 655, 16, 625, 945, 38, 644, 670, 92, 92, ! 703, 674, 684, 164, 9, 165, 38, 707, 693, 436, ! 11, 12, 13, 168, 9, 169, 686, 694, 39, 646, ! 11, 12, 13, 83, 84, 705, 697, 699, 869, 39, ! 85, 708, 437, 532, 532, 86, 59, 584, 16, 656, ! 40, 37, 737, 634, 635, 636, -266, 410, 706, 35, ! 661, 40, 966, 59, 438, 709, 879, 754, 258, 758, ! 779, 657, 981, 59, 41, 532, 256, 772, 258, 915, ! 707, 783, 128, 9, 129, 41, 256, 788, 439, 11, ! 12, 13, -267, 335, 36, 789, 579, 1014, 42, 791, ! 535, 793, -268, 267, 708, 85, 809, 747, 802, 42, ! 86, 257, 440, 804, 785, 812, 814, 892, 898, 38, ! 822, 257, 360, 361, 362, 363, 364, 823, 709, 825, ! 535, 840, 431, 841, 872, 7, 259, 9, 10, 905, ! 883, 918, 39, 11, 12, 13, 259, 267, 818, 921, ! -288, 777, 977, 979, 374, -32, 747, 931, 932, 15, ! 933, 16, 17, -288, 40, 9, 133, 1065, 173, 9, ! 174, 11, 12, 13, -33, 11, 12, 13, 941, 1075, ! 942, 943, 948, 951, 18, 1081, 268, 269, 41, 16, ! 954, 971, 1129, 1130, 967, 972, 806, 807, 562, 563, ! 808, 1013, 455, 1015, -288, 1016, 24, 1028, -288, 1029, ! 1054, 26, 42, 1037, 1061, 464, 1066, 1064, 1071, 164, ! 9, 165, 1097, 1098, 476, 1100, 11, 12, 13, 1099, ! 480, 1072, 481, 9, 129, 532, 532, 1074, 654, 11, ! 12, 13, 1115, 869, 532, 532, 1121, -269, 532, 532, ! 1104, 59, 1108, 1125, 1109, 1118, 37, 1119, 180, 83, ! 84, 378, 379, 380, 35, 1123, 1124, 532, 1128, 1135, ! 1137, 1100, 1142, 655, 1143, 1134, 627, 1144, 1153, 1150, ! 1158, 1159, 620, 107, 112, 116, 121, 1160, 550, 1023, ! 677, 143, 148, 152, 157, 123, 9, 124, 678, 36, ! 1100, 1155, 11, 12, 13, 977, 979, 979, 681, 398, ! 399, 534, 919, 618, 911, 1009, 698, 936, 398, 399, ! 16, 656, 1050, 1052, 38, 137, 9, 138, 462, 463, ! 1043, 85, 11, 12, 13, 993, 86, 565, 1106, 573, ! 998, 921, 572, 657, 479, 9, 138, 39, 696, 482, ! 483, 11, 12, 13, 488, 489, 490, 491, 492, 493, ! 494, 495, 496, 497, 498, 499, 616, 926, 1138, 40, ! 173, 9, 174, 125, 130, 134, 139, 11, 12, 13, ! 1107, 161, 166, 170, 175, 763, 764, 782, 778, 1136, ! 974, 725, 975, 41, 726, 980, 769, 882, 770, 771, ! 983, 984, 1083, 985, 108, 113, 117, 122, 767, 875, ! 815, 1060, 144, 149, 153, 158, 0, 42, 997, 780, ! 780, 1001, 811, 1002, 1003, 356, 357, 358, 359, 360, ! 361, 362, 363, 364, 792, 794, 126, 131, 135, 140, ! 700, 159, 9, 160, 162, 167, 171, 176, 11, 12, ! 13, 266, 701, 843, -28, -28, -28, -28, 938, 590, ! 0, 0, -28, -28, -28, 727, 16, 728, 0, 730, ! 0, 0, 0, 0, 0, 813, 0, 267, -28, 403, ! -288, 403, 132, 9, 133, 0, 0, 597, 598, 11, ! 12, 13, 0, -288, 107, 112, 116, 121, 1056, 0, ! 0, 0, 1058, -28, 168, 9, 169, 16, 0, 0, ! 0, 11, 12, 13, 0, 427, 268, 269, -24, -24, ! -24, -24, 0, 627, 0, -28, -24, -24, -24, 16, ! -28, 0, 0, 0, -288, 0, 0, 0, -288, -28, ! 0, 267, -24, 0, -288, 358, 359, 360, 361, 362, ! 363, 364, 1086, 1087, 0, 1088, 0, -288, 0, 0, ! 1089, 0, 1090, 0, 0, 0, 0, -24, 0, 1094, ! 695, 357, 358, 359, 360, 361, 362, 363, 364, 0, ! 268, 269, 0, 729, 125, 130, 134, 139, 0, -24, ! 0, 0, 0, 0, -24, 0, 0, 738, -288, 0, ! 0, 0, -288, -24, 354, 355, 356, 357, 358, 359, ! 360, 361, 362, 363, 364, 108, 113, 117, 122, 952, ! 953, 0, 0, 0, 0, 410, 0, 0, -120, -120, ! -120, -120, 0, 0, -120, 0, -120, -120, -120, 365, ! 366, 0, 0, 367, 368, 369, 370, 126, 131, 135, ! 140, 0, -120, 0, 0, 0, 0, 0, 0, 986, ! 987, 0, 332, 0, 189, 7, 0, 9, 10, 190, ! 191, 0, 192, 11, 12, 13, 0, -120, 0, 0, ! 797, 107, 112, 116, 121, 0, 0, 0, 0, 15, ! 193, 16, 17, 0, 194, 195, 196, 197, 198, -120, ! 0, 0, 0, 199, -120, 0, 0, 0, 0, 200, ! 0, 0, 201, -120, 18, 0, 0, 202, 203, 204, ! 1011, 0, 205, 206, 0, 0, 0, 207, 208, 0, ! 0, 0, 831, 209, 0, 210, 24, 0, 0, 0, ! 211, 26, 0, 0, 0, 0, 0, 212, 213, 0, ! 333, 0, 214, 348, 349, 350, 1012, 351, 352, 353, ! 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, ! 364, 125, 130, 134, 139, 0, 0, 0, 0, 0, ! 421, 0, 0, -20, -20, -20, -20, 0, 0, 0, ! 0, -20, -20, -20, 0, 0, 0, 0, 0, 0, ! 0, 797, 108, 113, 117, 122, 267, -20, 0, -288, ! 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, ! 363, 364, -288, 0, 0, 928, 0, 0, 0, 0, ! 0, 0, -20, 0, 126, 131, 135, 140, 831, 0, ! 0, 0, 0, 0, 0, 939, 0, 0, 0, 0, ! 940, 0, 0, 0, -20, 0, 0, 0, 0, -20, ! 0, 0, 0, -288, 0, 0, 0, -288, -20, 410, ! 0, 0, 7, 8, 9, 10, 0, 0, 0, 970, ! 11, 12, 13, 352, 353, 354, 355, 356, 357, 358, ! 359, 360, 361, 362, 363, 364, 15, 0, 16, 0, ! 0, 0, 107, 112, 0, 0, 143, 148, 0, 0, ! 831, 0, 0, 0, 0, 995, 0, 7, 999, 9, ! 111, 18, 0, 0, 0, 11, 12, 13, 0, 0, ! 0, 831, 0, 0, 831, 0, 831, 0, 0, 0, ! 0, 15, 0, 24, 0, 0, 0, 0, 26, 0, ! 107, 112, 116, 121, 0, 0, 0, -653, 143, 148, ! 152, 157, 0, 0, 0, 0, 18, 0, 0, 0, ! 0, 0, 1041, 410, 0, 0, -655, -655, -655, -655, ! 0, 0, 0, 0, -655, -655, -655, 0, 24, 0, ! 125, 130, 0, 26, 161, 166, 0, 1057, 0, 0, ! -655, 1059, -655, 0, 0, 0, 0, 0, 0, 831, ! 0, 0, 1063, 355, 356, 357, 358, 359, 360, 361, ! 362, 363, 364, 108, 113, -655, 0, 144, 149, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 125, 130, 134, 139, 0, 0, 0, -655, 161, 166, ! 170, 175, -655, 126, 131, 0, 0, 162, 167, 0, ! 0, -655, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 108, 113, 117, 122, 0, 0, 0, 0, 144, ! 149, 153, 158, 0, 0, 348, 349, 350, 0, 351, ! 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, ! 362, 363, 364, 126, 131, 135, 140, 0, 0, 0, ! 0, 162, 167, 171, 176, 373, 0, -464, -464, -464, ! -464, -464, -464, -464, 0, -464, -464, -464, -464, -464, ! 581, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, ! -464, -464, 0, 0, 0, 0, -464, 0, 0, 0, ! 0, 0, -464, 0, 0, -464, 0, -464, 0, 0, ! -464, -464, -464, 0, 0, -464, -464, 0, 0, 0, ! -464, -464, 0, 0, 0, 0, -464, 0, -464, -464, ! 0, 0, 0, -464, -464, 0, 0, 0, -464, 374, ! -464, -464, 0, -464, 603, -464, -488, -488, -488, -488, ! -488, -488, -488, 0, -488, -488, -488, -488, -488, 0, ! -488, -488, -488, -488, -488, -488, -488, -488, -488, -488, ! -488, -488, -488, -488, -488, 0, -488, -488, -488, -488, ! -488, 0, 0, 0, 0, -488, 0, 0, 0, 0, ! 0, -488, 0, 0, -488, 0, -488, 0, 0, -488, ! -488, -488, 0, 0, -488, -488, 0, 0, 0, -488, ! -488, 0, 0, 0, 0, -488, 0, -488, -488, 0, ! 0, 0, -488, -488, 0, 0, 0, -488, 0, -488, ! -488, 0, -488, 1030, -488, -466, -466, 0, 0, 0, ! -466, -466, 0, -466, 0, 0, 0, -466, 0, -466, ! -466, -466, -466, -466, -466, -466, -466, -466, -466, -466, ! 0, -466, 0, -466, 0, -466, -466, -466, -466, -466, ! 0, 0, 0, 0, -466, 0, 0, 0, 0, 0, ! -466, 0, 0, -466, 0, 0, 0, 0, -466, -466, ! -466, 0, 0, -466, -466, 0, 0, 0, -466, -466, ! 0, 0, 0, 0, -466, 0, -466, -466, 0, 0, ! 0, -466, -466, 0, 0, 0, -466, 0, -466, -466, ! 0, -466, 1076, -466, -495, -495, 0, 0, 0, -495, ! -495, 0, -495, 0, 0, 0, -495, 0, -495, -495, ! -495, -495, -495, -495, -495, -495, -495, -495, -495, 0, ! -495, 0, -495, 0, -495, -495, -495, -495, -495, 0, ! 0, 0, 0, -495, 0, 0, 0, 0, 0, -495, ! 0, 0, -495, 0, 0, 0, 0, -495, -495, -495, ! 0, 0, -495, -495, 0, 0, 0, -495, -495, 0, ! 0, 0, 0, -495, 0, -495, -495, 0, 0, 0, ! -495, -495, 0, 0, 0, -495, 0, -495, -495, 0, ! -495, 826, -495, 827, 84, 0, 0, 0, 190, 191, ! 350, 192, 351, 352, 353, 354, 355, 356, 357, 358, ! 359, 360, 361, 362, 363, 364, 0, 0, 0, 193, ! 0, 17, 0, 194, 195, 196, 197, 198, 0, 0, ! 0, 0, 199, 0, 0, 0, 0, 0, 200, 0, ! 0, 201, 0, 0, 0, 0, 202, 203, 204, 0, ! 0, 205, 206, 0, 0, 828, 207, 208, 0, 0, ! 0, 0, 209, 0, 210, 85, 0, 0, 0, 211, ! 86, 0, 0, 0, 0, -316, 212, 213, 0, 829, ! 826, 214, 827, 84, 0, 0, 0, 190, 191, 0, ! 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 193, 0, ! 17, 0, 194, 195, 196, 197, 198, 0, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 200, 0, 0, ! 201, 0, 0, 0, 0, 202, 203, 204, 0, 0, ! 205, 206, 0, 0, 828, 207, 208, 0, 0, 0, ! 0, 209, 0, 210, 85, 0, 0, 0, 211, 86, ! 0, 0, 0, 0, -382, 212, 213, 826, 829, 189, ! 214, 0, 0, 0, 190, 191, 0, 192, 0, 0, ! 7, 105, 9, 106, 0, 0, 0, 0, 11, 12, ! 13, 0, 0, 0, 0, 193, 0, 17, 0, 194, ! 195, 196, 197, 198, 15, 0, 16, 0, 199, -329, ! 0, 0, 0, 0, 200, 0, 0, 201, 0, 0, ! 0, 0, 202, 203, 204, 0, 0, 205, 206, 18, ! 0, -329, 207, 208, 795, 0, 189, 0, 209, 0, ! 210, 190, 191, 0, 192, 211, 0, 0, 0, 0, ! 0, 24, 212, 213, 0, 829, 26, 214, 0, 0, ! -254, 0, 193, 0, 17, 0, 194, 195, 196, 197, ! 198, 0, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 200, 0, 0, 201, 0, 0, 0, 0, 202, ! 203, 204, 0, 0, 205, 206, 0, 0, 0, 207, ! 208, 826, 0, 189, 0, 209, 0, 210, 190, 191, ! 0, 192, 211, 0, 0, 0, 0, 0, 0, 212, ! 213, 0, 796, 0, 214, 0, 0, 0, 0, 193, ! 0, 17, 0, 194, 195, 196, 197, 198, 0, 0, ! 0, 0, 199, 0, 0, 0, 0, 0, 200, 0, ! 0, 201, 0, 0, 0, 0, 202, 203, 204, 0, ! 0, 205, 206, 0, 0, 0, 207, 208, 0, 0, ! 0, 0, 209, 0, 210, 0, 0, 0, 0, 211, ! 0, 0, 0, 0, 0, 0, 212, 213, 0, 829, ! 0, 214, 827, 848, 8, 9, 10, 190, 191, 0, ! 192, 11, 12, 13, 0, 0, 0, 0, 0, 0, ! 849, 850, 851, 852, 853, 854, 855, 15, 193, 16, ! 17, 0, 194, 195, 196, 197, 198, 0, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 200, 0, 0, ! 201, 0, 18, 0, 0, 202, 203, 204, 0, 0, ! 205, 206, 0, 0, 0, 207, 208, 0, 0, 0, ! 0, 209, 0, 210, 856, 0, 0, 0, 211, 857, ! 0, 0, 0, 858, 0, 212, 213, 0, 818, 0, ! 214, 189, 7, 405, 9, 10, 190, 191, 0, 192, ! 11, 12, 13, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 15, 193, 16, 17, ! 0, 194, 195, 196, 197, 198, 0, 0, 0, 0, ! 199, 0, 0, 0, 0, 0, 200, 0, 0, 201, ! 0, 18, 0, 0, 202, 203, 406, 0, 0, 205, ! 206, 0, 0, 0, 207, 208, 0, 0, 0, 0, ! 209, 0, 210, 24, 827, 84, 0, 211, 26, 190, ! 191, 0, 192, 0, 212, 213, 0, 0, 407, 214, ! 0, 0, 849, 850, 851, 852, 853, 854, 855, 0, ! 193, 0, 17, 0, 194, 195, 196, 197, 198, 0, ! 0, 0, 0, 199, 0, 0, 0, 0, 0, 200, ! 0, 0, 201, 0, 0, 0, 0, 202, 203, 204, ! 0, 0, 205, 206, 0, 0, 0, 207, 208, 0, ! 0, 0, 0, 209, 0, 210, 85, 0, 0, 0, ! 211, 86, 0, 0, 0, 858, 0, 212, 213, 0, ! 818, 0, 214, 189, 7, 8, 9, 10, 190, 191, ! 0, 192, 11, 12, 13, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 15, 193, ! 16, 17, 0, 194, 195, 196, 197, 198, 0, 0, ! 0, 0, 199, 0, 0, 0, 0, 0, 200, 0, ! 0, 201, 0, 18, 0, 0, 202, 203, 204, 0, ! 0, 205, 206, 0, 0, 0, 207, 208, 0, 0, ! 0, 0, 209, 0, 210, 24, 0, 0, 0, 211, ! 26, 0, 0, 0, 0, 0, 212, 213, 0, 189, ! 7, 214, 9, 10, 190, 191, 0, 192, 11, 12, ! 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 15, 193, 16, 17, 0, 194, ! 195, 196, 197, 198, 0, 0, 0, 0, 199, 0, ! 0, 0, 0, 0, 200, 0, 0, 201, 0, 18, ! 0, 0, 202, 203, 204, 0, 0, 205, 206, 0, ! 0, 0, 207, 208, 0, 0, 0, 0, 209, 0, ! 210, 24, 189, 0, 542, 211, 26, 190, 191, 0, ! 192, 0, 212, 213, 0, 0, 0, 214, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 193, 0, ! 17, 0, 194, 195, 196, 197, 198, 0, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 200, 0, 0, ! 201, 0, 0, 0, 0, 202, 203, 543, 0, 0, ! 205, 206, 0, 0, 0, 207, 208, 0, 0, 189, ! 0, 209, 0, 210, 190, 191, 0, 192, 211, 0, ! 0, 0, 0, 0, 0, 212, 213, 0, 0, 544, ! 214, 0, 0, 0, 0, 193, 0, 17, 0, 194, ! 195, 196, 197, 198, 0, 0, 0, 0, 199, 0, ! 0, 0, 0, 0, 200, 0, 0, 201, 0, 0, ! 0, 0, 202, 203, 204, 0, 0, 205, 206, 0, ! 0, 0, 207, 208, 0, 0, 0, 0, 209, 0, ! 210, 468, 189, 0, 0, 211, 0, 190, 191, 0, ! 192, 0, 212, 213, 0, 0, 0, 214, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 193, 0, ! 17, 0, 194, 195, 196, 197, 198, 0, 0, 0, ! 0, 199, 0, 0, 0, 0, 0, 200, 0, 0, ! 201, 0, 0, 0, 0, 202, 203, 204, 0, 0, ! 205, 206, 0, 0, 0, 207, 208, 0, 0, 189, ! 0, 209, 0, 210, 190, 191, 0, 192, 211, 0, ! 0, 0, 0, 0, 0, 212, 213, 0, 0, 540, ! 214, 0, 0, 0, 0, 193, 0, 17, 0, 194, ! 195, 196, 197, 198, 0, 0, 0, 0, 199, 0, ! 0, 0, 0, 0, 200, 0, 0, 201, 0, 0, ! 0, 0, 202, 203, 204, 0, 0, 205, 206, 0, ! 0, 0, 207, 208, 0, 0, 189, 0, 209, 0, ! 210, 190, 191, 0, 192, 211, 0, 0, 0, 0, ! 0, 0, 212, 213, 0, 584, 0, 214, 0, 0, ! 0, 0, 193, 0, 17, 0, 194, 195, 196, 197, ! 198, 0, 0, 0, 0, 199, 0, 0, 0, 0, ! 0, 200, 0, 0, 201, 0, 0, 0, 0, 202, ! 203, 204, 0, 0, 205, 206, 0, 0, 0, 207, ! 208, 0, 0, 189, 0, 209, 0, 210, 190, 191, ! 0, 192, 211, 0, 0, 0, 0, 0, 0, 212, ! 213, 0, 0, 673, 214, 0, 0, 0, 0, 193, ! 0, 17, 0, 194, 195, 196, 197, 198, 0, 0, ! 0, 0, 199, 0, 0, 0, 0, 0, 200, 0, ! 0, 201, 0, 0, 0, 0, 202, 203, 204, 0, ! 0, 205, 206, 0, 0, 0, 207, 208, 0, 0, ! 189, 0, 209, 0, 210, 190, 191, 0, 192, 211, ! 0, 0, 0, 0, 944, 0, 212, 213, 0, 0, ! 0, 214, 0, 0, 0, 0, 193, 0, 17, 0, ! 194, 195, 196, 197, 198, 0, 0, 0, 0, 199, ! 0, 0, 0, 0, 0, 200, 0, 0, 201, 0, ! 0, 0, 0, 202, 203, 204, 0, 0, 205, 206, ! 0, 0, 0, 207, 208, 0, 0, 189, 0, 209, ! 0, 210, 190, 191, 0, 192, 211, 0, 0, 0, ! 0, 0, 0, 212, 213, 0, 0, 0, 214, 0, ! 0, 0, 0, 193, 0, 17, 0, 194, 195, 196, ! 197, 198, 0, 0, 0, 0, 199, 0, 0, 0, ! 0, 0, 200, 0, 0, 201, 0, 0, 0, 0, ! 202, 203, 204, 0, 0, 205, 206, 0, 0, 0, ! 344, 208, 0, 0, 189, 0, 209, 0, 210, 190, ! 191, 0, 192, 211, 0, 0, 0, 0, 0, 0, ! 212, 213, 0, 0, 0, 214, 0, 0, 0, 0, ! 193, 0, 17, 0, 194, 195, 196, 197, 198, 0, ! 0, 0, 0, 199, 0, 0, 0, 0, 0, 200, ! 0, 0, 201, 0, 0, 0, 0, 202, 203, 204, ! 0, 0, 205, 206, 0, 0, 0, 346, 208, 0, ! 0, 619, 0, 209, 0, 210, 190, 191, 0, 192, ! 211, 0, 0, 0, 0, 0, 0, 212, 213, 0, ! 0, 0, 214, 0, 0, 0, 0, 193, 0, 17, ! 0, 194, 195, 196, 197, 198, 0, 0, 0, 410, ! 199, 0, -488, -488, -488, -488, 200, 0, 0, 201, ! -488, -488, -488, 0, 202, 203, 204, 0, 0, 205, ! 206, 0, 0, 0, 207, 208, -488, 0, 0, 0, ! 209, 0, 210, 0, 0, 0, 0, 211, 0, 16, ! 0, 0, 0, 0, 212, 213, 0, 0, 0, 214, ! 0, -488, 348, 349, 350, 0, 351, 352, 353, 354, ! 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, ! 0, 0, 0, -488, 0, 0, 0, 0, -488, 0, ! 292, 293, 0, 294, 295, 0, 0, -116, 296, 297, ! 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, ! 308, 309, 310, 311, 312, 313, 314, 639, 0, 0, ! 7, 0, 9, 10, 0, 0, 0, 0, 11, 12, ! 13, 0, 0, 315, 0, 0, 639, 0, 0, 7, ! 0, 9, 10, 0, 15, 0, 16, 11, 12, 13, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 317, 15, 0, 16, 0, 318, 0, 18, ! 0, 0, 0, 0, 0, 457, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, ! 0, 24, -612, -612, -612, 0, 26, 0, 0, 0, ! 640, -612, 0, 0, 0, 0, 0, 0, 0, 0, ! 24, -611, -611, -611, 0, 26, 0, 0, 431, 640, ! -611, 7, 0, 9, 10, 0, 0, 0, 0, 11, ! 12, 13, 0, 0, 0, 0, 0, 0, 6, 0, ! -129, 7, 8, 9, 10, 15, 0, 16, 17, 11, ! 12, 13, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 14, 15, 0, 16, 17, 0, ! 18, 6, 0, -129, 7, 8, 9, 10, 0, 0, ! 0, 0, 11, 12, 13, 0, 0, 0, 0, 0, ! 18, 0, 24, 19, 20, -129, 0, 26, 15, 0, ! 16, 432, -385, -129, 0, 0, 21, 22, 23, 0, ! 0, 0, 24, 0, 0, 0, 25, 26, 27, 28, ! 0, 29, 0, 18, 0, 0, 19, 20, -129, 6, ! 0, -129, 7, 8, 9, 10, -129, 0, 0, 0, ! 11, 12, 13, 0, 0, 24, 0, 0, 0, 0, ! 26, 0, 0, 0, 29, 0, 15, 651, 16, 652, ! 7, 8, 9, 10, 0, 0, 653, 0, 11, 12, ! 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 18, 0, 0, 15, 0, -129, 0, 0, 0, ! 0, 0, 0, 651, -129, 0, 7, 8, 9, 10, ! 0, 0, 653, 24, 11, 12, 13, 0, 26, 18, ! 0, 0, 29, 0, 7, 114, 9, 115, 0, 0, ! 15, 0, 11, 12, 13, 7, 141, 9, 142, 0, ! 0, 24, 0, 11, 12, 13, 26, 0, 15, -550, ! 16, 0, 0, 0, 0, 18, 0, 0, 0, 15, ! 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 18, 0, 0, 0, 24, 0, 0, ! 0, 0, 26, 0, 18, -550, 0, 0, 7, 150, ! 9, 151, 0, 0, 0, 24, 11, 12, 13, 0, ! 26, 0, 0, 0, -256, 0, 24, 0, 0, 0, ! 0, 26, 15, 0, 16, -262, 7, 110, 9, 111, ! 0, 0, 0, 0, 11, 12, 13, 0, 0, 0, ! 0, 0, 0, 7, 119, 9, 120, 18, 0, 0, ! 15, 11, 12, 13, 0, 7, 146, 9, 147, 0, ! 0, 0, 0, 11, 12, 13, 0, 15, 0, 24, ! 0, 0, 0, 0, 26, 18, 0, 0, -264, 15, ! 0, 7, 155, 9, 156, 0, 0, 0, 0, 11, ! 12, 13, 18, 0, 0, 0, 0, 24, 0, 0, ! 0, 0, 26, 0, 18, 15, -255, 0, 0, 0, ! 0, 0, 0, 0, 24, 0, 0, 0, 0, 26, ! 0, 0, 0, -257, 0, 0, 24, 0, 0, 0, ! 18, 26, 348, 349, 350, -263, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, ! 0, 0, 24, 0, 0, 292, 293, 26, 294, 295, ! 0, -265, 0, 296, 297, 298, 299, 300, 301, 302, ! 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, ! 313, 314, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 292, 293, 0, 294, 295, 0, 0, 315, 296, ! 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, ! 307, 308, 309, 310, 311, 312, 313, 314, 316, 0, ! 0, 0, 0, 0, 0, 0, 0, 317, 0, 0, ! 0, 0, 318, 0, 471, 292, 293, 0, 294, 295, ! 0, 0, 0, 296, 297, 298, 299, 300, 301, 302, ! 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, ! 313, 314, 0, 317, 0, 0, 0, 0, 318, 0, ! 0, 292, 293, 0, 294, 295, 0, 0, 315, 296, ! 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, ! 307, 308, 309, 310, 311, 312, 313, 314, 0, 0, ! 7, 8, 9, 10, 0, 0, 901, 317, 11, 12, ! 13, 0, 318, 0, 732, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 15, 0, 16, 0, 7, 8, ! 9, 10, 0, 0, 653, 0, 11, 12, 13, 0, ! 0, 0, 0, 317, 0, 0, 0, 0, 318, 18, ! 0, 0, 15, 0, 7, 105, 9, 106, 7, 141, ! 9, 142, 11, 12, 13, 0, 11, 12, 13, 0, ! 0, 24, 0, 0, 0, 0, 26, 18, 15, 0, ! 16, 0, 15, 0, 16, 0, 7, 114, 9, 115, ! 0, 0, 0, 0, 11, 12, 13, 0, 0, 24, ! 0, 0, 0, 18, 26, 0, 0, 18, 0, 0, ! 15, 0, 16, 0, 7, 150, 9, 151, 7, 8, ! 9, 10, 11, 12, 13, 24, 11, 12, 13, 24, ! 26, 0, 0, 0, 26, 18, 0, 0, 15, 0, ! 16, 0, 15, 0, 16, 0, 7, 0, 9, 106, ! 7, 0, 9, 115, 11, 12, 13, 24, 11, 12, ! 13, 0, 26, 18, 0, 0, 0, 18, 0, 0, ! 15, 0, 16, 0, 15, 0, 16, 0, 7, 0, ! 9, 10, 0, 0, 0, 24, 11, 12, 13, 24, ! 26, 0, 0, 0, 26, 18, 0, 0, 0, 18, ! 0, 0, 15, 0, 16, 0, 7, 8, 9, 10, ! 7, 110, 9, 111, 11, 12, 13, 24, 11, 12, ! 13, 24, 26, 0, 0, 0, 26, 18, 0, 0, ! 15, 0, 0, 0, 15, 0, 7, 146, 9, 147, ! 0, 0, 0, 0, 11, 12, 13, 0, 0, 24, ! 0, 0, 0, 0, 26, 18, 0, 0, 0, 18, ! 15, 0, 0, 0, 7, 119, 9, 120, 0, 0, ! 0, 0, 11, 12, 13, 0, 0, 24, 0, 0, ! 0, 24, 26, 0, 0, 18, 26, 0, 15, 0, ! 7, 155, 9, 156, 7, 0, 9, 120, 11, 12, ! 13, 0, 11, 12, 13, 0, 0, 24, 0, 0, ! 0, 0, 26, 18, 15, 348, 349, 350, 15, 351, ! 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, ! 362, 363, 364, 0, 0, 24, 0, 0, 0, 18, ! 26, 0, 0, 18, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 582, 24, 0, 0, 0, 24, 26, 348, 349, 350, ! 26, 351, 352, 353, 354, 355, 356, 357, 358, 359, ! 360, 361, 362, 363, 364, 348, 349, 350, 0, 351, ! 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, ! 362, 363, 364, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 824, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 1006, 348, 349, 350, 1091, ! 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, ! 361, 362, 363, 364 }; static const short yycheck[] = { ! 18, 178, 26, 21, 22, 422, 402, 25, 396, 27, ! 28, 428, 3, 279, 5, 368, 24, 274, 26, 393, ! 3, 424, 5, 755, 575, 3, 420, 5, 11, 12, ! 13, 321, 519, 3, 519, 5, 517, 645, 776, 523, ! 575, 177, 575, 61, 62, 63, 286, 575, 755, 792, ! 869, 519, 35, 790, 37, 1026, 39, 837, 41, 781, ! 43, 183, 45, 755, 47, 89, 49, 269, 3, 93, ! 5, 1, 81, 519, 1, 66, 9, 1, 9, 97, ! 10, 89, 396, 66, 1, 93, 1, 5, 66, 98, ! 575, 43, 321, 3, 1, 5, 66, 1, 7, 194, ! 195, 781, 782, 412, 613, 30, 1077, 575, 337, 204, ! 817, 66, 46, 65, 3, 98, 3, 100, 5, 1, ! 215, 30, 100, 0, 46, 84, 5, 6, 7, 88, ! 100, 66, 227, 12, 13, 14, 67, 869, 3, 846, ! 5, 508, 66, 0, 66, 3, 4, 46, 66, 83, ! 83, 1122, 633, 0, 846, 935, 66, 46, 85, 89, ! 1131, 514, 3, 53, 5, 100, 675, 89, 3, 58, ! 85, 722, 89, 910, 46, 912, 59, 66, 85, 66, ! 689, 85, 200, 692, 83, 631, 3, 722, 5, 722, ! 100, 1162, 537, 66, 722, 78, 79, 80, 88, 508, ! 58, 66, 84, 405, 444, 84, 551, 27, 66, 952, ! 34, 83, 66, 67, 232, 53, 234, 235, 236, 3, ! 238, 239, 80, 58, 207, 66, 109, 1120, 1008, 83, ! 575, 66, 67, 578, 785, 118, 508, 722, 747, 606, ! 607, 608, 609, 30, 127, 474, 66, 67, 622, 66, ! 785, 66, 785, 136, 722, 1074, 1149, 785, 646, 46, ! 269, 7, 145, 246, 986, 248, 575, 250, 525, 252, ! 755, 154, 290, 256, 58, 258, 7, 30, 759, 766, ! 163, 766, 66, 523, 30, 769, 269, 755, 909, 172, ! 799, 274, 801, 46, 84, 286, 274, 315, 766, 30, ! 785, 610, 66, 286, 274, 66, 986, 987, 286, 930, ! 1048, 406, 537, 66, 67, 83, 286, 785, 3, 4, ! 88, 339, 30, 445, 73, 447, 551, 336, 3, 537, ! 89, 645, 646, 316, 606, 607, 608, 609, 53, 274, ! 3, 4, 1074, 551, 84, 25, 329, 27, 88, 367, ! 575, 286, 370, 578, 178, 338, 89, 586, 66, 67, ! 369, 344, 386, 346, 274, 973, 83, 575, 46, 84, ! 578, 88, 467, 88, 982, 53, 286, 722, 386, 732, ! 263, 66, 280, 58, 869, 3, 4, 761, 66, 537, ! 75, 66, 67, 83, 89, 80, 405, 66, 88, 286, ! 409, 869, 46, 551, 757, 3, 4, 66, 802, 53, ! 804, 701, 75, 66, 723, 66, 682, 80, 66, 67, ! 58, 286, 405, 66, 508, 9, 89, 575, 66, 67, ! 578, 776, 1139, 1140, 452, 83, 83, 261, 262, 46, ! 785, 950, 83, 461, 101, 286, 53, 88, 543, 88, ! 433, 9, 435, 444, 437, 83, 439, 75, 3, 4, ! 88, 444, 80, 547, 91, 1, 444, 3, 4, 286, ! 453, 89, 701, 89, 444, 484, 84, 75, 562, 563, ! 88, 84, 80, 7, 84, 994, 83, 840, 88, 507, ! 84, 89, 516, 83, 88, 513, 7, 722, 396, 66, ! 874, 46, 66, 5, 6, 7, 735, 85, 516, 444, ! 12, 13, 14, 58, 722, 66, 67, 76, 77, 78, ! 85, 66, 606, 607, 608, 609, 85, 84, 30, 769, ! 539, 88, 83, 542, 444, 80, 519, 84, 85, 75, ! 523, 519, 525, 46, 80, 523, 84, 525, 83, 519, ! 88, 776, 570, 523, 84, 525, 83, 444, 88, 84, ! 785, 83, 5, 6, 7, 56, 57, 537, 776, 12, ! 13, 14, 46, 976, 722, 978, 400, 785, 972, 444, ! 71, 551, 84, 9, 519, 83, 974, 764, 523, 1074, ! 525, 32, 575, 417, 418, 983, 579, 575, 581, 683, ! 583, 685, 537, 444, 83, 575, 1074, 66, 578, 519, ! 83, 268, 89, 523, 271, 525, 551, 794, 275, 71, ! 1129, 1130, 76, 77, 78, 9, 84, 444, 776, 886, ! 88, 85, 519, 531, 770, 771, 523, 785, 83, 896, ! 575, 84, 15, 578, 17, 18, 19, 20, 51, 52, ! 537, 1068, 90, 1070, 519, 553, 554, 84, 523, 973, ! 974, 88, 1036, 27, 551, 575, 30, 803, 982, 983, ! 84, 654, 537, 656, 88, 658, 84, 660, 519, 43, ! 88, 699, 523, 3, 4, 84, 551, 43, 575, 66, ! 67, 578, 5, 6, 7, 76, 77, 78, 84, 12, ! 13, 14, 519, 1048, 85, 75, 523, 58, 59, 60, ! 575, 606, 607, 578, 609, 3, 4, 30, 43, 702, ! 84, 704, 740, 706, 88, 708, 88, 710, 83, 712, ! 84, 714, 10, 716, 575, 6, 7, 755, 58, 722, ! 88, 12, 13, 14, 722, 46, 755, 645, 646, 1145, ! 3, 4, 722, 83, 1020, 75, 66, 67, 575, 30, ! 80, 1157, 84, 85, 755, 83, 423, 424, 66, 67, ! 58, 84, 755, 430, 869, 859, 953, 755, 66, 67, ! 66, 67, 46, 766, 83, 755, 769, 722, 766, 446, ! 83, 769, 80, 46, 66, 67, 766, 219, 220, 769, ! 417, 418, 785, 627, 822, 58, 776, 785, 3, 4, ! 828, 90, 722, 66, 83, 785, 952, 5, 6, 7, ! 755, 973, 974, 1048, 12, 13, 14, 80, 846, 913, ! 89, 766, 916, 857, 769, 722, 854, 846, 83, 83, ! 1048, 776, 30, 71, 853, 755, 71, 90, 856, 857, ! 785, 90, 43, 5, 6, 7, 766, 722, 85, 769, ! 12, 13, 14, 5, 6, 7, 83, 85, 755, 526, ! 12, 13, 14, 3, 4, 785, 85, 83, 869, 766, ! 75, 722, 769, 781, 782, 80, 869, 89, 30, 776, ! 755, 869, 46, 76, 77, 78, 84, 1, 785, 869, ! 1048, 766, 85, 886, 769, 722, 1042, 85, 886, 83, ! 83, 776, 895, 896, 755, 813, 886, 84, 896, 1055, ! 785, 83, 5, 6, 7, 766, 896, 90, 769, 12, ! 13, 14, 84, 207, 869, 90, 66, 946, 755, 84, ! 764, 84, 84, 27, 785, 75, 85, 1031, 88, 766, ! 80, 886, 769, 88, 88, 84, 84, 781, 782, 869, ! 83, 896, 56, 57, 58, 59, 60, 83, 785, 83, ! 794, 46, 1, 90, 71, 4, 886, 6, 7, 3, ! 83, 805, 869, 12, 13, 14, 896, 27, 89, 813, ! 30, 648, 890, 891, 85, 46, 1080, 46, 85, 28, ! 88, 30, 31, 43, 869, 6, 7, 1016, 5, 6, ! 7, 12, 13, 14, 46, 12, 13, 14, 46, 1028, ! 84, 84, 7, 84, 53, 1034, 66, 67, 869, 30, ! 84, 46, 1116, 1117, 71, 88, 693, 694, 441, 442, ! 697, 84, 316, 84, 84, 66, 75, 66, 88, 16, ! 85, 80, 869, 71, 85, 329, 46, 84, 66, 5, ! 6, 7, 1071, 1072, 338, 1074, 12, 13, 14, 17, ! 344, 66, 346, 6, 7, 973, 974, 66, 1048, 12, ! 13, 14, 84, 1074, 982, 983, 84, 84, 986, 987, ! 83, 1074, 83, 1111, 71, 83, 1074, 83, 981, 3, ! 4, 5, 6, 7, 1074, 84, 66, 1005, 88, 90, ! 84, 1120, 84, 1048, 83, 1124, 519, 9, 84, 66, ! 83, 83, 514, 35, 36, 37, 38, 84, 413, 953, ! 551, 43, 44, 45, 46, 5, 6, 7, 551, 1074, ! 1149, 1150, 12, 13, 14, 1043, 1044, 1045, 555, 973, ! 974, 400, 809, 513, 800, 933, 572, 836, 982, 983, ! 30, 1048, 986, 987, 1074, 5, 6, 7, 327, 328, ! 973, 75, 12, 13, 14, 913, 80, 444, 1078, 453, ! 916, 1005, 452, 1048, 343, 6, 7, 1074, 570, 348, ! 349, 12, 13, 14, 353, 354, 355, 356, 357, 358, ! 359, 360, 361, 362, 363, 364, 509, 820, 1128, 1074, ! 5, 6, 7, 39, 40, 41, 42, 12, 13, 14, ! 1080, 47, 48, 49, 50, 628, 629, 663, 648, 1126, ! 887, 578, 889, 1074, 578, 892, 638, 771, 641, 642, ! 897, 898, 1042, 900, 35, 36, 37, 38, 631, 765, ! 722, 1005, 43, 44, 45, 46, -1, 1074, 915, 662, ! 663, 918, 701, 920, 921, 52, 53, 54, 55, 56, ! 57, 58, 59, 60, 677, 678, 39, 40, 41, 42, ! 574, 5, 6, 7, 47, 48, 49, 50, 12, 13, ! 14, 1, 574, 735, 4, 5, 6, 7, 840, 474, ! -1, -1, 12, 13, 14, 579, 30, 581, -1, 583, ! -1, -1, -1, -1, -1, 718, -1, 27, 28, 976, ! 30, 978, 5, 6, 7, -1, -1, 486, 487, 12, ! 13, 14, -1, 43, 246, 247, 248, 249, 995, -1, ! -1, -1, 999, 53, 5, 6, 7, 30, -1, -1, ! -1, 12, 13, 14, -1, 1, 66, 67, 4, 5, ! 6, 7, -1, 766, -1, 75, 12, 13, 14, 30, ! 80, -1, -1, -1, 84, -1, -1, -1, 88, 89, ! -1, 27, 28, -1, 30, 54, 55, 56, 57, 58, ! 59, 60, 1049, 1050, -1, 1052, -1, 43, -1, -1, ! 1057, -1, 1059, -1, -1, -1, -1, 53, -1, 1066, ! 569, 53, 54, 55, 56, 57, 58, 59, 60, -1, ! 66, 67, -1, 582, 250, 251, 252, 253, -1, 75, ! -1, -1, -1, -1, 80, -1, -1, 596, 84, -1, ! -1, -1, 88, 89, 50, 51, 52, 53, 54, 55, ! 56, 57, 58, 59, 60, 246, 247, 248, 249, 862, ! 863, -1, -1, -1, -1, 1, -1, -1, 4, 5, ! 6, 7, -1, -1, 10, -1, 12, 13, 14, 61, ! 62, -1, -1, 65, 66, 67, 68, 250, 251, 252, ! 253, -1, 28, -1, -1, -1, -1, -1, -1, 902, ! 903, -1, 1, -1, 3, 4, -1, 6, 7, 8, ! 9, -1, 11, 12, 13, 14, -1, 53, -1, -1, ! 679, 433, 434, 435, 436, -1, -1, -1, -1, 28, ! 29, 30, 31, -1, 33, 34, 35, 36, 37, 75, ! -1, -1, -1, 42, 80, -1, -1, -1, -1, 48, ! -1, -1, 51, 89, 53, -1, -1, 56, 57, 58, ! 10, -1, 61, 62, -1, -1, -1, 66, 67, -1, ! -1, -1, 731, 72, -1, 74, 75, -1, -1, -1, ! 79, 80, -1, -1, -1, -1, -1, 86, 87, -1, ! 89, -1, 91, 43, 44, 45, 46, 47, 48, 49, ! 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ! 60, 437, 438, 439, 440, -1, -1, -1, -1, -1, ! 1, -1, -1, 4, 5, 6, 7, -1, -1, -1, ! -1, 12, 13, 14, -1, -1, -1, -1, -1, -1, ! -1, 800, 433, 434, 435, 436, 27, 28, -1, 30, ! 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, ! 59, 60, 43, -1, -1, 824, -1, -1, -1, -1, ! -1, -1, 53, -1, 437, 438, 439, 440, 837, -1, ! -1, -1, -1, -1, -1, 844, -1, -1, -1, -1, ! 849, -1, -1, -1, 75, -1, -1, -1, -1, 80, ! -1, -1, -1, 84, -1, -1, -1, 88, 89, 1, ! -1, -1, 4, 5, 6, 7, -1, -1, -1, 878, ! 12, 13, 14, 48, 49, 50, 51, 52, 53, 54, ! 55, 56, 57, 58, 59, 60, 28, -1, 30, -1, ! -1, -1, 654, 655, -1, -1, 658, 659, -1, -1, ! 909, -1, -1, -1, -1, 914, -1, 4, 917, 6, ! 7, 53, -1, -1, -1, 12, 13, 14, -1, -1, ! -1, 930, -1, -1, 933, -1, 935, -1, -1, -1, ! -1, 28, -1, 75, -1, -1, -1, -1, 80, -1, ! 702, 703, 704, 705, -1, -1, -1, 89, 710, 711, ! 712, 713, -1, -1, -1, -1, 53, -1, -1, -1, ! -1, -1, 971, 1, -1, -1, 4, 5, 6, 7, ! -1, -1, -1, -1, 12, 13, 14, -1, 75, -1, ! 656, 657, -1, 80, 660, 661, -1, 996, -1, -1, ! 28, 1000, 30, -1, -1, -1, -1, -1, -1, 1008, ! -1, -1, 1011, 51, 52, 53, 54, 55, 56, 57, ! 58, 59, 60, 654, 655, 53, -1, 658, 659, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! 706, 707, 708, 709, -1, -1, -1, 75, 714, 715, ! 716, 717, 80, 656, 657, -1, -1, 660, 661, -1, ! -1, 89, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, 702, 703, 704, 705, -1, -1, -1, -1, 710, ! 711, 712, 713, -1, -1, 43, 44, 45, -1, 47, ! 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, ! 58, 59, 60, 706, 707, 708, 709, -1, -1, -1, ! -1, 714, 715, 716, 717, 1, -1, 3, 4, 5, ! 6, 7, 8, 9, -1, 11, 12, 13, 14, 15, ! 88, 17, 18, 19, 20, 21, 22, 23, 24, 25, ! 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, ! 36, 37, -1, -1, -1, -1, 42, -1, -1, -1, ! -1, -1, 48, -1, -1, 51, -1, 53, -1, -1, ! 56, 57, 58, -1, -1, 61, 62, -1, -1, -1, ! 66, 67, -1, -1, -1, -1, 72, -1, 74, 75, ! -1, -1, -1, 79, 80, -1, -1, -1, 84, 85, ! 86, 87, -1, 89, 1, 91, 3, 4, 5, 6, ! 7, 8, 9, -1, 11, 12, 13, 14, 15, -1, ! 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, ! 27, 28, 29, 30, 31, -1, 33, 34, 35, 36, ! 37, -1, -1, -1, -1, 42, -1, -1, -1, -1, ! -1, 48, -1, -1, 51, -1, 53, -1, -1, 56, ! 57, 58, -1, -1, 61, 62, -1, -1, -1, 66, ! 67, -1, -1, -1, -1, 72, -1, 74, 75, -1, ! -1, -1, 79, 80, -1, -1, -1, 84, -1, 86, ! 87, -1, 89, 1, 91, 3, 4, -1, -1, -1, ! 8, 9, -1, 11, -1, -1, -1, 15, -1, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, ! -1, 29, -1, 31, -1, 33, 34, 35, 36, 37, ! -1, -1, -1, -1, 42, -1, -1, -1, -1, -1, ! 48, -1, -1, 51, -1, -1, -1, -1, 56, 57, ! 58, -1, -1, 61, 62, -1, -1, -1, 66, 67, ! -1, -1, -1, -1, 72, -1, 74, 75, -1, -1, ! -1, 79, 80, -1, -1, -1, 84, -1, 86, 87, ! -1, 89, 1, 91, 3, 4, -1, -1, -1, 8, ! 9, -1, 11, -1, -1, -1, 15, -1, 17, 18, ! 19, 20, 21, 22, 23, 24, 25, 26, 27, -1, ! 29, -1, 31, -1, 33, 34, 35, 36, 37, -1, ! -1, -1, -1, 42, -1, -1, -1, -1, -1, 48, ! -1, -1, 51, -1, -1, -1, -1, 56, 57, 58, ! -1, -1, 61, 62, -1, -1, -1, 66, 67, -1, ! -1, -1, -1, 72, -1, 74, 75, -1, -1, -1, ! 79, 80, -1, -1, -1, 84, -1, 86, 87, -1, ! 89, 1, 91, 3, 4, -1, -1, -1, 8, 9, ! 45, 11, 47, 48, 49, 50, 51, 52, 53, 54, ! 55, 56, 57, 58, 59, 60, -1, -1, -1, 29, ! -1, 31, -1, 33, 34, 35, 36, 37, -1, -1, ! -1, -1, 42, -1, -1, -1, -1, -1, 48, -1, ! -1, 51, -1, -1, -1, -1, 56, 57, 58, -1, ! -1, 61, 62, -1, -1, 65, 66, 67, -1, -1, ! -1, -1, 72, -1, 74, 75, -1, -1, -1, 79, ! 80, -1, -1, -1, -1, 85, 86, 87, -1, 89, ! 1, 91, 3, 4, -1, -1, -1, 8, 9, -1, ! 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 29, -1, ! 31, -1, 33, 34, 35, 36, 37, -1, -1, -1, ! -1, 42, -1, -1, -1, -1, -1, 48, -1, -1, ! 51, -1, -1, -1, -1, 56, 57, 58, -1, -1, ! 61, 62, -1, -1, 65, 66, 67, -1, -1, -1, ! -1, 72, -1, 74, 75, -1, -1, -1, 79, 80, ! -1, -1, -1, -1, 85, 86, 87, 1, 89, 3, ! 91, -1, -1, -1, 8, 9, -1, 11, -1, -1, ! 4, 5, 6, 7, -1, -1, -1, -1, 12, 13, ! 14, -1, -1, -1, -1, 29, -1, 31, -1, 33, ! 34, 35, 36, 37, 28, -1, 30, -1, 42, 43, ! -1, -1, -1, -1, 48, -1, -1, 51, -1, -1, ! -1, -1, 56, 57, 58, -1, -1, 61, 62, 53, ! -1, 65, 66, 67, 1, -1, 3, -1, 72, -1, ! 74, 8, 9, -1, 11, 79, -1, -1, -1, -1, ! -1, 75, 86, 87, -1, 89, 80, 91, -1, -1, ! 84, -1, 29, -1, 31, -1, 33, 34, 35, 36, ! 37, -1, -1, -1, -1, 42, -1, -1, -1, -1, ! -1, 48, -1, -1, 51, -1, -1, -1, -1, 56, ! 57, 58, -1, -1, 61, 62, -1, -1, -1, 66, ! 67, 1, -1, 3, -1, 72, -1, 74, 8, 9, ! -1, 11, 79, -1, -1, -1, -1, -1, -1, 86, ! 87, -1, 89, -1, 91, -1, -1, -1, -1, 29, ! -1, 31, -1, 33, 34, 35, 36, 37, -1, -1, ! -1, -1, 42, -1, -1, -1, -1, -1, 48, -1, ! -1, 51, -1, -1, -1, -1, 56, 57, 58, -1, ! -1, 61, 62, -1, -1, -1, 66, 67, -1, -1, ! -1, -1, 72, -1, 74, -1, -1, -1, -1, 79, ! -1, -1, -1, -1, -1, -1, 86, 87, -1, 89, ! -1, 91, 3, 4, 5, 6, 7, 8, 9, -1, ! 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, ! 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, ! 31, -1, 33, 34, 35, 36, 37, -1, -1, -1, ! -1, 42, -1, -1, -1, -1, -1, 48, -1, -1, ! 51, -1, 53, -1, -1, 56, 57, 58, -1, -1, ! 61, 62, -1, -1, -1, 66, 67, -1, -1, -1, ! -1, 72, -1, 74, 75, -1, -1, -1, 79, 80, ! -1, -1, -1, 84, -1, 86, 87, -1, 89, -1, ! 91, 3, 4, 5, 6, 7, 8, 9, -1, 11, ! 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, 28, 29, 30, 31, ! -1, 33, 34, 35, 36, 37, -1, -1, -1, -1, ! 42, -1, -1, -1, -1, -1, 48, -1, -1, 51, ! -1, 53, -1, -1, 56, 57, 58, -1, -1, 61, ! 62, -1, -1, -1, 66, 67, -1, -1, -1, -1, ! 72, -1, 74, 75, 3, 4, -1, 79, 80, 8, ! 9, -1, 11, -1, 86, 87, -1, -1, 90, 91, ! -1, -1, 21, 22, 23, 24, 25, 26, 27, -1, ! 29, -1, 31, -1, 33, 34, 35, 36, 37, -1, ! -1, -1, -1, 42, -1, -1, -1, -1, -1, 48, ! -1, -1, 51, -1, -1, -1, -1, 56, 57, 58, ! -1, -1, 61, 62, -1, -1, -1, 66, 67, -1, ! -1, -1, -1, 72, -1, 74, 75, -1, -1, -1, ! 79, 80, -1, -1, -1, 84, -1, 86, 87, -1, ! 89, -1, 91, 3, 4, 5, 6, 7, 8, 9, ! -1, 11, 12, 13, 14, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 28, 29, ! 30, 31, -1, 33, 34, 35, 36, 37, -1, -1, ! -1, -1, 42, -1, -1, -1, -1, -1, 48, -1, ! -1, 51, -1, 53, -1, -1, 56, 57, 58, -1, ! -1, 61, 62, -1, -1, -1, 66, 67, -1, -1, ! -1, -1, 72, -1, 74, 75, -1, -1, -1, 79, ! 80, -1, -1, -1, -1, -1, 86, 87, -1, 3, ! 4, 91, 6, 7, 8, 9, -1, 11, 12, 13, ! 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 28, 29, 30, 31, -1, 33, ! 34, 35, 36, 37, -1, -1, -1, -1, 42, -1, ! -1, -1, -1, -1, 48, -1, -1, 51, -1, 53, ! -1, -1, 56, 57, 58, -1, -1, 61, 62, -1, ! -1, -1, 66, 67, -1, -1, -1, -1, 72, -1, ! 74, 75, 3, -1, 5, 79, 80, 8, 9, -1, ! 11, -1, 86, 87, -1, -1, -1, 91, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 29, -1, ! 31, -1, 33, 34, 35, 36, 37, -1, -1, -1, ! -1, 42, -1, -1, -1, -1, -1, 48, -1, -1, ! 51, -1, -1, -1, -1, 56, 57, 58, -1, -1, ! 61, 62, -1, -1, -1, 66, 67, -1, -1, 3, ! -1, 72, -1, 74, 8, 9, -1, 11, 79, -1, ! -1, -1, -1, -1, -1, 86, 87, -1, -1, 90, ! 91, -1, -1, -1, -1, 29, -1, 31, -1, 33, ! 34, 35, 36, 37, -1, -1, -1, -1, 42, -1, ! -1, -1, -1, -1, 48, -1, -1, 51, -1, -1, ! -1, -1, 56, 57, 58, -1, -1, 61, 62, -1, ! -1, -1, 66, 67, -1, -1, -1, -1, 72, -1, ! 74, 75, 3, -1, -1, 79, -1, 8, 9, -1, ! 11, -1, 86, 87, -1, -1, -1, 91, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 29, -1, ! 31, -1, 33, 34, 35, 36, 37, -1, -1, -1, ! -1, 42, -1, -1, -1, -1, -1, 48, -1, -1, ! 51, -1, -1, -1, -1, 56, 57, 58, -1, -1, ! 61, 62, -1, -1, -1, 66, 67, -1, -1, 3, ! -1, 72, -1, 74, 8, 9, -1, 11, 79, -1, ! -1, -1, -1, -1, -1, 86, 87, -1, -1, 90, ! 91, -1, -1, -1, -1, 29, -1, 31, -1, 33, ! 34, 35, 36, 37, -1, -1, -1, -1, 42, -1, ! -1, -1, -1, -1, 48, -1, -1, 51, -1, -1, ! -1, -1, 56, 57, 58, -1, -1, 61, 62, -1, ! -1, -1, 66, 67, -1, -1, 3, -1, 72, -1, ! 74, 8, 9, -1, 11, 79, -1, -1, -1, -1, ! -1, -1, 86, 87, -1, 89, -1, 91, -1, -1, ! -1, -1, 29, -1, 31, -1, 33, 34, 35, 36, ! 37, -1, -1, -1, -1, 42, -1, -1, -1, -1, ! -1, 48, -1, -1, 51, -1, -1, -1, -1, 56, ! 57, 58, -1, -1, 61, 62, -1, -1, -1, 66, ! 67, -1, -1, 3, -1, 72, -1, 74, 8, 9, ! -1, 11, 79, -1, -1, -1, -1, -1, -1, 86, ! 87, -1, -1, 90, 91, -1, -1, -1, -1, 29, ! -1, 31, -1, 33, 34, 35, 36, 37, -1, -1, ! -1, -1, 42, -1, -1, -1, -1, -1, 48, -1, ! -1, 51, -1, -1, -1, -1, 56, 57, 58, -1, ! -1, 61, 62, -1, -1, -1, 66, 67, -1, -1, ! 3, -1, 72, -1, 74, 8, 9, -1, 11, 79, ! -1, -1, -1, -1, 84, -1, 86, 87, -1, -1, ! -1, 91, -1, -1, -1, -1, 29, -1, 31, -1, ! 33, 34, 35, 36, 37, -1, -1, -1, -1, 42, ! -1, -1, -1, -1, -1, 48, -1, -1, 51, -1, ! -1, -1, -1, 56, 57, 58, -1, -1, 61, 62, ! -1, -1, -1, 66, 67, -1, -1, 3, -1, 72, ! -1, 74, 8, 9, -1, 11, 79, -1, -1, -1, ! -1, -1, -1, 86, 87, -1, -1, -1, 91, -1, ! -1, -1, -1, 29, -1, 31, -1, 33, 34, 35, ! 36, 37, -1, -1, -1, -1, 42, -1, -1, -1, ! -1, -1, 48, -1, -1, 51, -1, -1, -1, -1, ! 56, 57, 58, -1, -1, 61, 62, -1, -1, -1, ! 66, 67, -1, -1, 3, -1, 72, -1, 74, 8, ! 9, -1, 11, 79, -1, -1, -1, -1, -1, -1, ! 86, 87, -1, -1, -1, 91, -1, -1, -1, -1, ! 29, -1, 31, -1, 33, 34, 35, 36, 37, -1, ! -1, -1, -1, 42, -1, -1, -1, -1, -1, 48, ! -1, -1, 51, -1, -1, -1, -1, 56, 57, 58, ! -1, -1, 61, 62, -1, -1, -1, 66, 67, -1, ! -1, 3, -1, 72, -1, 74, 8, 9, -1, 11, ! 79, -1, -1, -1, -1, -1, -1, 86, 87, -1, ! -1, -1, 91, -1, -1, -1, -1, 29, -1, 31, ! -1, 33, 34, 35, 36, 37, -1, -1, -1, 1, ! 42, -1, 4, 5, 6, 7, 48, -1, -1, 51, ! 12, 13, 14, -1, 56, 57, 58, -1, -1, 61, ! 62, -1, -1, -1, 66, 67, 28, -1, -1, -1, ! 72, -1, 74, -1, -1, -1, -1, 79, -1, 30, ! -1, -1, -1, -1, 86, 87, -1, -1, -1, 91, ! -1, 53, 43, 44, 45, -1, 47, 48, 49, 50, ! 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, ! -1, -1, -1, 75, -1, -1, -1, -1, 80, -1, ! 3, 4, -1, 6, 7, -1, -1, 89, 11, 12, ! 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, ! 23, 24, 25, 26, 27, 28, 29, 1, -1, -1, ! 4, -1, 6, 7, -1, -1, -1, -1, 12, 13, ! 14, -1, -1, 46, -1, -1, 1, -1, -1, 4, ! -1, 6, 7, -1, 28, -1, 30, 12, 13, 14, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 75, 28, -1, 30, -1, 80, -1, 53, ! -1, -1, -1, -1, -1, 88, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, ! -1, 75, 76, 77, 78, -1, 80, -1, -1, -1, ! 84, 85, -1, -1, -1, -1, -1, -1, -1, -1, ! 75, 76, 77, 78, -1, 80, -1, -1, 1, 84, ! 85, 4, -1, 6, 7, -1, -1, -1, -1, 12, ! 13, 14, -1, -1, -1, -1, -1, -1, 1, -1, ! 3, 4, 5, 6, 7, 28, -1, 30, 31, 12, ! 13, 14, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 27, 28, -1, 30, 31, -1, ! 53, 1, -1, 3, 4, 5, 6, 7, -1, -1, ! -1, -1, 12, 13, 14, -1, -1, -1, -1, -1, ! 53, -1, 75, 56, 57, 58, -1, 80, 28, -1, ! 30, 84, 85, 66, -1, -1, 69, 70, 71, -1, ! -1, -1, 75, -1, -1, -1, 79, 80, 81, 82, ! -1, 84, -1, 53, -1, -1, 56, 57, 58, 1, ! -1, 3, 4, 5, 6, 7, 66, -1, -1, -1, ! 12, 13, 14, -1, -1, 75, -1, -1, -1, -1, ! 80, -1, -1, -1, 84, -1, 28, 1, 30, 3, ! 4, 5, 6, 7, -1, -1, 10, -1, 12, 13, ! 14, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, 53, -1, -1, 28, -1, 58, -1, -1, -1, ! -1, -1, -1, 1, 66, -1, 4, 5, 6, 7, ! -1, -1, 10, 75, 12, 13, 14, -1, 80, 53, ! -1, -1, 84, -1, 4, 5, 6, 7, -1, -1, ! 28, -1, 12, 13, 14, 4, 5, 6, 7, -1, ! -1, 75, -1, 12, 13, 14, 80, -1, 28, 83, ! 30, -1, -1, -1, -1, 53, -1, -1, -1, 28, ! -1, 30, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, 53, -1, -1, -1, 75, -1, -1, ! -1, -1, 80, -1, 53, 83, -1, -1, 4, 5, ! 6, 7, -1, -1, -1, 75, 12, 13, 14, -1, ! 80, -1, -1, -1, 84, -1, 75, -1, -1, -1, ! -1, 80, 28, -1, 30, 84, 4, 5, 6, 7, ! -1, -1, -1, -1, 12, 13, 14, -1, -1, -1, ! -1, -1, -1, 4, 5, 6, 7, 53, -1, -1, ! 28, 12, 13, 14, -1, 4, 5, 6, 7, -1, ! -1, -1, -1, 12, 13, 14, -1, 28, -1, 75, ! -1, -1, -1, -1, 80, 53, -1, -1, 84, 28, ! -1, 4, 5, 6, 7, -1, -1, -1, -1, 12, ! 13, 14, 53, -1, -1, -1, -1, 75, -1, -1, ! -1, -1, 80, -1, 53, 28, 84, -1, -1, -1, ! -1, -1, -1, -1, 75, -1, -1, -1, -1, 80, ! -1, -1, -1, 84, -1, -1, 75, -1, -1, -1, ! 53, 80, 43, 44, 45, 84, 47, 48, 49, 50, ! 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, ! -1, -1, 75, -1, -1, 3, 4, 80, 6, 7, ! -1, 84, -1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, ! 28, 29, -1, -1, -1, -1, -1, -1, -1, -1, ! -1, 3, 4, -1, 6, 7, -1, -1, 46, 11, ! 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, ! 22, 23, 24, 25, 26, 27, 28, 29, 66, -1, ! -1, -1, -1, -1, -1, -1, -1, 75, -1, -1, ! -1, -1, 80, -1, 46, 3, 4, -1, 6, 7, ! -1, -1, -1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, ! 28, 29, -1, 75, -1, -1, -1, -1, 80, -1, ! -1, 3, 4, -1, 6, 7, -1, -1, 46, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, ! 22, 23, 24, 25, 26, 27, 28, 29, -1, -1, ! 4, 5, 6, 7, -1, -1, 10, 75, 12, 13, ! 14, -1, 80, -1, 46, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, 28, -1, 30, -1, 4, 5, ! 6, 7, -1, -1, 10, -1, 12, 13, 14, -1, ! -1, -1, -1, 75, -1, -1, -1, -1, 80, 53, ! -1, -1, 28, -1, 4, 5, 6, 7, 4, 5, ! 6, 7, 12, 13, 14, -1, 12, 13, 14, -1, ! -1, 75, -1, -1, -1, -1, 80, 53, 28, -1, ! 30, -1, 28, -1, 30, -1, 4, 5, 6, 7, ! -1, -1, -1, -1, 12, 13, 14, -1, -1, 75, ! -1, -1, -1, 53, 80, -1, -1, 53, -1, -1, ! 28, -1, 30, -1, 4, 5, 6, 7, 4, 5, ! 6, 7, 12, 13, 14, 75, 12, 13, 14, 75, ! 80, -1, -1, -1, 80, 53, -1, -1, 28, -1, ! 30, -1, 28, -1, 30, -1, 4, -1, 6, 7, ! 4, -1, 6, 7, 12, 13, 14, 75, 12, 13, ! 14, -1, 80, 53, -1, -1, -1, 53, -1, -1, ! 28, -1, 30, -1, 28, -1, 30, -1, 4, -1, ! 6, 7, -1, -1, -1, 75, 12, 13, 14, 75, ! 80, -1, -1, -1, 80, 53, -1, -1, -1, 53, ! -1, -1, 28, -1, 30, -1, 4, 5, 6, 7, ! 4, 5, 6, 7, 12, 13, 14, 75, 12, 13, ! 14, 75, 80, -1, -1, -1, 80, 53, -1, -1, ! 28, -1, -1, -1, 28, -1, 4, 5, 6, 7, ! -1, -1, -1, -1, 12, 13, 14, -1, -1, 75, ! -1, -1, -1, -1, 80, 53, -1, -1, -1, 53, ! 28, -1, -1, -1, 4, 5, 6, 7, -1, -1, ! -1, -1, 12, 13, 14, -1, -1, 75, -1, -1, ! -1, 75, 80, -1, -1, 53, 80, -1, 28, -1, ! 4, 5, 6, 7, 4, -1, 6, 7, 12, 13, ! 14, -1, 12, 13, 14, -1, -1, 75, -1, -1, ! -1, -1, 80, 53, 28, 43, 44, 45, 28, 47, ! 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, ! 58, 59, 60, -1, -1, 75, -1, -1, -1, 53, ! 80, -1, -1, 53, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ! 88, 75, -1, -1, -1, 75, 80, 43, 44, 45, ! 80, 47, 48, 49, 50, 51, 52, 53, 54, 55, ! 56, 57, 58, 59, 60, 43, 44, 45, -1, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, ! 58, 59, 60, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, 88, -1, -1, -1, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, 83, 43, 44, 45, 46, ! 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, ! 57, 58, 59, 60 }; ! /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing ! symbol of state STATE-NUM. */ ! static const unsigned short yystos[] = { ! 0, 93, 94, 95, 0, 96, 1, 4, 5, 6, ! 7, 12, 13, 14, 27, 28, 30, 31, 53, 56, ! 57, 69, 70, 71, 75, 79, 80, 81, 82, 84, ! 97, 98, 99, 114, 131, 134, 135, 136, 137, 138, ! 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, ! 149, 150, 151, 157, 159, 160, 161, 162, 163, 172, ! 173, 199, 200, 201, 202, 207, 292, 293, 295, 296, ! 297, 307, 310, 317, 318, 97, 84, 85, 172, 172, ! 172, 66, 66, 3, 4, 75, 80, 106, 294, 106, ! 106, 309, 310, 106, 294, 309, 294, 106, 66, 3, ! 58, 66, 165, 169, 198, 5, 7, 159, 160, 172, ! 5, 7, 159, 160, 5, 7, 159, 160, 172, 5, ! 7, 159, 160, 5, 7, 161, 162, 172, 5, 7, ! 161, 162, 5, 7, 161, 162, 172, 5, 7, 161, ! 162, 5, 7, 159, 160, 172, 5, 7, 159, 160, ! 5, 7, 159, 160, 172, 5, 7, 159, 160, 5, ! 7, 161, 162, 172, 5, 7, 161, 162, 5, 7, ! 161, 162, 172, 5, 7, 161, 162, 131, 131, 84, ! 173, 89, 106, 89, 106, 89, 106, 97, 319, 3, ! 8, 9, 11, 29, 33, 34, 35, 36, 37, 42, ! 48, 51, 56, 57, 58, 61, 62, 66, 67, 72, ! 74, 79, 86, 87, 91, 107, 108, 110, 111, 112, ! 113, 115, 116, 122, 124, 125, 246, 292, 349, 355, ! 356, 357, 66, 53, 88, 46, 66, 309, 46, 66, ! 89, 309, 84, 84, 106, 108, 134, 135, 136, 137, ! 138, 139, 140, 141, 156, 219, 134, 135, 136, 137, ! 155, 158, 171, 172, 84, 88, 1, 27, 66, 67, ! 104, 166, 227, 4, 58, 66, 80, 164, 167, 193, ! 194, 198, 165, 198, 73, 210, 211, 89, 210, 89, ! 206, 89, 3, 4, 6, 7, 11, 12, 13, 14, ! 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, ! 25, 26, 27, 28, 29, 46, 66, 75, 80, 330, ! 339, 340, 341, 342, 343, 115, 115, 66, 66, 66, ! 106, 115, 1, 89, 108, 219, 350, 66, 66, 66, ! 9, 115, 83, 88, 66, 111, 66, 111, 43, 44, ! 45, 47, 48, 49, 50, 51, 52, 53, 54, 55, ! 56, 57, 58, 59, 60, 61, 62, 65, 66, 67, ! 68, 9, 91, 1, 85, 235, 244, 115, 5, 6, ! 7, 106, 174, 175, 176, 106, 106, 106, 89, 300, ! 106, 106, 304, 308, 84, 83, 220, 83, 198, 198, ! 132, 171, 66, 171, 287, 5, 58, 90, 108, 156, ! 1, 126, 127, 128, 234, 253, 171, 158, 171, 84, ! 88, 1, 100, 166, 66, 227, 84, 1, 102, 66, ! 85, 1, 84, 134, 135, 136, 137, 138, 139, 140, ! 141, 154, 155, 212, 292, 203, 85, 204, 1, 106, ! 217, 218, 205, 66, 106, 219, 320, 88, 337, 341, ! 343, 46, 116, 116, 219, 83, 83, 83, 75, 108, ! 348, 46, 341, 352, 353, 354, 219, 106, 84, 116, ! 219, 219, 116, 116, 119, 121, 118, 117, 116, 116, ! 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, ! 106, 109, 110, 108, 106, 9, 83, 32, 239, 240, ! 241, 83, 83, 88, 66, 309, 83, 298, 322, 323, ! 89, 83, 311, 313, 322, 58, 66, 221, 223, 224, ! 225, 226, 227, 83, 169, 198, 124, 288, 108, 156, ! 90, 90, 5, 58, 90, 108, 84, 105, 234, 10, ! 127, 254, 43, 194, 194, 132, 126, 171, 287, 126, ! 75, 171, 131, 131, 84, 212, 210, 171, 210, 43, ! 88, 209, 217, 219, 83, 84, 331, 10, 338, 66, ! 106, 88, 88, 88, 89, 115, 351, 46, 83, 341, ! 354, 83, 83, 83, 83, 108, 46, 116, 116, 83, ! 90, 106, 291, 1, 130, 228, 229, 230, 231, 232, ! 233, 234, 245, 253, 257, 258, 241, 83, 175, 3, ! 109, 89, 303, 309, 311, 71, 98, 131, 150, 151, ! 317, 324, 327, 305, 76, 77, 78, 85, 312, 1, ! 84, 154, 155, 314, 71, 158, 171, 277, 66, 227, ! 83, 1, 3, 10, 134, 135, 138, 139, 142, 143, ! 146, 147, 152, 153, 279, 282, 283, 285, 289, 290, ! 90, 108, 108, 90, 90, 253, 129, 152, 153, 170, ! 83, 167, 193, 101, 43, 103, 83, 213, 215, 253, ! 214, 216, 253, 85, 85, 116, 218, 85, 209, 83, ! 339, 340, 134, 135, 136, 137, 138, 139, 140, 141, ! 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, ! 234, 332, 333, 334, 321, 282, 283, 219, 219, 116, ! 219, 123, 46, 341, 344, 345, 347, 46, 116, 84, ! 88, 130, 257, 258, 130, 257, 258, 253, 257, 258, ! 130, 257, 258, 234, 85, 254, 83, 88, 83, 301, ! 322, 306, 85, 131, 131, 328, 325, 327, 311, 313, ! 131, 131, 84, 224, 225, 223, 278, 171, 277, 83, ! 131, 286, 286, 83, 84, 88, 83, 88, 90, 90, ! 254, 84, 131, 84, 131, 1, 89, 116, 177, 253, ! 168, 253, 88, 254, 88, 254, 171, 171, 171, 85, ! 106, 337, 84, 131, 84, 334, 234, 1, 89, 242, ! 243, 247, 83, 83, 88, 83, 1, 3, 65, 89, ! 106, 116, 179, 180, 181, 183, 185, 186, 110, 346, ! 46, 90, 341, 347, 120, 106, 254, 236, 4, 21, ! 22, 23, 24, 25, 26, 27, 75, 80, 84, 106, ! 108, 133, 150, 151, 157, 237, 247, 269, 270, 292, ! 110, 311, 71, 322, 299, 330, 98, 85, 46, 193, ! 315, 316, 315, 83, 279, 4, 58, 66, 80, 195, ! 196, 197, 198, 222, 223, 224, 58, 66, 198, 222, ! 280, 10, 150, 151, 284, 3, 242, 164, 165, 178, ! 254, 177, 254, 132, 46, 193, 132, 46, 198, 171, ! 195, 198, 222, 335, 336, 247, 244, 106, 116, 106, ! 184, 46, 85, 88, 208, 43, 186, 183, 346, 116, ! 116, 46, 84, 84, 84, 108, 58, 106, 7, 271, ! 253, 84, 131, 131, 84, 15, 17, 18, 19, 20, ! 248, 249, 251, 259, 133, 83, 85, 71, 322, 329, ! 116, 46, 88, 158, 171, 171, 66, 227, 66, 227, ! 171, 172, 158, 171, 171, 171, 131, 131, 84, 84, ! 179, 242, 242, 215, 253, 116, 46, 171, 216, 116, ! 46, 171, 171, 171, 84, 88, 83, 179, 182, 181, ! 183, 10, 46, 84, 108, 84, 66, 254, 164, 187, ! 193, 165, 190, 198, 250, 261, 252, 263, 66, 16, ! 1, 237, 256, 1, 66, 238, 302, 71, 1, 84, ! 326, 116, 132, 196, 197, 197, 287, 287, 281, 195, ! 198, 222, 198, 222, 85, 254, 171, 116, 171, 116, ! 336, 85, 183, 116, 84, 108, 46, 84, 188, 84, ! 191, 66, 66, 256, 66, 108, 1, 260, 255, 257, ! 258, 108, 322, 316, 83, 279, 171, 171, 171, 171, ! 171, 46, 46, 83, 171, 126, 126, 108, 108, 17, ! 108, 133, 268, 272, 83, 256, 238, 255, 83, 71, ! 9, 67, 273, 274, 275, 84, 189, 192, 83, 83, ! 264, 84, 267, 84, 66, 106, 46, 83, 88, 253, ! 253, 262, 272, 256, 108, 90, 273, 84, 275, 254, ! 254, 256, 84, 83, 9, 46, 83, 247, 247, 265, ! 66, 124, 276, 84, 272, 108, 83, 88, 83, 83, ! 84, 124, 266, 256 }; #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ #endif --- 853,2370 ---- 4, 0, 0, 7, 0, 5, 3, 3, 1, 1, 1, 1, 0, 7, 3, 3, 3, 3, 4, 6, 8, 6, 4, 3, 3, 2, 2, 1, 1, 1, ! 1, 1, 2, 3, 1, 0, 1, 3, 1, 1, ! 2, 2, 4, 4, 2, 2, 3, 0, 1, 4, ! 4, 3, 3, 2, 2, 1, 2, 2, 2, 2, ! 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, ! 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, ! 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, ! 4, 4, 1, 4, 1, 4, 0, 4, 0, 6, ! 3, 0, 6, 3, 0, 1, 1, 2, 6, 1, ! 3, 0, 1, 4, 6, 4, 1, 1, 1, 1, 1, 1, 1, 0, 4, 1, 0, 2, 1, 3, 3, 2, 0, 4, 1, 0, 4, 1, 1, 1, ! 2, 2, 5, 3, 0, 0, 7, 0, 0, 7, ! 1, 1, 4, 3, 2, 3, 1, 1, 1, 1, ! 3, 2, 1, 1, 3, 2, 3, 3, 4, 3, ! 4, 3, 2, 1, 1, 2, 1, 2, 1, 2, ! 0, 7, 5, 0, 7, 5, 0, 8, 0, 7, ! 2, 2, 2, 0, 1, 0, 1, 1, 2, 0, ! 3, 2, 4, 3, 4, 3, 1, 1, 2, 1, ! 4, 1, 4, 4, 6, 5, 4, 6, 5, 1, ! 3, 1, 1, 3, 0, 3, 0, 1, 0, 1, ! 2, 1, 1, 1, 3, 2, 3, 4, 3, 2, ! 2, 1, 4, 3, 4, 5, 5, 1, 1, 1, ! 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, ! 1, 2, 2, 2, 2, 1, 2, 1, 1, 1, ! 1, 2, 0, 0, 0, 0, 0, 1, 1, 2, ! 3, 1, 2, 1, 1, 5, 1, 1, 2, 2, ! 2, 2, 0, 5, 0, 4, 0, 0, 1, 2, ! 3, 3, 3, 0, 4, 1, 3, 0, 0, 7, ! 5, 2, 0, 0, 0, 0, 12, 0, 6, 2, ! 1, 1, 2, 3, 2, 2, 2, 3, 6, 8, ! 10, 12, 3, 4, 1, 3, 5, 2, 5, 0, ! 1, 0, 1, 0, 1, 1, 3, 4, 7, 1, ! 3, 0, 3, 2, 0, 0, 6, 2, 0, 1, ! 1, 3, 1, 3, 4, 4, 3, 4, 3, 4, ! 4, 3, 4, 3, 1, 0, 3, 1, 2, 1, ! 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, ! 1, 3, 3, 4, 0, 0, 10, 0, 6, 0, ! 0, 12, 0, 8, 0, 6, 2, 0, 8, 4, ! 0, 9, 5, 0, 6, 3, 0, 1, 3, 3, ! 1, 1, 1, 1, 0, 3, 2, 3, 3, 1, ! 0, 1, 4, 1, 3, 2, 1, 1, 0, 0, ! 0, 7, 0, 0, 2, 1, 1, 2, 0, 3, ! 1, 1, 0, 0, 5, 4, 1, 5, 2, 0, ! 2, 0, 1, 1, 1, 2, 2, 4, 2, 2, ! 1, 3, 2, 2, 1, 0, 2, 0, 3, 1, ! 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 6, 3, ! 5, 2, 1, 1, 1, 2, 1, 3, 2, 1, ! 1, 4, 1, 1, 1, 2, 2, 1, 4, 4, ! 4 }; ! /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE ! doesn't specify something else to do. Zero means the default is an ! error. */ ! static const short yydefact[] = { ! 3, 5, 0, 0, 0, 276, 311, 310, 273, 135, ! 368, 364, 366, 0, 61, 0, 573, 0, 626, 627, ! 0, 0, 579, 606, 0, 606, 0, 0, 19, 4, ! 7, 9, 8, 0, 0, 220, 221, 222, 223, 212, ! 213, 214, 215, 224, 225, 226, 227, 216, 217, 218, ! 219, 127, 127, 0, 143, 150, 270, 272, 271, 141, ! 296, 167, 0, 0, 0, 275, 274, 0, 10, 575, ! 576, 574, 577, 279, 628, 578, 6, 17, 18, 369, ! 365, 367, 0, 0, 32, 33, 35, 34, 580, 0, ! 606, 596, 277, 607, 606, 0, 278, 0, 0, 0, ! 363, 268, 294, 0, 284, 0, 136, 148, 154, 138, ! 170, 137, 149, 155, 171, 139, 160, 165, 142, 177, ! 140, 161, 166, 178, 144, 146, 152, 151, 188, 145, ! 147, 153, 189, 156, 158, 163, 162, 203, 157, 159, ! 164, 204, 168, 186, 195, 174, 172, 169, 187, 196, ! 173, 175, 201, 210, 181, 179, 176, 202, 211, 180, ! 182, 184, 193, 192, 190, 183, 185, 194, 191, 197, ! 199, 208, 207, 205, 198, 200, 209, 206, 0, 0, ! 16, 297, 389, 380, 389, 381, 378, 382, 12, 0, ! 88, 89, 90, 59, 60, 0, 0, 0, 0, 0, ! 91, 0, 36, 38, 37, 0, 39, 40, 0, 0, ! 0, 0, 0, 41, 42, 0, 0, 0, 43, 62, ! 0, 0, 64, 46, 48, 111, 0, 0, 107, 108, ! 109, 110, 301, 608, 0, 0, 0, 587, 0, 0, ! 594, 603, 605, 582, 0, 0, 248, 249, 250, 251, ! 244, 245, 246, 247, 414, 0, 240, 241, 242, 243, ! 269, 0, 0, 295, 13, 294, 31, 0, 294, 268, ! 0, 294, 362, 346, 268, 294, 347, 0, 282, 0, ! 340, 341, 0, 0, 0, 0, 0, 370, 0, 373, ! 0, 376, 672, 673, 696, 697, 693, 677, 678, 679, ! 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, ! 690, 691, 692, 694, 695, 0, 0, 674, 675, 629, ! 646, 665, 669, 676, 670, 57, 58, 0, 0, 0, ! 52, 49, 0, 478, 0, 0, 710, 709, 0, 0, ! 0, 0, 112, 51, 0, 0, 0, 53, 0, 55, ! 0, 0, 81, 79, 77, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 105, 106, 0, ! 0, 44, 0, 0, 0, 474, 466, 0, 50, 308, ! 309, 306, 0, 299, 302, 307, 581, 606, 0, 584, ! 633, 599, 0, 614, 633, 583, 280, 416, 281, 361, ! 0, 0, 128, 0, 565, 359, 268, 269, 0, 0, ! 29, 114, 0, 486, 119, 487, 293, 0, 0, 15, ! 294, 23, 0, 294, 294, 344, 14, 27, 0, 0, ! 294, 397, 391, 240, 241, 242, 243, 236, 237, 238, ! 239, 127, 127, 388, 0, 389, 294, 389, 411, 412, ! 385, 409, 0, 0, 701, 0, 649, 667, 648, 0, ! 671, 0, 0, 0, 0, 95, 94, 0, 0, 702, ! 0, 703, 704, 717, 712, 0, 713, 714, 0, 0, ! 11, 47, 0, 0, 87, 86, 0, 0, 0, 0, ! 75, 76, 74, 73, 72, 70, 71, 65, 66, 67, ! 68, 69, 104, 103, 0, 45, 0, 113, 97, 0, ! 0, 467, 468, 96, 0, 301, 44, 592, 606, 614, ! 0, 0, 597, 602, 0, 0, 0, 268, 294, 415, ! 417, 422, 421, 423, 431, 360, 285, 286, 0, 0, ! 0, 0, 0, 433, 0, 461, 486, 121, 120, 0, ! 291, 345, 0, 0, 21, 290, 343, 25, 0, 372, ! 486, 486, 390, 398, 0, 375, 0, 0, 386, 0, ! 385, 0, 0, 0, 630, 666, 548, 0, 699, 0, ! 0, 0, 92, 63, 706, 708, 0, 711, 0, 705, ! 716, 718, 0, 715, 720, 719, 54, 56, 0, 0, ! 80, 78, 98, 102, 571, 0, 477, 446, 476, 486, ! 486, 486, 486, 0, 455, 0, 487, 441, 450, 469, ! 298, 300, 88, 0, 589, 633, 600, 0, 588, 636, ! 0, 127, 127, 642, 638, 635, 614, 613, 611, 612, ! 595, 614, 619, 616, 127, 127, 0, 604, 425, 541, ! 430, 294, 429, 287, 0, 569, 549, 232, 233, 228, ! 229, 234, 235, 230, 231, 127, 127, 567, 0, 550, ! 552, 566, 0, 0, 0, 434, 432, 487, 117, 127, ! 127, 0, 342, 283, 286, 486, 288, 486, 392, 393, ! 399, 487, 395, 401, 487, 294, 294, 413, 410, 294, ! 0, 0, 645, 665, 220, 221, 222, 223, 212, 213, ! 214, 215, 224, 225, 226, 227, 216, 217, 218, 219, ! 127, 0, 654, 650, 652, 0, 0, 668, 550, 0, ! 0, 0, 0, 0, 707, 82, 85, 470, 0, 447, ! 442, 451, 448, 443, 452, 487, 444, 453, 449, 445, ! 454, 456, 463, 464, 303, 0, 305, 614, 0, 633, ! 585, 0, 0, 0, 0, 637, 0, 0, 620, 620, ! 615, 424, 426, 0, 0, 541, 428, 547, 564, 418, ! 418, 543, 544, 0, 568, 0, 435, 436, 0, 124, ! 0, 125, 0, 315, 313, 312, 292, 487, 0, 487, ! 294, 394, 294, 0, 371, 374, 379, 294, 700, 647, ! 658, 418, 659, 655, 656, 0, 473, 631, 462, 471, ! 0, 99, 0, 101, 328, 88, 0, 0, 325, 0, ! 327, 0, 383, 318, 324, 0, 0, 0, 572, 464, ! 475, 276, 0, 0, 0, 0, 0, 0, 529, 606, ! 606, 524, 486, 0, 126, 127, 127, 0, 0, 511, ! 491, 492, 0, 0, 0, 593, 0, 633, 643, 639, ! 598, 0, 623, 617, 621, 618, 427, 542, 352, 268, ! 294, 353, 294, 348, 349, 294, 561, 419, 422, 268, ! 294, 294, 563, 294, 551, 127, 127, 553, 570, 30, ! 0, 0, 0, 0, 289, 0, 486, 0, 294, 486, ! 0, 294, 377, 294, 294, 664, 0, 660, 472, 479, ! 698, 0, 331, 46, 0, 322, 93, 0, 317, 0, ! 0, 330, 321, 83, 0, 527, 514, 515, 516, 0, ! 0, 0, 530, 0, 487, 512, 0, 0, 133, 482, ! 497, 484, 502, 0, 495, 0, 0, 465, 134, 304, ! 590, 601, 0, 0, 625, 0, 294, 425, 541, 559, ! 294, 351, 294, 355, 560, 420, 425, 541, 562, 545, ! 418, 418, 122, 123, 0, 22, 26, 400, 487, 294, ! 0, 403, 402, 294, 0, 406, 662, 663, 657, 418, ! 100, 0, 333, 0, 0, 319, 320, 0, 0, 525, ! 517, 0, 522, 0, 0, 0, 131, 334, 0, 132, ! 337, 0, 0, 464, 0, 0, 0, 481, 486, 480, ! 501, 0, 513, 633, 586, 641, 640, 644, 624, 0, ! 356, 357, 0, 350, 354, 0, 294, 294, 556, 294, ! 558, 314, 0, 405, 294, 408, 294, 661, 0, 326, ! 323, 0, 523, 0, 294, 129, 0, 130, 0, 0, ! 0, 0, 531, 0, 496, 464, 465, 488, 486, 0, ! 0, 622, 358, 546, 554, 555, 557, 404, 407, 332, ! 526, 533, 0, 528, 335, 338, 0, 0, 485, 532, ! 510, 503, 0, 507, 494, 490, 489, 0, 591, 0, ! 0, 0, 534, 535, 518, 486, 486, 483, 498, 531, ! 509, 464, 500, 0, 0, 533, 0, 0, 487, 487, ! 464, 0, 508, 0, 0, 0, 519, 536, 0, 0, ! 499, 504, 537, 0, 0, 0, 336, 339, 531, 0, ! 539, 0, 520, 0, 0, 0, 0, 505, 538, 521, ! 540, 464, 506, 0, 0, 0 }; static const short yydefgoto[] = { ! 1163, 1, 2, 3, 29, 30, 31, 32, 422, 685, ! 428, 687, 270, 546, 829, 216, 334, 504, 218, 219, ! 220, 221, 33, 222, 223, 489, 488, 486, 837, 487, ! 224, 733, 225, 410, 411, 412, 413, 678, 607, 34, ! 401, 854, 246, 247, 248, 249, 250, 251, 252, 253, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, ! 665, 666, 441, 260, 254, 53, 261, 54, 55, 56, ! 57, 58, 277, 103, 271, 278, 798, 104, 681, 402, ! 263, 60, 382, 383, 384, 61, 796, 902, 831, 832, ! 833, 1004, 834, 924, 835, 836, 1016, 1066, 1115, 1019, ! 1068, 1116, 684, 280, 913, 883, 884, 281, 62, 63, ! 64, 65, 445, 447, 452, 290, 66, 928, 569, 285, ! 286, 443, 689, 692, 690, 693, 450, 451, 255, 397, ! 529, 915, 887, 888, 532, 533, 272, 608, 609, 610, ! 611, 612, 613, 414, 376, 840, 1028, 1032, 510, 511, ! 512, 817, 818, 377, 615, 226, 819, 954, 955, 1021, ! 956, 1023, 415, 549, 1076, 1029, 1077, 1078, 957, 1075, ! 1022, 1130, 1024, 1119, 1148, 1161, 1121, 1101, 860, 861, ! 943, 1102, 1111, 1112, 1113, 1151, 650, 774, 667, 893, ! 1045, 668, 669, 897, 670, 779, 405, 539, 671, 672, ! 605, 227, 68, 89, 69, 70, 71, 519, 867, 390, ! 757, 1033, 625, 393, 636, 759, 72, 394, 92, 73, ! 524, 641, 525, 646, 873, 874, 74, 75, 189, 456, ! 726, 520, 521, 634, 764, 1037, 635, 763, 963, 319, ! 574, 723, 724, 725, 916, 917, 458, 576, 320, 321, ! 322, 323, 324, 470, 471, 585, 472, 338, 228, 475, ! 476, 477, 229, 230, 231 }; static const short yypact[] = { ! 102, 110, 3920, 3920, 36,-32768,-32768,-32768,-32768,-32768, ! 116, 116, 116, 87,-32768, 193,-32768, 210,-32768,-32768, ! 210, 210,-32768, 117, 210, 117, 210, 210,-32768,-32768, ! -32768,-32768,-32768, 208, 333, 3085, 1851, 4122, 2017, 514, ! 425, 760, 1016, 4150, 4207, 4179, 4233, 1159, 1072, 1293, ! 1193,-32768,-32768, 203,-32768,-32768,-32768,-32768,-32768, 116, ! -32768,-32768, 315, 317, 334,-32768,-32768, 3920,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 116, ! 116, 116, 3414, 228,-32768,-32768,-32768,-32768,-32768, 60, ! 304, 187,-32768,-32768, 418, 161,-32768, 363, 210, 3072, ! -32768, 89, 116, 389,-32768, 1683,-32768,-32768,-32768, 116, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 116,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768, 116,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768, 116,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768, 116,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, 116,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768, 116,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768, 116,-32768,-32768,-32768,-32768,-32768, 400, 333, ! -32768,-32768, 225, 264, 225, 276,-32768, 286,-32768, 4312, ! -32768,-32768,-32768,-32768,-32768, 3414, 3414, 331, 348, 355, ! -32768, 210,-32768,-32768,-32768, 3414,-32768,-32768, 1531, 1905, ! 361, 368, 374,-32768,-32768, 435, 3414, 370, 375,-32768, ! 3481, 3548,-32768, 4245, 1116, 379, 2142, 3414,-32768,-32768, ! -32768,-32768, 1246,-32768, 210, 210, 210, 376, 210, 210, ! -32768,-32768,-32768,-32768, 395, 416, 4683, 952, 4696, 1471, ! 700, 804, 856, 1082,-32768, 421, 160, 510, 222, 517, ! -32768, 333, 333, 116,-32768, 116,-32768, 465, 116, 221, ! 1501, 116,-32768,-32768, 89, 116,-32768, 451,-32768, 3723, ! 259, 422, 516, 3704, 479, 483, 1256,-32768, 485,-32768, ! 345,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768, 458, 4716,-32768,-32768,-32768, ! -32768, 3830, 527,-32768,-32768,-32768,-32768, 3414, 3414, 4716, ! -32768,-32768, 502,-32768, 537, 540,-32768,-32768, 4348, 4393, ! 4716, 210,-32768,-32768, 542, 3414, 1531,-32768, 1531,-32768, ! 3414, 3414, 622,-32768,-32768, 3414, 3414, 3414, 3414, 3414, ! 3414, 3414, 3414, 3414, 3414, 3414, 3414,-32768,-32768, 210, ! 210, 3414, 3414, 668, 612,-32768, 665, 616,-32768,-32768, ! -32768,-32768, 99,-32768, 644,-32768,-32768, 117, 634,-32768, ! 651, 635, 643,-32768, 651,-32768,-32768, 359,-32768, 422, ! 305, 333,-32768, 719,-32768,-32768, 89, 727, 3146, 650, ! -32768,-32768, 1728, 63,-32768,-32768, 693, 400, 400,-32768, ! 116,-32768, 1501, 116, 116,-32768,-32768,-32768, 1501, 669, ! 116,-32768,-32768, 4683, 952, 4696, 1471, 700, 804, 856, ! 1082,-32768, 478, 659, 1040, 225, 116, 225,-32768, 706, ! 663,-32768, 345, 4716,-32768, 670, 674, 742,-32768, 527, ! -32768, 713, 4774, 4792, 672,-32768,-32768, 3213, 3414, 716, ! 681, 4348,-32768,-32768, 731, 698, 4393,-32768, 703, 708, ! -32768, 4245, 712, 717, 4245, 4245, 3414, 743, 3414, 3414, ! 2552, 1946, 1290, 1257, 1367, 1152, 1152, 452, 452,-32768, ! -32768,-32768,-32768,-32768, 718, 375, 709,-32768,-32768, 210, ! 2232, 665,-32768,-32768, 724, 1246, 3615, 725, 117,-32768, ! 744, 3952,-32768,-32768, 539, 3685, 748, 89, 116,-32768, ! -32768,-32768,-32768, 515,-32768,-32768,-32768, 313, 737, 4040, ! 3414, 3414, 3280,-32768, 733,-32768,-32768,-32768,-32768, 4068, ! -32768, 259, 440, 400,-32768, 780,-32768,-32768, 745,-32768, ! -32768,-32768,-32768,-32768, 741,-32768, 746, 3414, 210, 753, ! 663, 750, 4429, 1627,-32768,-32768, 4457, 4716,-32768, 4716, ! 3414, 4716,-32768,-32768, 375,-32768, 3414,-32768, 716,-32768, ! -32768,-32768, 731,-32768,-32768,-32768, 738, 738, 794, 3414, ! 1818, 2465,-32768,-32768,-32768, 558, 650,-32768,-32768, 72, ! 94, 103, 122, 842,-32768, 758,-32768,-32768,-32768,-32768, ! -32768,-32768, 266, 762,-32768, 651,-32768, 615,-32768,-32768, ! 333,-32768,-32768,-32768, 250,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768, 766,-32768, 359, 359, ! -32768, 116,-32768,-32768, 768,-32768,-32768, 4475, 4600, 1052, ! 1381, 4487, 4612, 1664, 1401,-32768,-32768,-32768, 770, 559, ! -32768,-32768, 404, 764, 769,-32768,-32768,-32768,-32768, 774, ! 781, 2659,-32768,-32768, 840,-32768,-32768,-32768,-32768, 785, ! -32768,-32768, 786,-32768,-32768, 116, 116, 4245,-32768, 116, ! 793, 210,-32768, 3830, 4475, 4600, 4517, 4632, 1052, 1381, ! 1748, 1475, 4487, 4612, 4568, 4665, 1664, 1401, 1782, 1826, ! 796, 797,-32768,-32768, 4581, 3810, 66,-32768, 800, 799, ! 801, 4816, 812, 2412,-32768,-32768, 2377,-32768, 210,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768, 2818,-32768, 3414,-32768,-32768, 826, 651, ! -32768, 400, 333, 4312, 4011,-32768, 625, 3861, 572, 572, ! -32768,-32768,-32768, 817, 4094,-32768,-32768,-32768,-32768, 408, ! 414,-32768,-32768, 2921,-32768, 900,-32768,-32768, 66,-32768, ! 400,-32768, 333,-32768,-32768, 4245,-32768,-32768, 2659,-32768, ! 116, 629, 116, 491,-32768,-32768,-32768, 116,-32768,-32768, ! -32768, 408,-32768,-32768,-32768, 816,-32768,-32768, 823,-32768, ! 210,-32768, 3414,-32768,-32768, 861, 210, 1905,-32768, 866, ! 4245, 828, 829,-32768,-32768, 298, 2590, 3414,-32768, 2982, ! -32768, 868, 3414, 874, 837, 841, 3347, 382, 917, 340, ! 366,-32768,-32768, 845,-32768,-32768,-32768, 847, 973,-32768, ! -32768,-32768, 2908, 413, 671,-32768, 855, 651,-32768,-32768, ! -32768, 3414, 886, 852,-32768, 852,-32768,-32768,-32768, 89, ! 116,-32768, 116, 523, 534, 95,-32768,-32768, 116, 89, ! 116, 95,-32768, 116,-32768,-32768,-32768,-32768,-32768,-32768, ! 567, 577, 2412, 66,-32768, 66,-32768, 3414, 232,-32768, ! 3414, 292,-32768, 116, 95,-32768, 583,-32768,-32768,-32768, ! -32768, 4834,-32768, 4221, 2412,-32768,-32768, 2502,-32768, 2728, ! 3414,-32768,-32768, 2377, 4754,-32768,-32768,-32768,-32768, 851, ! 3414, 860,-32768, 878,-32768,-32768, 400, 333,-32768,-32768, ! -32768,-32768,-32768, 880, 932, 2032, 91,-32768,-32768,-32768, ! -32768,-32768, 882, 100, 4245, 3414, 116, 408, 513,-32768, ! 116,-32768, 116,-32768,-32768, 116, 414, 414,-32768,-32768, ! 408, 414,-32768,-32768, 864,-32768,-32768,-32768,-32768, 4871, ! 3414,-32768,-32768, 4871, 3414,-32768,-32768,-32768,-32768, 408, ! -32768, 3414,-32768, 869, 2728,-32768,-32768, 4221, 3414,-32768, ! -32768, 879,-32768, 3414, 921, 585,-32768, 578, 601,-32768, ! 822, 901, 904,-32768, 905, 3414, 2322,-32768,-32768,-32768, ! -32768, 3414,-32768, 651,-32768,-32768,-32768,-32768, 4245, 572, ! 523, 534, 462,-32768,-32768, 4094, 116, 95,-32768, 95, ! -32768,-32768, 629,-32768, 4871,-32768, 4871,-32768, 4730,-32768, ! -32768, 4889,-32768, 21, 116,-32768, 1501,-32768, 1501, 3414, ! 3414, 956, 2908, 895,-32768,-32768,-32768,-32768,-32768, 896, ! 915,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768, 79, 911,-32768,-32768,-32768, 913, 916,-32768,-32768, ! -32768,-32768, 914,-32768,-32768,-32768,-32768, 918,-32768, 934, ! 210, 61, 920,-32768,-32768,-32768,-32768,-32768,-32768, 3414, ! -32768,-32768,-32768, 3414, 922, 79, 929, 79,-32768,-32768, ! -32768, 930,-32768, 923, 995, 113,-32768,-32768, 816, 816, ! -32768,-32768,-32768, 949, 1009, 942,-32768,-32768, 3414, 3414, ! -32768, 415,-32768, 941, 950, 953, 1025,-32768,-32768,-32768, ! -32768,-32768,-32768, 1042, 1043,-32768 }; static const short yypgoto[] = { ! -32768,-32768,-32768,-32768, 134,-32768, -486,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768, -17,-32768, 124, 535, -330, 417, ! -32768,-32768,-32768, -77, 1084,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768, -411,-32768, 639,-32768,-32768, -55, 497, ! -400, -831, 31, 73, 40, 109, 170, 237, 133, 164, ! -477, -449, -496, -489, -395, -340, -480, -467, -499, -482, ! 507, 512, -456, -232,-32768, -732, -244, 940, 1087, 1111, ! 1423,-32768, -754, -177, -278, 509,-32768, 673,-32768, 412, ! 16, 7,-32768, 555,-32768, 1185, 275,-32768, -686,-32768, ! 154,-32768, -778,-32768,-32768, 247,-32768,-32768,-32768,-32768, ! -32768,-32768, -140, 242, -731, 125, -226, 69,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 521, -132, ! -32768, 640,-32768,-32768, 192, 191, 652, 538, 431,-32768, ! -32768, -700, -357, -389, -632,-32768, 391,-32768,-32768,-32768, ! -32768,-32768,-32768, -368,-32768,-32768, -682, 26,-32768,-32768, ! 594, -728,-32768, 291,-32768,-32768, -730,-32768,-32768,-32768, ! -32768,-32768, 809, -487, 32, -910, -416, -241,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768, -916, -11,-32768, -14,-32768, 464,-32768, -750,-32768, ! -32768, 541, 543,-32768,-32768, 454, -410,-32768,-32768,-32768, ! -32768, 3,-32768, 518,-32768,-32768,-32768,-32768,-32768,-32768, ! -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -12, 108, ! -490,-32768, 486,-32768, 357, 96, -465,-32768,-32768,-32768, ! -32768, -382,-32768,-32768,-32768,-32768, 500,-32768,-32768, 373, ! -32768,-32768,-32768, 419,-32768, 139, 436,-32768, 568, 574, ! -289,-32768, -306,-32768,-32768, 561, 677,-32768,-32768,-32768, ! -32768, 678,-32768,-32768,-32768 }; ! ! #define YYLAST 4950 ! ! static const short yytable[] = { ! 88, 423, 282, 90, 91, 67, 67, 94, 531, 88, ! 98, 554, 526, 96, 556, 460, 772, 557, 59, 59, ! 553, 857, 631, 859, 877, 408, 79, 80, 81, 627, ! 417, 958, 459, 35, 35, 629, 900, 407, 279, 632, ! 530, 505, 37, 37, 547, 183, 185, 187, 882, 469, ! 474, 109, 288, 118, 442, 127, 633, 136, 932, 145, ! 899, 154, 661, 163, -116, 172, 181, 815, 1091, 644, ! 67, 858, 661, -457, 720, 36, 36, 714, 237, 886, ! 892, 244, 241, 59, 715, 918, 181, 181, 181, 1109, ! 662, 721, 1030, 718, 617, -458, 712, 9, 35, 661, ! 662, 1035, -1, 105, -459, 1092, 719, 37, 1125, 859, ! -2, 38, 38, 1071, 233, 59, 181, 59, 325, 326, ! 15, 77, 78, -460, 713, 181, 15, 662, 331, 753, ! 857, 93, 256, 93, 181, 41, 41, 76, 584, 343, ! 36, 258, 614, 181, 663, 1126, 766, 15, 1110, 234, ! 378, 1006, 181, -116, 663, 82, 816, 858, -437, 1031, ! 1144, 181, 540, 268, 269, 1104, 42, 42, 106, 633, ! 181, 17, 39, 39, 257, 985, 38, 986, 716, 181, ! -438, 663, 588, 514, 330, 1036, 505, 592, 515, -439, ! 788, 15, 1015, 740, 743, 746, 749, 1145, 93, 664, ! 41, 188, 93, 1131, 801, 722, 217, 803, -440, 664, ! 259, 1132, 442, 84, 85, 381, 984, 386, 387, 388, ! 1140, 391, 392, 245, 59, 720, 1060, 406, 714, 9, ! 115, 42, 1153, 717, 238, 715, 664, 39, 1003, 40, ! 40, 1100, 721, 758, 718, 751, 242, 712, 283, 1046, ! 234, 1162, 15, 15, 855, 239, 584, 719, 839, 771, ! 531, 83, 109, 15, 118, 631, 127, 864, 136, 618, ! 181, 856, 109, 449, 118, 713, 99, 240, 869, 990, ! 1048, 1050, 632, 648, 895, 59, 86, 714, 180, 444, ! 59, 87, 773, 645, 715, 1083, 232, 661, 454, 284, ! 256, 896, 59, 718, 40, 256, 712, 18, 19, 258, ! 903, 644, 905, 564, 258, 566, 719, 433, 84, 85, ! 84, 85, -634, 15, 479, 662, 435, 424, 269, 716, ! 399, 400, 59, 337, 713, 772, 100, 84, 85, 994, ! 857, 267, 257, 929, 772, 59, 448, 257, 84, 85, ! 754, 235, 502, 503, 287, 755, 59, 814, 17, 434, ! 268, 269, 59, 855, 59, 826, 289, 930, 741, 744, ! 747, 750, 236, 268, 269, 517, 291, 866, 259, 663, ! 856, 268, 269, 259, 717, 84, 85, -35, 716, 535, ! 583, 86, 101, 86, 17, 436, 87, 460, 87, 327, ! 906, 102, 909, 100, 273, 182, 423, 184, 1146, 1147, ! 86, 100, 878, -34, 459, 87, 328, 100, 527, 439, ! 17, 86, 59, 329, 186, 863, 87, 528, 269, 339, ! 6, 7, 8, 129, 664, 449, 340, 256, 10, 11, ! 12, 940, 341, 717, 578, 342, 258, 444, 243, 109, ! 440, 118, 234, 127, 344, 136, 437, 1014, 86, 274, ! 59, 84, 85, 87, 345, 331, 389, 879, 275, 59, ! 537, 373, 17, 889, 264, 433, 880, 269, 265, 257, ! 395, 276, 890, 269, 435, 962, 399, 400, 784, 881, ! 268, 269, 604, 785, 100, 93, 506, 959, 381, 1155, ! 396, 1052, 345, -580, 1156, 398, 626, -580, 424, 269, ! -257, 364, 365, 366, 262, 259, 100, 434, 111, 6, ! 7, 8, 124, 438, 682, 120, 453, 10, 11, 12, ! 972, 269, 544, 403, 86, 645, 419, 59, 910, 87, ! 420, 59, 95, 59, 97, 15, 1082, 429, 178, 179, ! 101, 449, 35, 436, 739, 742, 433, 748, 256, 102, ! 1043, 37, 1044, -396, -396, 435, 1039, 258, 661, 430, ! 657, 446, 879, 855, 461, 100, 273, 439, 771, 531, ! 657, 880, 269, 651, 269, 282, 465, 771, 531, 59, ! 856, 970, 269, 59, 36, 59, 662, 59, 434, -256, ! 257, 426, 972, 269, 704, 265, 267, 657, 440, -286, ! 598, 773, 658, 706, 437, 901, 637, 638, 639, 871, ! 773, 466, 658, -286, 467, 640, 93, 480, 872, 872, ! 38, 274, 100, 273, 436, 967, 259, 347, 349, 335, ! 275, 1138, 1139, 737, 782, 976, 705, 738, 783, 658, ! 663, 1080, 982, 276, 41, 1094, 420, 1095, 439, 551, ! 552, 908, 983, -286, 673, 674, 265, -286, 998, -84, ! 1065, 425, 999, 109, 420, 127, 907, 145, 507, 163, ! 404, 438, 707, 416, 808, 42, 1067, 418, 274, 440, ! 265, 39, 637, 638, 639, 437, 508, 275, 509, 537, ! 513, 760, 637, 638, 639, 664, 710, 8, 124, 659, ! 276, 870, 516, 10, 11, 12, 84, 85, 518, 659, ! 109, 838, 118, -632, 127, 522, 136, 523, 145, 538, ! 154, 15, 163, 541, 172, 545, 852, 711, 550, 423, ! 59, 1041, 1042, 708, 562, 558, 659, 455, 637, 638, ! 639, 567, 568, 575, 572, 704, 862, 960, 40, 573, ! 464, 581, 438, 586, 706, 6, 7, 8, 133, 59, ! 1018, 478, 587, 10, 11, 12, 660, 482, 590, 483, ! 59, 577, 591, 59, 35, 378, 660, 594, 534, 86, ! 599, 15, 595, 37, 87, 35, 596, 705, 433, 59, ! 603, 597, 602, 920, 37, 657, 1017, 435, 620, 922, ! 709, 8, 129, 660, 704, 624, 628, 10, 11, 12, ! 647, 653, 852, 706, 676, 686, 36, 695, 582, 688, ! 941, 537, 696, 707, 701, 555, 404, 36, 96, 699, ! 434, 735, 559, 409, 752, -258, 756, 658, 885, 891, ! 267, 770, 777, -286, 781, 786, 705, 710, 565, 789, ! 787, 537, 38, 8, 133, 862, 791, -286, 267, 10, ! 11, 12, 911, 38, 800, 802, 436, 853, 59, 807, ! 914, 810, 812, 820, 571, 821, 41, 15, 711, 783, ! 268, 269, 707, 35, 708, 59, 823, 41, 865, 872, ! 439, 876, 37, 898, 975, 59, 816, -286, -32, 375, ! 256, -286, 908, 925, 926, -33, 710, 42, 927, 258, ! 256, 935, 936, 39, 652, 942, 937, 961, 42, 258, ! 945, 440, 948, 965, 39, 36, 1010, 437, 560, 561, ! 649, 966, 425, 425, 659, 1012, 1013, 711, 1025, 1026, ! 1051, 337, 257, 708, 1034, 1059, 5, 93, 93, 8, ! 111, 709, 257, 853, 1062, 10, 11, 12, 1064, 1069, ! 939, 38, 1070, 1072, 1098, 107, 112, 116, 121, 1103, ! 1107, 14, 181, 143, 148, 152, 157, 1108, 259, 949, ! 40, 950, 951, 952, 953, 41, 1114, 1117, 259, 1120, ! 1118, 40, 1123, 1122, 438, 1143, 17, 1142, 729, 1127, ! 730, 660, 732, 1134, 1136, 1141, 1020, 1149, 630, 1150, ! 709, 6, 7, 8, 138, 1157, 42, 1152, 23, 10, ! 11, 12, 39, 25, 1158, 1160, 399, 400, 1159, 534, ! 534, 431, 1164, 1165, 5, 399, 400, 8, 9, 1047, ! 1049, 623, 548, 10, 11, 12, 679, 6, 7, 8, ! 124, 680, 683, 775, 1011, 10, 11, 12, 914, 14, ! 621, 15, 16, 904, 536, 862, 657, 6, 7, 8, ! 165, 1005, 931, 15, 563, 10, 11, 12, 59, 8, ! 138, 700, 1040, 1124, 17, 10, 11, 12, 987, 40, ! 992, -259, 1105, 35, 570, 619, 698, 804, 805, 919, ! 1106, 806, 37, 1137, 1135, 776, 23, 727, 658, 728, ! 780, 25, 108, 113, 117, 122, 875, 767, 761, 762, ! 144, 149, 153, 158, 765, 1081, 868, 1063, 1057, 809, ! 702, 768, 769, 813, 0, 36, 703, 734, 589, 1073, ! 125, 130, 134, 139, 593, 1079, 0, -265, 161, 166, ! 170, 175, 778, 778, 6, 7, 8, 160, 0, 0, ! 534, 534, 10, 11, 12, 0, 790, 792, 0, 367, ! 368, 38, 369, 370, 371, 372, 107, 112, 116, 121, ! 15, 0, 0, 1096, 1097, 0, 1099, 0, 6, 7, ! 8, 174, 534, 0, 0, 41, 10, 11, 12, 362, ! 363, 364, 365, 366, 0, 659, 0, 811, 0, 912, ! 110, 114, 119, 123, 128, 132, 137, 141, 146, 150, ! 155, 159, 164, 168, 173, 177, 42, 0, 0, 0, ! 0, 0, 39, 1099, -264, 0, 0, 1133, 0, 84, ! 85, 6, 7, 379, 380, 0, 0, 431, 0, 0, ! 5, 630, 0, 8, 9, 0, 0, 0, 0, 10, ! 11, 12, 1099, 1154, 971, 973, 0, 0, -267, 0, ! 0, 0, 660, 0, 0, 14, 0, 15, 16, 0, ! 0, 0, 968, 0, 969, 0, 0, 974, 6, 7, ! 8, 169, 977, 978, 0, 979, 10, 11, 12, 40, ! 17, 359, 360, 361, 362, 363, 364, 365, 366, 616, ! 991, 0, 86, 995, 15, 996, 997, 87, 0, 0, ! 0, 0, 23, 108, 113, 117, 122, 25, 0, 0, ! 0, 432, -387, 358, 359, 360, 361, 362, 363, 364, ! 365, 366, 946, 947, 0, 677, 0, 0, 534, 534, ! 0, 125, 130, 134, 139, 0, 0, 534, 534, 691, ! 694, 534, 534, 107, 112, 116, 121, 0, -266, 0, ! 0, 0, 404, 0, 404, 0, 6, 7, 8, 129, ! 534, 0, 980, 981, 10, 11, 12, 0, 0, 0, ! 0, 1053, 0, 0, 0, 1055, 6, 7, 8, 165, ! 0, 462, 463, 0, 10, 11, 12, 385, 616, 616, ! 745, 616, 360, 361, 362, 363, 364, 365, 366, 481, ! 0, 971, 973, 973, 484, 485, 0, 0, 0, 490, ! 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, ! 501, 0, 0, 0, 0, 0, 0, 0, 1084, 1085, ! 0, 1086, 126, 131, 135, 140, 1087, 0, 1088, 0, ! 162, 167, 171, 176, 0, 5, 1093, 0, 8, 120, ! 6, 7, 8, 138, 10, 11, 12, 0, 10, 11, ! 12, 0, 0, 0, 797, 0, 799, 0, 0, 0, ! 14, 0, 409, 0, 0, -486, -486, -486, -486, -486, ! 0, 0, 0, 0, -486, -486, -486, 0, 0, 0, ! 108, 113, 117, 122, 0, 17, 0, 0, 0, 0, ! -486, 0, 332, 0, 190, 5, 0, 0, 8, 9, ! 191, 192, 0, 193, 10, 11, 12, 23, 125, 130, ! 134, 139, 25, 0, 0, -486, 0, 0, 0, 0, ! 14, 194, 15, 16, 0, 195, 196, 197, 198, 199, ! 0, 0, 600, 601, 200, 0, 0, -486, 0, 0, ! 201, 0, -486, 202, 0, 17, 0, 0, 203, 204, ! 205, -115, 0, 0, 206, 207, 0, 107, 112, 208, ! 209, 143, 148, 0, 210, 0, 211, 23, 0, 0, ! 0, 212, 25, 0, 0, 0, 0, 0, 213, 214, ! 0, 333, 0, 215, 0, 0, 0, 0, 409, 0, ! 0, 5, 6, 7, 8, 9, 0, 0, 0, 0, ! 10, 11, 12, 0, 107, 112, 116, 121, 0, 0, ! 0, 697, 143, 148, 152, 157, 14, 0, 15, 0, ! 0, 944, 0, 0, 731, 0, 0, 0, 0, 6, ! 7, 8, 160, 126, 131, 135, 140, 10, 11, 12, ! 0, 17, 0, 736, 266, 0, 0, -28, -28, -28, ! -28, -28, 0, 0, 0, 15, -28, -28, -28, 0, ! 385, 0, 0, 23, 0, 0, 0, 0, 25, 0, ! 0, 267, -28, 0, -286, 988, 0, -651, 694, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, -286, 409, ! 0, 0, -118, -118, -118, -118, -118, -28, 0, 0, ! 0, -118, -118, -118, 108, 113, 0, 0, 144, 149, ! 0, 268, 269, 6, 7, 8, 133, -118, 0, -28, ! 0, 10, 11, 12, -28, 795, 0, 0, -286, 0, ! 125, 130, -286, -28, 161, 166, 0, 0, 0, 15, ! 0, 0, -118, 0, 0, 0, 0, 6, 7, 8, ! 169, 108, 113, 117, 122, 10, 11, 12, 0, 144, ! 149, 153, 158, 0, -118, 0, 0, 0, 0, -118, ! 0, 0, 0, 15, 0, 0, 0, 830, -118, 125, ! 130, 134, 139, 0, 0, 0, 0, 161, 166, 170, ! 175, 6, 7, 8, 174, 0, 0, 745, 0, 10, ! 11, 12, 110, 114, 128, 132, 146, 150, 164, 168, ! 0, 0, 0, 0, 0, 5, 6, 7, 8, 111, ! 126, 131, 135, 140, 10, 11, 12, 354, 355, 356, ! 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, ! 14, 0, 795, 0, 0, 0, 0, 745, 0, 110, ! 114, 119, 123, 128, 132, 137, 141, 146, 150, 155, ! 159, 164, 168, 173, 177, 17, 921, 0, 190, 0, ! 0, 923, 0, 0, 191, 192, 0, 193, 0, 0, ! 830, 933, 0, 0, 1128, 1129, 934, 23, 0, 0, ! 0, 0, 25, 0, 0, 194, -253, 16, 0, 195, ! 196, 197, 198, 199, 0, 0, 0, 0, 200, 0, ! 0, 0, 0, 0, 201, 964, 0, 202, 0, 0, ! 0, 0, 203, 204, 205, 0, 0, 0, 206, 207, ! 0, 0, 0, 208, 209, 0, 0, 0, 210, 0, ! 211, 336, 0, 0, 0, 212, 830, 0, 0, 0, ! 0, 989, 213, 214, 993, 0, 0, 215, 357, 358, ! 359, 360, 361, 362, 363, 364, 365, 366, 830, 0, ! 0, 830, 0, 830, 1007, 0, 0, 0, 0, 0, ! 0, 5, 6, 7, 8, 120, 0, 0, 0, 0, ! 10, 11, 12, 1027, 0, -464, -464, 0, 0, 0, ! 0, -464, -464, 0, -464, 0, 14, 0, -464, 1038, -464, -464, -464, -464, -464, -464, -464, -464, -464, -464, ! -464, 0, -464, 0, -464, 0, -464, -464, -464, -464, ! -464, 17, 0, 0, 1054, -464, 0, 0, 1056, 0, ! 0, -464, 126, 131, -464, 1058, 162, 167, 830, -464, ! -464, -464, 1061, 23, 0, -464, -464, 0, 25, 0, ! -464, -464, -255, 0, 0, -464, 0, -464, -464, 0, ! 0, 0, -464, -464, 0, 0, 0, -464, 0, -464, ! -464, 0, -464, 0, -464, 0, 0, 0, 0, 0, ! 0, 126, 131, 135, 140, 0, 0, 0, 0, 162, ! 167, 171, 176, 374, 0, -462, -462, -462, -462, -462, ! -462, -462, -462, 0, -462, -462, -462, -462, -462, 0, ! -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, ! -462, -462, -462, -462, -462, -462, -462, -462, -462, -462, ! -462, 0, 0, 0, 0, -462, 0, 0, 0, 0, ! 0, -462, 0, 0, -462, 0, -462, 0, 0, -462, ! -462, -462, 0, 0, 0, -462, -462, 0, 0, 0, ! -462, -462, 0, 0, 0, -462, 0, -462, -462, 0, ! 0, 0, -462, -462, 0, 0, 0, -462, 375, -462, ! -462, 0, -462, 606, -462, -486, -486, -486, -486, -486, ! -486, -486, -486, 0, -486, -486, -486, -486, -486, 0, ! -486, -486, -486, -486, -486, -486, -486, -486, -486, -486, ! -486, -486, -486, -486, -486, 0, -486, -486, -486, -486, ! -486, 0, 0, 0, 0, -486, 0, 0, 0, 0, ! 0, -486, 0, 0, -486, 0, -486, 0, 0, -486, ! -486, -486, 0, 0, 0, -486, -486, 0, 0, 0, ! -486, -486, 0, 0, 0, -486, 0, -486, -486, 0, ! 0, 0, -486, -486, 0, 0, 0, -486, 0, -486, ! -486, 0, -486, 1074, -486, -493, -493, 0, 0, 0, ! 0, -493, -493, 0, -493, 0, 0, 0, -493, 0, ! -493, -493, -493, -493, -493, -493, -493, -493, -493, -493, ! -493, 0, -493, 0, -493, 0, -493, -493, -493, -493, ! -493, 0, 0, 0, 0, -493, 0, 0, 0, 0, ! 0, -493, 0, 0, -493, 0, 0, 0, 0, -493, ! -493, -493, 0, 0, 0, -493, -493, 0, 0, 0, ! -493, -493, 0, 0, 0, -493, 0, -493, -493, 0, ! 0, 0, -493, -493, 0, 0, 0, -493, 0, -493, ! -493, 0, -493, 824, -493, 825, 85, 0, 0, 0, ! 0, 191, 192, 352, 193, 353, 354, 355, 356, 357, ! 358, 359, 360, 361, 362, 363, 364, 365, 366, 0, ! 0, 0, 194, 0, 16, 0, 195, 196, 197, 198, ! 199, 0, 0, 0, 0, 200, 0, 0, 0, 0, ! 0, 201, 0, 0, 202, 0, 0, 0, 0, 203, ! 204, 205, 0, 0, 0, 206, 207, 0, 0, 826, ! 208, 827, 0, 0, 0, 210, 0, 211, 86, 0, ! 0, 0, 212, 87, 0, 0, 0, 0, -316, 213, ! 214, 0, 828, 824, 215, 825, 85, 0, 0, 0, ! 0, 191, 192, 0, 193, 355, 356, 357, 358, 359, ! 360, 361, 362, 363, 364, 365, 366, 0, 0, 0, ! 0, 0, 194, 0, 16, 0, 195, 196, 197, 198, ! 199, 0, 0, 0, 0, 200, 0, 0, 0, 0, ! 0, 201, 0, 0, 202, 0, 0, 0, 0, 203, ! 204, 205, 0, 0, 0, 206, 207, 0, 0, 826, ! 208, 827, 0, 0, 0, 210, 0, 211, 86, 0, ! 0, 0, 212, 87, 0, 0, 0, 0, -384, 213, ! 214, 824, 828, 190, 215, 0, 0, 0, 0, 191, ! 192, 0, 193, 356, 357, 358, 359, 360, 361, 362, ! 363, 364, 365, 366, 0, 0, 0, 0, 0, 0, ! 194, 0, 16, 0, 195, 196, 197, 198, 199, 0, ! 0, 0, 0, 200, 0, -329, 0, 0, 0, 201, ! 0, 0, 202, 0, 0, 0, 0, 203, 204, 205, ! 0, 0, 0, 206, 207, 0, 0, -329, 208, 209, ! 793, 0, 190, 210, 0, 211, 0, 0, 191, 192, ! 212, 193, 0, 0, 0, 0, 0, 213, 214, 0, ! 828, 0, 215, 0, 0, 0, 0, 0, 0, 194, ! 0, 16, 0, 195, 196, 197, 198, 199, 0, 0, ! 0, 0, 200, 0, 0, 0, 0, 0, 201, 0, ! 0, 202, 0, 0, 0, 0, 203, 204, 205, 0, ! 0, 0, 206, 207, 0, 0, 0, 208, 209, 824, ! 0, 190, 210, 0, 211, 0, 0, 191, 192, 212, ! 193, 0, 0, 0, 0, 0, 213, 214, 0, 794, ! 0, 215, 0, 0, 0, 0, 0, 0, 194, 0, ! 16, 0, 195, 196, 197, 198, 199, 0, 0, 0, ! 0, 200, 0, 0, 0, 0, 0, 201, 0, 0, ! 202, 0, 0, 0, 0, 203, 204, 205, 0, 0, ! 0, 206, 207, 0, 0, 0, 208, 209, 0, 0, ! 0, 210, 0, 211, 0, 0, 0, 0, 212, 0, ! 0, 0, 0, 0, 0, 213, 214, 0, 828, 0, ! 215, 825, 841, 6, 7, 8, 9, 191, 192, 0, ! 193, 10, 11, 12, 0, 0, 0, 0, 0, 0, ! 842, 843, 844, 845, 846, 847, 848, 14, 194, 15, ! 16, 0, 195, 196, 197, 198, 199, 0, 0, 0, ! 0, 200, 0, 0, 0, 0, 0, 201, 0, 0, ! 202, 0, 17, 0, 0, 203, 204, 205, 0, 0, ! 0, 206, 207, 0, 0, 0, 208, 209, 0, 0, ! 0, 210, 0, 211, 849, 0, 0, 0, 212, 850, ! 0, 0, 0, 851, 0, 213, 214, 0, 816, 0, ! 215, 190, 5, 6, 7, 8, 9, 191, 192, 0, ! 193, 10, 11, 12, 0, 5, 6, 7, 8, 9, ! 0, 0, 894, 0, 10, 11, 12, 14, 194, 15, ! 16, 0, 195, 196, 197, 198, 199, 0, 0, 0, ! 14, 200, 15, 0, 0, 0, 0, 201, 0, 0, ! 202, 0, 17, 0, 0, 203, 204, 205, 0, 0, ! 0, 206, 207, 0, 0, 17, 208, 209, 0, 0, ! 0, 210, 0, 211, 23, 825, 85, 0, 212, 25, ! 0, 191, 192, 0, 193, 213, 214, 23, 0, 0, ! 215, 0, 25, 0, 842, 843, 844, 845, 846, 847, ! 848, 0, 194, 0, 16, 0, 195, 196, 197, 198, ! 199, 0, 0, 0, 0, 200, 0, 0, 0, 0, ! 0, 201, 0, 0, 202, 0, 0, 0, 0, 203, ! 204, 205, 0, 0, 0, 206, 207, 0, 0, 0, ! 208, 209, 0, 0, 0, 210, 0, 211, 86, 0, ! 0, 0, 212, 87, 0, 0, 0, 851, 0, 213, ! 214, 0, 816, 0, 215, 190, 5, 0, 0, 8, ! 9, 191, 192, 0, 193, 10, 11, 12, 0, 5, ! 6, 7, 8, 106, 0, 0, 0, 0, 10, 11, ! 12, 14, 194, 15, 16, 0, 195, 196, 197, 198, ! 199, 0, 0, 0, 14, 200, 15, 0, 0, 0, ! 0, 201, 0, 0, 202, 0, 17, 0, 0, 203, ! 204, 205, 0, 0, 0, 206, 207, 0, 0, 17, ! 208, 209, 0, 0, 0, 210, 0, 211, 23, 190, ! 0, 0, 212, 25, 0, 191, 192, 0, 193, 213, ! 214, 23, 0, 0, 215, 0, 25, 0, 0, 0, ! -252, 0, 0, 0, 0, 0, 194, 0, 16, 0, ! 195, 196, 197, 198, 199, 0, 0, 0, 0, 200, ! 0, 0, 0, 0, 0, 201, 0, 0, 202, 0, ! 0, 0, 0, 203, 204, 542, 0, 0, 0, 206, ! 207, 0, 0, 0, 208, 209, 190, 0, 0, 210, ! 0, 211, 191, 192, 0, 193, 212, 0, 0, 0, ! 0, 0, 0, 213, 214, 0, 0, 543, 215, 0, ! 0, 0, 0, 194, 0, 16, 0, 195, 196, 197, ! 198, 199, 0, 0, 0, 0, 200, 0, 0, 0, ! 0, 0, 201, 0, 0, 202, 0, 0, 0, 0, ! 203, 204, 205, 0, 0, 0, 206, 207, 0, 0, ! 0, 208, 209, 190, 0, 0, 210, 0, 211, 191, ! 192, 0, 193, 212, 0, 0, 0, 0, 0, 0, ! 213, 214, 0, 582, 0, 215, 0, 0, 0, 0, ! 194, 0, 16, 0, 195, 196, 197, 198, 199, 0, ! 0, 0, 0, 200, 0, 0, 0, 0, 0, 201, ! 0, 0, 202, 0, 0, 0, 0, 203, 204, 205, ! 0, 0, 0, 206, 207, 0, 0, 0, 208, 209, ! 190, 0, 0, 210, 0, 211, 191, 192, 0, 193, ! 212, 0, 0, 0, 0, 0, 0, 213, 214, 0, ! 0, 675, 215, 0, 0, 0, 0, 194, 0, 16, ! 0, 195, 196, 197, 198, 199, 0, 0, 0, 0, ! 200, 0, 0, 0, 0, 0, 201, 0, 0, 202, ! 0, 0, 0, 0, 203, 204, 205, 0, 0, 0, ! 206, 207, 0, 0, 0, 208, 209, 190, 0, 0, ! 210, 0, 211, 191, 192, 0, 193, 212, 0, 0, ! 0, 0, 938, 0, 213, 214, 0, 0, 0, 215, ! 0, 0, 0, 0, 194, 0, 16, 0, 195, 196, ! 197, 198, 199, 0, 0, 0, 0, 200, 0, 0, ! 0, 0, 0, 201, 0, 0, 202, 0, 0, 0, ! 0, 203, 204, 205, 0, 0, 0, 206, 207, 0, ! 0, 0, 208, 209, 190, 0, 0, 210, 0, 211, ! 191, 192, 0, 193, 212, 0, 0, 0, 0, 0, ! 0, 213, 214, 0, 0, 0, 215, 0, 0, 0, ! 0, 194, 0, 16, 0, 195, 196, 197, 198, 199, ! 0, 0, 0, 0, 200, 0, 0, 0, 0, 0, ! 201, 0, 0, 202, 0, 0, 0, 0, 203, 204, ! 205, 0, 0, 0, 206, 207, 0, 0, 0, 346, ! 209, 190, 0, 0, 210, 0, 211, 191, 192, 0, ! 193, 212, 0, 0, 0, 0, 0, 0, 213, 214, ! 0, 0, 0, 215, 0, 0, 0, 0, 194, 0, ! 16, 0, 195, 196, 197, 198, 199, 0, 0, 0, ! 0, 200, 0, 0, 0, 0, 0, 201, 0, 0, ! 202, 0, 0, 0, 0, 203, 204, 205, 0, 0, ! 0, 206, 207, 0, 0, 0, 348, 209, 622, 0, ! 0, 210, 0, 211, 191, 192, 0, 193, 212, 0, ! 0, 0, 0, 0, 0, 213, 214, 0, 0, 0, ! 215, 0, 0, 0, 0, 194, 0, 16, 0, 195, ! 196, 197, 198, 199, 0, 0, 0, 0, 200, 0, ! 0, 0, 0, 0, 201, 0, 0, 202, 0, 0, ! 0, 0, 203, 204, 205, 0, 0, 0, 206, 207, ! 0, 0, 0, 208, 209, 0, 642, 0, 210, 5, ! 211, 0, 8, 9, 0, 212, 0, 0, 10, 11, ! 12, 0, 213, 214, 0, 427, 0, 215, -24, -24, ! -24, -24, -24, 0, 14, 0, 15, -24, -24, -24, ! 0, 0, 0, 0, 421, 0, 0, -20, -20, -20, ! -20, -20, 267, -24, 0, -286, -20, -20, -20, 17, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, -286, ! 0, 267, -20, 0, -286, 0, 0, 0, -24, 0, ! 0, 23, -610, -610, -610, 0, 25, 0, -286, 0, ! 643, -610, 268, 269, 0, 0, 0, -20, 0, 0, ! -24, 0, 0, 0, 0, -24, 0, 0, 0, -286, ! 0, 0, 0, -286, -24, 0, 0, 0, 0, -20, ! 0, 0, 0, 0, -20, 0, 0, 0, -286, 0, ! 0, 409, -286, -20, -653, -653, -653, -653, -653, 0, ! 0, 0, 0, -653, -653, -653, 0, 0, 0, 0, ! 0, 0, 0, 292, 293, 0, 0, 294, 295, -653, ! 0, -653, 296, 297, 298, 299, 300, 301, 302, 303, ! 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, ! 314, 0, 642, 0, -653, 5, 0, 0, 8, 9, ! 0, 0, 0, 0, 10, 11, 12, 315, 0, 0, ! 0, 0, 0, 0, 0, 0, -653, 0, 0, 0, ! 14, -653, 15, 0, 0, 0, 0, 0, 0, 0, ! -653, 0, 0, 0, 0, 0, 317, 0, 0, 0, ! 0, 318, 0, 0, 0, 17, 0, 0, 0, 457, ! 0, 4, 0, -127, 5, 6, 7, 8, 9, 0, ! 0, 0, 0, 10, 11, 12, 0, 23, -609, -609, ! -609, 0, 25, 0, 0, 0, 643, -609, 13, 14, ! 0, 15, 16, 4, 0, -127, 5, 6, 7, 8, ! 9, 0, 0, 0, 0, 10, 11, 12, 0, 0, ! 0, 0, 0, 0, 17, 0, 0, 18, 19, -127, ! 0, 14, 0, 15, 0, 0, 0, 0, -127, 0, ! 20, 21, 22, 0, 0, 0, 23, 0, 0, 0, ! 24, 25, 26, 27, 0, 28, 17, 0, 0, 18, ! 19, -127, 4, 0, -127, 5, 6, 7, 8, 9, ! -127, 0, 0, 0, 10, 11, 12, 0, 23, 0, ! 0, 0, 0, 25, 0, 0, 0, 28, 0, 0, ! 14, 654, 15, 655, 5, 6, 7, 8, 9, 0, ! 0, 656, 0, 10, 11, 12, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 17, 0, 0, 0, 14, ! -127, 0, 5, 6, 7, 8, 9, 0, 0, -127, ! 0, 10, 11, 12, 0, 0, 0, 23, 0, 0, ! 0, 0, 25, 0, 17, 654, 28, 14, 5, 6, ! 7, 8, 9, 0, 0, 656, 0, 10, 11, 12, ! 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, ! 0, 25, 17, 14, -548, 0, 5, 6, 7, 8, ! 115, 0, 0, 0, 0, 10, 11, 12, 0, 0, ! 0, 0, 0, 0, 23, 0, 0, 0, 17, 25, ! 0, 14, 0, 15, 5, 6, 7, 8, 142, 0, ! 0, 0, 0, 10, 11, 12, 0, 0, 0, 0, ! 23, 0, 0, 0, 0, 25, 17, 0, -548, 14, ! 0, 15, 0, 5, 6, 7, 8, 151, 0, 0, ! 0, 0, 10, 11, 12, 0, 0, 0, 23, 0, ! 0, 0, 0, 25, 17, 0, 0, -254, 14, 0, ! 15, 5, 6, 7, 8, 147, 0, 0, 0, 0, ! 10, 11, 12, 0, 0, 0, 23, 0, 0, 0, ! 0, 25, 1001, 17, 0, -260, 14, 5, 6, 7, ! 8, 156, 0, 0, 0, 0, 10, 11, 12, 0, ! 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, ! 25, 17, 14, 0, -262, 350, 351, 352, 0, 353, ! 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, ! 364, 365, 366, 23, 0, 0, 0, 17, 25, 350, ! 351, 352, -261, 353, 354, 355, 356, 357, 358, 359, ! 360, 361, 362, 363, 364, 365, 366, 0, 0, 23, ! 0, 0, 1002, 0, 25, 292, 293, 0, -263, 294, ! 295, 0, 0, 0, 296, 297, 298, 299, 300, 301, ! 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, ! 312, 313, 314, 0, 0, 0, 0, 0, 0, 0, ! 0, 292, 293, 0, 0, 294, 295, 0, 0, 315, ! 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, ! 306, 307, 308, 309, 310, 311, 312, 313, 314, 0, ! 316, 0, 0, 0, 0, 0, 0, 0, 317, 0, ! 0, 0, 0, 318, 0, 468, 292, 293, 0, 0, ! 294, 295, 0, 0, 0, 296, 297, 298, 299, 300, ! 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, ! 311, 312, 313, 314, 317, 0, 0, 0, 0, 318, ! 0, 0, 292, 293, 0, 0, 294, 295, 0, 0, ! 473, 296, 297, 298, 299, 300, 301, 302, 303, 304, ! 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, ! 0, 5, 6, 7, 8, 9, 0, 0, 656, 317, ! 10, 11, 12, 0, 318, 0, 315, 0, 0, 5, ! 6, 7, 8, 106, 0, 0, 14, 0, 10, 11, ! 12, 5, 6, 7, 8, 142, 0, 0, 0, 0, ! 10, 11, 12, 0, 14, 317, 15, 0, 0, 0, ! 318, 17, 0, 0, 0, 0, 14, 0, 15, 0, ! 0, 5, 6, 7, 8, 115, 0, 0, 0, 17, ! 10, 11, 12, 23, 0, 0, 0, 0, 25, 0, ! 0, 17, 0, 0, 0, 0, 14, 0, 15, 0, ! 0, 23, 0, 0, 0, 0, 25, 0, 0, 0, ! 0, 0, 0, 23, 0, 0, 0, 0, 25, 0, ! 0, 17, 5, 6, 7, 8, 151, 0, 0, 0, ! 0, 10, 11, 12, 0, 5, 6, 7, 8, 9, ! 0, 0, 0, 23, 10, 11, 12, 14, 25, 15, ! 0, 0, 0, 0, 5, 6, 7, 8, 111, 0, ! 14, 0, 15, 10, 11, 12, 5, 6, 7, 8, ! 147, 0, 17, 0, 0, 10, 11, 12, 0, 14, ! 0, 0, 0, 0, 0, 17, 5, 6, 7, 8, ! 120, 14, 0, 0, 23, 10, 11, 12, 0, 25, ! 0, 0, 0, 0, 17, 0, 0, 23, 0, 0, ! 0, 14, 25, 0, 0, 0, 17, 0, 0, 5, ! 6, 7, 8, 156, 0, 0, 23, 0, 10, 11, ! 12, 25, 0, 0, 0, 0, 17, 5, 23, 0, ! 8, 106, 0, 25, 14, 0, 10, 11, 12, 0, ! 5, 0, 0, 8, 115, 0, 0, 0, 23, 10, ! 11, 12, 14, 25, 15, 0, 0, 0, 0, 17, ! 5, 0, 0, 8, 9, 14, 0, 15, 0, 10, ! 11, 12, 0, 0, 0, 0, 0, 17, 0, 0, ! 0, 23, 0, 0, 0, 14, 25, 15, 0, 0, ! 17, 0, 0, 0, 0, 0, 0, 0, 0, 23, ! 0, 0, 0, 0, 25, 1008, 0, 0, 0, 0, ! 17, 0, 23, 0, 350, 351, 352, 25, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, ! 365, 366, 23, 0, 0, 0, 0, 25, 350, 351, ! 352, 1009, 353, 354, 355, 356, 357, 358, 359, 360, ! 361, 362, 363, 364, 365, 366, 0, 0, 350, 351, ! 352, 1089, 353, 354, 355, 356, 357, 358, 359, 360, ! 361, 362, 363, 364, 365, 366, 350, 351, 352, 0, ! 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, ! 363, 364, 365, 366, 0, 0, 0, 0, 0, 0, ! 350, 351, 352, 579, 353, 354, 355, 356, 357, 358, ! 359, 360, 361, 362, 363, 364, 365, 366, 350, 351, ! 352, 580, 353, 354, 355, 356, 357, 358, 359, 360, ! 361, 362, 363, 364, 365, 366, 0, 0, 0, 0, ! 0, 0, 15, 0, 0, 822, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 350, 351, 352, 1000, 353, ! 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, ! 364, 365, 366, 350, 351, 352, 1090, 353, 354, 355, ! 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, ! 366 }; static const short yycheck[] = { ! 17, 279, 179, 20, 21, 2, 3, 24, 397, 26, ! 27, 422, 394, 25, 424, 321, 648, 428, 2, 3, ! 420, 753, 521, 753, 774, 269, 10, 11, 12, 519, ! 274, 862, 321, 2, 3, 521, 790, 269, 178, 521, ! 397, 371, 2, 3, 412, 62, 63, 64, 779, 338, ! 339, 35, 184, 37, 286, 39, 521, 41, 836, 43, ! 788, 45, 539, 47, 1, 49, 59, 1, 47, 525, ! 67, 753, 549, 1, 573, 2, 3, 573, 90, 779, ! 780, 98, 94, 67, 573, 815, 79, 80, 81, 10, ! 539, 573, 1, 573, 510, 1, 573, 8, 67, 576, ! 549, 1, 0, 34, 1, 84, 573, 67, 47, 839, ! 0, 2, 3, 1023, 54, 99, 109, 101, 195, 196, ! 31, 85, 86, 1, 573, 118, 31, 576, 205, 616, ! 862, 23, 101, 25, 127, 2, 3, 3, 468, 216, ! 67, 101, 510, 136, 539, 84, 636, 31, 69, 89, ! 227, 929, 145, 90, 549, 68, 90, 839, 86, 68, ! 47, 154, 406, 68, 69, 1075, 2, 3, 8, 634, ! 163, 54, 2, 3, 101, 903, 67, 905, 573, 172, ! 86, 576, 471, 84, 201, 85, 516, 476, 89, 86, ! 677, 31, 946, 609, 610, 611, 612, 84, 90, 539, ! 67, 67, 94, 1119, 691, 573, 82, 694, 86, 549, ! 101, 1121, 444, 3, 4, 232, 902, 234, 235, 236, ! 1130, 238, 239, 99, 208, 724, 1004, 6, 724, 8, ! 8, 67, 1148, 573, 47, 724, 576, 67, 924, 2, ! 3, 1072, 724, 625, 724, 613, 85, 724, 179, 980, ! 89, 1161, 31, 31, 753, 68, 586, 724, 745, 648, ! 649, 68, 246, 31, 248, 764, 250, 757, 252, 510, ! 263, 753, 256, 290, 258, 724, 68, 90, 764, 47, ! 980, 981, 764, 527, 783, 269, 76, 783, 85, 286, ! 274, 81, 649, 525, 783, 1045, 68, 774, 315, 74, ! 269, 783, 286, 783, 67, 274, 783, 57, 58, 269, ! 797, 767, 799, 445, 274, 447, 783, 286, 3, 4, ! 3, 4, 72, 31, 341, 774, 286, 68, 69, 724, ! 261, 262, 316, 209, 783, 967, 3, 3, 4, 47, ! 1072, 28, 269, 45, 976, 329, 1, 274, 3, 4, ! 84, 47, 369, 370, 90, 89, 340, 725, 54, 286, ! 68, 69, 346, 862, 348, 67, 90, 69, 609, 610, ! 611, 612, 68, 68, 69, 387, 90, 759, 269, 774, ! 862, 68, 69, 274, 724, 3, 4, 47, 783, 84, ! 467, 76, 59, 76, 54, 286, 81, 703, 81, 68, ! 800, 68, 802, 3, 4, 90, 684, 90, 1138, 1139, ! 76, 3, 4, 47, 703, 81, 68, 3, 59, 286, ! 54, 76, 406, 68, 90, 755, 81, 68, 69, 68, ! 5, 6, 7, 8, 774, 452, 68, 406, 13, 14, ! 15, 59, 68, 783, 461, 10, 406, 444, 85, 433, ! 286, 435, 89, 437, 84, 439, 286, 944, 76, 59, ! 444, 3, 4, 81, 89, 542, 90, 59, 68, 453, ! 401, 92, 54, 59, 85, 444, 68, 69, 89, 406, ! 85, 81, 68, 69, 444, 867, 417, 418, 84, 81, ! 68, 69, 509, 89, 3, 387, 372, 84, 515, 84, ! 84, 988, 89, 85, 89, 84, 518, 89, 68, 69, ! 85, 59, 60, 61, 102, 406, 3, 444, 8, 5, ! 6, 7, 8, 286, 84, 8, 68, 13, 14, 15, ! 68, 69, 408, 68, 76, 767, 85, 521, 47, 81, ! 89, 525, 24, 527, 26, 31, 84, 68, 51, 52, ! 59, 568, 521, 444, 609, 610, 525, 612, 527, 68, ! 970, 521, 972, 85, 86, 525, 966, 527, 1045, 86, ! 539, 86, 59, 1072, 47, 3, 4, 444, 967, 968, ! 549, 68, 69, 68, 69, 762, 84, 976, 977, 573, ! 1072, 68, 69, 577, 521, 579, 1045, 581, 525, 85, ! 527, 85, 68, 69, 573, 89, 28, 576, 444, 31, ! 486, 968, 539, 573, 444, 792, 77, 78, 79, 47, ! 977, 84, 549, 45, 84, 86, 518, 85, 768, 769, ! 521, 59, 3, 4, 525, 879, 527, 220, 221, 208, ! 68, 1128, 1129, 85, 85, 889, 573, 89, 89, 576, ! 1045, 1033, 85, 81, 521, 1066, 89, 1068, 525, 417, ! 418, 801, 85, 85, 540, 541, 89, 89, 85, 47, ! 85, 280, 89, 657, 89, 659, 47, 661, 10, 663, ! 268, 444, 573, 271, 701, 521, 85, 275, 59, 525, ! 89, 521, 77, 78, 79, 525, 84, 68, 33, 630, ! 84, 86, 77, 78, 79, 1045, 573, 7, 8, 539, ! 81, 86, 68, 13, 14, 15, 3, 4, 84, 549, ! 704, 738, 706, 72, 708, 90, 710, 84, 712, 10, ! 714, 31, 716, 6, 718, 85, 753, 573, 45, 1017, ! 724, 967, 968, 573, 85, 76, 576, 316, 77, 78, ! 79, 45, 89, 11, 84, 724, 753, 86, 521, 85, ! 329, 89, 525, 47, 724, 5, 6, 7, 8, 753, ! 947, 340, 91, 13, 14, 15, 539, 346, 47, 348, ! 764, 68, 84, 767, 753, 862, 549, 84, 397, 76, ! 47, 31, 84, 753, 81, 764, 84, 724, 767, 783, ! 91, 84, 84, 820, 764, 774, 946, 767, 84, 826, ! 573, 7, 8, 576, 783, 90, 72, 13, 14, 15, ! 72, 84, 839, 783, 91, 45, 753, 86, 90, 84, ! 847, 762, 86, 724, 84, 423, 424, 764, 850, 86, ! 767, 47, 430, 1, 86, 85, 84, 774, 779, 780, ! 28, 85, 84, 31, 84, 91, 783, 724, 446, 85, ! 91, 792, 753, 7, 8, 862, 85, 45, 28, 13, ! 14, 15, 803, 764, 89, 89, 767, 753, 862, 86, ! 811, 85, 85, 84, 453, 84, 753, 31, 724, 89, ! 68, 69, 783, 862, 724, 879, 84, 764, 72, 1039, ! 767, 84, 862, 3, 888, 889, 90, 85, 47, 86, ! 879, 89, 1052, 47, 86, 47, 783, 753, 89, 879, ! 889, 47, 85, 753, 533, 8, 85, 72, 764, 889, ! 85, 767, 85, 47, 764, 862, 85, 767, 441, 442, ! 528, 89, 551, 552, 774, 85, 68, 783, 68, 17, ! 86, 827, 879, 783, 72, 86, 4, 849, 850, 7, ! 8, 724, 889, 839, 85, 13, 14, 15, 47, 68, ! 846, 862, 68, 68, 18, 35, 36, 37, 38, 84, ! 84, 29, 975, 43, 44, 45, 46, 72, 879, 16, ! 753, 18, 19, 20, 21, 862, 85, 84, 889, 85, ! 84, 764, 68, 85, 767, 10, 54, 84, 577, 89, ! 579, 774, 581, 91, 85, 85, 947, 68, 521, 10, ! 783, 5, 6, 7, 8, 84, 862, 85, 76, 13, ! 14, 15, 862, 81, 84, 10, 967, 968, 85, 648, ! 649, 1, 0, 0, 4, 976, 977, 7, 8, 980, ! 981, 516, 413, 13, 14, 15, 549, 5, 6, 7, ! 8, 549, 553, 651, 940, 13, 14, 15, 999, 29, ! 515, 31, 32, 798, 401, 1072, 1045, 5, 6, 7, ! 8, 927, 835, 31, 444, 13, 14, 15, 1072, 7, ! 8, 570, 967, 1110, 54, 13, 14, 15, 906, 862, ! 909, 85, 1076, 1072, 452, 511, 568, 695, 696, 818, ! 1078, 699, 1072, 1127, 1125, 651, 76, 576, 1045, 576, ! 666, 81, 35, 36, 37, 38, 769, 641, 631, 632, ! 43, 44, 45, 46, 634, 1039, 763, 1013, 999, 703, ! 572, 644, 645, 724, -1, 1072, 572, 586, 471, 1025, ! 39, 40, 41, 42, 476, 1031, -1, 85, 47, 48, ! 49, 50, 665, 666, 5, 6, 7, 8, -1, -1, ! 779, 780, 13, 14, 15, -1, 679, 680, -1, 63, ! 64, 1072, 66, 67, 68, 69, 246, 247, 248, 249, ! 31, -1, -1, 1069, 1070, -1, 1072, -1, 5, 6, ! 7, 8, 811, -1, -1, 1072, 13, 14, 15, 57, ! 58, 59, 60, 61, -1, 1045, -1, 720, -1, 807, ! 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, ! 45, 46, 47, 48, 49, 50, 1072, -1, -1, -1, ! -1, -1, 1072, 1119, 85, -1, -1, 1123, -1, 3, ! 4, 5, 6, 7, 8, -1, -1, 1, -1, -1, ! 4, 764, -1, 7, 8, -1, -1, -1, -1, 13, ! 14, 15, 1148, 1149, 883, 884, -1, -1, 85, -1, ! -1, -1, 1045, -1, -1, 29, -1, 31, 32, -1, ! -1, -1, 880, -1, 882, -1, -1, 885, 5, 6, ! 7, 8, 890, 891, -1, 893, 13, 14, 15, 1072, ! 54, 54, 55, 56, 57, 58, 59, 60, 61, 510, ! 908, -1, 76, 911, 31, 913, 914, 81, -1, -1, ! -1, -1, 76, 246, 247, 248, 249, 81, -1, -1, ! -1, 85, 86, 53, 54, 55, 56, 57, 58, 59, ! 60, 61, 855, 856, -1, 546, -1, -1, 967, 968, ! -1, 250, 251, 252, 253, -1, -1, 976, 977, 560, ! 561, 980, 981, 433, 434, 435, 436, -1, 85, -1, ! -1, -1, 970, -1, 972, -1, 5, 6, 7, 8, ! 999, -1, 895, 896, 13, 14, 15, -1, -1, -1, ! -1, 989, -1, -1, -1, 993, 5, 6, 7, 8, ! -1, 327, 328, -1, 13, 14, 15, 232, 609, 610, ! 611, 612, 55, 56, 57, 58, 59, 60, 61, 345, ! -1, 1040, 1041, 1042, 350, 351, -1, -1, -1, 355, ! 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, ! 366, -1, -1, -1, -1, -1, -1, -1, 1046, 1047, ! -1, 1049, 39, 40, 41, 42, 1054, -1, 1056, -1, ! 47, 48, 49, 50, -1, 4, 1064, -1, 7, 8, ! 5, 6, 7, 8, 13, 14, 15, -1, 13, 14, ! 15, -1, -1, -1, 685, -1, 687, -1, -1, -1, ! 29, -1, 1, -1, -1, 4, 5, 6, 7, 8, ! -1, -1, -1, -1, 13, 14, 15, -1, -1, -1, ! 433, 434, 435, 436, -1, 54, -1, -1, -1, -1, ! 29, -1, 1, -1, 3, 4, -1, -1, 7, 8, ! 9, 10, -1, 12, 13, 14, 15, 76, 437, 438, ! 439, 440, 81, -1, -1, 54, -1, -1, -1, -1, ! 29, 30, 31, 32, -1, 34, 35, 36, 37, 38, ! -1, -1, 488, 489, 43, -1, -1, 76, -1, -1, ! 49, -1, 81, 52, -1, 54, -1, -1, 57, 58, ! 59, 90, -1, -1, 63, 64, -1, 657, 658, 68, ! 69, 661, 662, -1, 73, -1, 75, 76, -1, -1, ! -1, 80, 81, -1, -1, -1, -1, -1, 87, 88, ! -1, 90, -1, 92, -1, -1, -1, -1, 1, -1, ! -1, 4, 5, 6, 7, 8, -1, -1, -1, -1, ! 13, 14, 15, -1, 704, 705, 706, 707, -1, -1, ! -1, 567, 712, 713, 714, 715, 29, -1, 31, -1, ! -1, 852, -1, -1, 580, -1, -1, -1, -1, 5, ! 6, 7, 8, 250, 251, 252, 253, 13, 14, 15, ! -1, 54, -1, 599, 1, -1, -1, 4, 5, 6, ! 7, 8, -1, -1, -1, 31, 13, 14, 15, -1, ! 515, -1, -1, 76, -1, -1, -1, -1, 81, -1, ! -1, 28, 29, -1, 31, 906, -1, 90, 909, -1, ! -1, -1, -1, -1, -1, -1, -1, -1, 45, 1, ! -1, -1, 4, 5, 6, 7, 8, 54, -1, -1, ! -1, 13, 14, 15, 657, 658, -1, -1, 661, 662, ! -1, 68, 69, 5, 6, 7, 8, 29, -1, 76, ! -1, 13, 14, 15, 81, 681, -1, -1, 85, -1, ! 659, 660, 89, 90, 663, 664, -1, -1, -1, 31, ! -1, -1, 54, -1, -1, -1, -1, 5, 6, 7, ! 8, 704, 705, 706, 707, 13, 14, 15, -1, 712, ! 713, 714, 715, -1, 76, -1, -1, -1, -1, 81, ! -1, -1, -1, 31, -1, -1, -1, 733, 90, 708, ! 709, 710, 711, -1, -1, -1, -1, 716, 717, 718, ! 719, 5, 6, 7, 8, -1, -1, 1028, -1, 13, ! 14, 15, 657, 658, 659, 660, 661, 662, 663, 664, ! -1, -1, -1, -1, -1, 4, 5, 6, 7, 8, ! 437, 438, 439, 440, 13, 14, 15, 49, 50, 51, ! 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, ! 29, -1, 798, -1, -1, -1, -1, 1078, -1, 704, ! 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, ! 715, 716, 717, 718, 719, 54, 822, -1, 3, -1, ! -1, 827, -1, -1, 9, 10, -1, 12, -1, -1, ! 836, 837, -1, -1, 1115, 1116, 842, 76, -1, -1, ! -1, -1, 81, -1, -1, 30, 85, 32, -1, 34, ! 35, 36, 37, 38, -1, -1, -1, -1, 43, -1, ! -1, -1, -1, -1, 49, 871, -1, 52, -1, -1, ! -1, -1, 57, 58, 59, -1, -1, -1, 63, 64, ! -1, -1, -1, 68, 69, -1, -1, -1, 73, -1, ! 75, 76, -1, -1, -1, 80, 902, -1, -1, -1, ! -1, 907, 87, 88, 910, -1, -1, 92, 52, 53, ! 54, 55, 56, 57, 58, 59, 60, 61, 924, -1, ! -1, 927, -1, 929, 930, -1, -1, -1, -1, -1, ! -1, 4, 5, 6, 7, 8, -1, -1, -1, -1, ! 13, 14, 15, 1, -1, 3, 4, -1, -1, -1, ! -1, 9, 10, -1, 12, -1, 29, -1, 16, 965, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, ! 28, -1, 30, -1, 32, -1, 34, 35, 36, 37, ! 38, 54, -1, -1, 990, 43, -1, -1, 994, -1, ! -1, 49, 659, 660, 52, 1001, 663, 664, 1004, 57, ! 58, 59, 1008, 76, -1, 63, 64, -1, 81, -1, ! 68, 69, 85, -1, -1, 73, -1, 75, 76, -1, ! -1, -1, 80, 81, -1, -1, -1, 85, -1, 87, ! 88, -1, 90, -1, 92, -1, -1, -1, -1, -1, ! -1, 708, 709, 710, 711, -1, -1, -1, -1, 716, ! 717, 718, 719, 1, -1, 3, 4, 5, 6, 7, ! 8, 9, 10, -1, 12, 13, 14, 15, 16, -1, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, ! 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, ! 38, -1, -1, -1, -1, 43, -1, -1, -1, -1, ! -1, 49, -1, -1, 52, -1, 54, -1, -1, 57, ! 58, 59, -1, -1, -1, 63, 64, -1, -1, -1, ! 68, 69, -1, -1, -1, 73, -1, 75, 76, -1, ! -1, -1, 80, 81, -1, -1, -1, 85, 86, 87, ! 88, -1, 90, 1, 92, 3, 4, 5, 6, 7, ! 8, 9, 10, -1, 12, 13, 14, 15, 16, -1, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, ! 28, 29, 30, 31, 32, -1, 34, 35, 36, 37, ! 38, -1, -1, -1, -1, 43, -1, -1, -1, -1, ! -1, 49, -1, -1, 52, -1, 54, -1, -1, 57, ! 58, 59, -1, -1, -1, 63, 64, -1, -1, -1, ! 68, 69, -1, -1, -1, 73, -1, 75, 76, -1, ! -1, -1, 80, 81, -1, -1, -1, 85, -1, 87, ! 88, -1, 90, 1, 92, 3, 4, -1, -1, -1, ! -1, 9, 10, -1, 12, -1, -1, -1, 16, -1, ! 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, ! 28, -1, 30, -1, 32, -1, 34, 35, 36, 37, ! 38, -1, -1, -1, -1, 43, -1, -1, -1, -1, ! -1, 49, -1, -1, 52, -1, -1, -1, -1, 57, ! 58, 59, -1, -1, -1, 63, 64, -1, -1, -1, ! 68, 69, -1, -1, -1, 73, -1, 75, 76, -1, ! -1, -1, 80, 81, -1, -1, -1, 85, -1, 87, ! 88, -1, 90, 1, 92, 3, 4, -1, -1, -1, ! -1, 9, 10, 46, 12, 48, 49, 50, 51, 52, ! 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, ! -1, -1, 30, -1, 32, -1, 34, 35, 36, 37, ! 38, -1, -1, -1, -1, 43, -1, -1, -1, -1, ! -1, 49, -1, -1, 52, -1, -1, -1, -1, 57, ! 58, 59, -1, -1, -1, 63, 64, -1, -1, 67, ! 68, 69, -1, -1, -1, 73, -1, 75, 76, -1, ! -1, -1, 80, 81, -1, -1, -1, -1, 86, 87, ! 88, -1, 90, 1, 92, 3, 4, -1, -1, -1, ! -1, 9, 10, -1, 12, 50, 51, 52, 53, 54, ! 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, ! -1, -1, 30, -1, 32, -1, 34, 35, 36, 37, ! 38, -1, -1, -1, -1, 43, -1, -1, -1, -1, ! -1, 49, -1, -1, 52, -1, -1, -1, -1, 57, ! 58, 59, -1, -1, -1, 63, 64, -1, -1, 67, ! 68, 69, -1, -1, -1, 73, -1, 75, 76, -1, ! -1, -1, 80, 81, -1, -1, -1, -1, 86, 87, ! 88, 1, 90, 3, 92, -1, -1, -1, -1, 9, ! 10, -1, 12, 51, 52, 53, 54, 55, 56, 57, ! 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, ! 30, -1, 32, -1, 34, 35, 36, 37, 38, -1, ! -1, -1, -1, 43, -1, 45, -1, -1, -1, 49, ! -1, -1, 52, -1, -1, -1, -1, 57, 58, 59, ! -1, -1, -1, 63, 64, -1, -1, 67, 68, 69, ! 1, -1, 3, 73, -1, 75, -1, -1, 9, 10, ! 80, 12, -1, -1, -1, -1, -1, 87, 88, -1, ! 90, -1, 92, -1, -1, -1, -1, -1, -1, 30, ! -1, 32, -1, 34, 35, 36, 37, 38, -1, -1, ! -1, -1, 43, -1, -1, -1, -1, -1, 49, -1, ! -1, 52, -1, -1, -1, -1, 57, 58, 59, -1, ! -1, -1, 63, 64, -1, -1, -1, 68, 69, 1, ! -1, 3, 73, -1, 75, -1, -1, 9, 10, 80, ! 12, -1, -1, -1, -1, -1, 87, 88, -1, 90, ! -1, 92, -1, -1, -1, -1, -1, -1, 30, -1, ! 32, -1, 34, 35, 36, 37, 38, -1, -1, -1, ! -1, 43, -1, -1, -1, -1, -1, 49, -1, -1, ! 52, -1, -1, -1, -1, 57, 58, 59, -1, -1, ! -1, 63, 64, -1, -1, -1, 68, 69, -1, -1, ! -1, 73, -1, 75, -1, -1, -1, -1, 80, -1, ! -1, -1, -1, -1, -1, 87, 88, -1, 90, -1, ! 92, 3, 4, 5, 6, 7, 8, 9, 10, -1, ! 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, ! 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, ! 32, -1, 34, 35, 36, 37, 38, -1, -1, -1, ! -1, 43, -1, -1, -1, -1, -1, 49, -1, -1, ! 52, -1, 54, -1, -1, 57, 58, 59, -1, -1, ! -1, 63, 64, -1, -1, -1, 68, 69, -1, -1, ! -1, 73, -1, 75, 76, -1, -1, -1, 80, 81, ! -1, -1, -1, 85, -1, 87, 88, -1, 90, -1, ! 92, 3, 4, 5, 6, 7, 8, 9, 10, -1, ! 12, 13, 14, 15, -1, 4, 5, 6, 7, 8, ! -1, -1, 11, -1, 13, 14, 15, 29, 30, 31, ! 32, -1, 34, 35, 36, 37, 38, -1, -1, -1, ! 29, 43, 31, -1, -1, -1, -1, 49, -1, -1, ! 52, -1, 54, -1, -1, 57, 58, 59, -1, -1, ! -1, 63, 64, -1, -1, 54, 68, 69, -1, -1, ! -1, 73, -1, 75, 76, 3, 4, -1, 80, 81, ! -1, 9, 10, -1, 12, 87, 88, 76, -1, -1, ! 92, -1, 81, -1, 22, 23, 24, 25, 26, 27, ! 28, -1, 30, -1, 32, -1, 34, 35, 36, 37, ! 38, -1, -1, -1, -1, 43, -1, -1, -1, -1, ! -1, 49, -1, -1, 52, -1, -1, -1, -1, 57, ! 58, 59, -1, -1, -1, 63, 64, -1, -1, -1, ! 68, 69, -1, -1, -1, 73, -1, 75, 76, -1, ! -1, -1, 80, 81, -1, -1, -1, 85, -1, 87, ! 88, -1, 90, -1, 92, 3, 4, -1, -1, 7, ! 8, 9, 10, -1, 12, 13, 14, 15, -1, 4, ! 5, 6, 7, 8, -1, -1, -1, -1, 13, 14, ! 15, 29, 30, 31, 32, -1, 34, 35, 36, 37, ! 38, -1, -1, -1, 29, 43, 31, -1, -1, -1, ! -1, 49, -1, -1, 52, -1, 54, -1, -1, 57, ! 58, 59, -1, -1, -1, 63, 64, -1, -1, 54, ! 68, 69, -1, -1, -1, 73, -1, 75, 76, 3, ! -1, -1, 80, 81, -1, 9, 10, -1, 12, 87, ! 88, 76, -1, -1, 92, -1, 81, -1, -1, -1, ! 85, -1, -1, -1, -1, -1, 30, -1, 32, -1, ! 34, 35, 36, 37, 38, -1, -1, -1, -1, 43, ! -1, -1, -1, -1, -1, 49, -1, -1, 52, -1, ! -1, -1, -1, 57, 58, 59, -1, -1, -1, 63, ! 64, -1, -1, -1, 68, 69, 3, -1, -1, 73, ! -1, 75, 9, 10, -1, 12, 80, -1, -1, -1, ! -1, -1, -1, 87, 88, -1, -1, 91, 92, -1, ! -1, -1, -1, 30, -1, 32, -1, 34, 35, 36, ! 37, 38, -1, -1, -1, -1, 43, -1, -1, -1, ! -1, -1, 49, -1, -1, 52, -1, -1, -1, -1, ! 57, 58, 59, -1, -1, -1, 63, 64, -1, -1, ! -1, 68, 69, 3, -1, -1, 73, -1, 75, 9, ! 10, -1, 12, 80, -1, -1, -1, -1, -1, -1, ! 87, 88, -1, 90, -1, 92, -1, -1, -1, -1, ! 30, -1, 32, -1, 34, 35, 36, 37, 38, -1, ! -1, -1, -1, 43, -1, -1, -1, -1, -1, 49, ! -1, -1, 52, -1, -1, -1, -1, 57, 58, 59, ! -1, -1, -1, 63, 64, -1, -1, -1, 68, 69, ! 3, -1, -1, 73, -1, 75, 9, 10, -1, 12, ! 80, -1, -1, -1, -1, -1, -1, 87, 88, -1, ! -1, 91, 92, -1, -1, -1, -1, 30, -1, 32, ! -1, 34, 35, 36, 37, 38, -1, -1, -1, -1, ! 43, -1, -1, -1, -1, -1, 49, -1, -1, 52, ! -1, -1, -1, -1, 57, 58, 59, -1, -1, -1, ! 63, 64, -1, -1, -1, 68, 69, 3, -1, -1, ! 73, -1, 75, 9, 10, -1, 12, 80, -1, -1, ! -1, -1, 85, -1, 87, 88, -1, -1, -1, 92, ! -1, -1, -1, -1, 30, -1, 32, -1, 34, 35, ! 36, 37, 38, -1, -1, -1, -1, 43, -1, -1, ! -1, -1, -1, 49, -1, -1, 52, -1, -1, -1, ! -1, 57, 58, 59, -1, -1, -1, 63, 64, -1, ! -1, -1, 68, 69, 3, -1, -1, 73, -1, 75, ! 9, 10, -1, 12, 80, -1, -1, -1, -1, -1, ! -1, 87, 88, -1, -1, -1, 92, -1, -1, -1, ! -1, 30, -1, 32, -1, 34, 35, 36, 37, 38, ! -1, -1, -1, -1, 43, -1, -1, -1, -1, -1, ! 49, -1, -1, 52, -1, -1, -1, -1, 57, 58, ! 59, -1, -1, -1, 63, 64, -1, -1, -1, 68, ! 69, 3, -1, -1, 73, -1, 75, 9, 10, -1, ! 12, 80, -1, -1, -1, -1, -1, -1, 87, 88, ! -1, -1, -1, 92, -1, -1, -1, -1, 30, -1, ! 32, -1, 34, 35, 36, 37, 38, -1, -1, -1, ! -1, 43, -1, -1, -1, -1, -1, 49, -1, -1, ! 52, -1, -1, -1, -1, 57, 58, 59, -1, -1, ! -1, 63, 64, -1, -1, -1, 68, 69, 3, -1, ! -1, 73, -1, 75, 9, 10, -1, 12, 80, -1, ! -1, -1, -1, -1, -1, 87, 88, -1, -1, -1, ! 92, -1, -1, -1, -1, 30, -1, 32, -1, 34, ! 35, 36, 37, 38, -1, -1, -1, -1, 43, -1, ! -1, -1, -1, -1, 49, -1, -1, 52, -1, -1, ! -1, -1, 57, 58, 59, -1, -1, -1, 63, 64, ! -1, -1, -1, 68, 69, -1, 1, -1, 73, 4, ! 75, -1, 7, 8, -1, 80, -1, -1, 13, 14, ! 15, -1, 87, 88, -1, 1, -1, 92, 4, 5, ! 6, 7, 8, -1, 29, -1, 31, 13, 14, 15, ! -1, -1, -1, -1, 1, -1, -1, 4, 5, 6, ! 7, 8, 28, 29, -1, 31, 13, 14, 15, 54, ! -1, -1, -1, -1, -1, -1, -1, -1, -1, 45, ! -1, 28, 29, -1, 31, -1, -1, -1, 54, -1, ! -1, 76, 77, 78, 79, -1, 81, -1, 45, -1, ! 85, 86, 68, 69, -1, -1, -1, 54, -1, -1, ! 76, -1, -1, -1, -1, 81, -1, -1, -1, 85, ! -1, -1, -1, 89, 90, -1, -1, -1, -1, 76, ! -1, -1, -1, -1, 81, -1, -1, -1, 85, -1, ! -1, 1, 89, 90, 4, 5, 6, 7, 8, -1, ! -1, -1, -1, 13, 14, 15, -1, -1, -1, -1, ! -1, -1, -1, 3, 4, -1, -1, 7, 8, 29, ! -1, 31, 12, 13, 14, 15, 16, 17, 18, 19, ! 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, ! 30, -1, 1, -1, 54, 4, -1, -1, 7, 8, ! -1, -1, -1, -1, 13, 14, 15, 47, -1, -1, ! -1, -1, -1, -1, -1, -1, 76, -1, -1, -1, ! 29, 81, 31, -1, -1, -1, -1, -1, -1, -1, ! 90, -1, -1, -1, -1, -1, 76, -1, -1, -1, ! -1, 81, -1, -1, -1, 54, -1, -1, -1, 89, ! -1, 1, -1, 3, 4, 5, 6, 7, 8, -1, ! -1, -1, -1, 13, 14, 15, -1, 76, 77, 78, ! 79, -1, 81, -1, -1, -1, 85, 86, 28, 29, ! -1, 31, 32, 1, -1, 3, 4, 5, 6, 7, ! 8, -1, -1, -1, -1, 13, 14, 15, -1, -1, ! -1, -1, -1, -1, 54, -1, -1, 57, 58, 59, ! -1, 29, -1, 31, -1, -1, -1, -1, 68, -1, ! 70, 71, 72, -1, -1, -1, 76, -1, -1, -1, ! 80, 81, 82, 83, -1, 85, 54, -1, -1, 57, ! 58, 59, 1, -1, 3, 4, 5, 6, 7, 8, ! 68, -1, -1, -1, 13, 14, 15, -1, 76, -1, ! -1, -1, -1, 81, -1, -1, -1, 85, -1, -1, ! 29, 1, 31, 3, 4, 5, 6, 7, 8, -1, ! -1, 11, -1, 13, 14, 15, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, 54, -1, -1, -1, 29, ! 59, -1, 4, 5, 6, 7, 8, -1, -1, 68, ! -1, 13, 14, 15, -1, -1, -1, 76, -1, -1, ! -1, -1, 81, -1, 54, 1, 85, 29, 4, 5, ! 6, 7, 8, -1, -1, 11, -1, 13, 14, 15, ! -1, -1, -1, -1, -1, -1, 76, -1, -1, -1, ! -1, 81, 54, 29, 84, -1, 4, 5, 6, 7, ! 8, -1, -1, -1, -1, 13, 14, 15, -1, -1, ! -1, -1, -1, -1, 76, -1, -1, -1, 54, 81, ! -1, 29, -1, 31, 4, 5, 6, 7, 8, -1, ! -1, -1, -1, 13, 14, 15, -1, -1, -1, -1, ! 76, -1, -1, -1, -1, 81, 54, -1, 84, 29, ! -1, 31, -1, 4, 5, 6, 7, 8, -1, -1, ! -1, -1, 13, 14, 15, -1, -1, -1, 76, -1, ! -1, -1, -1, 81, 54, -1, -1, 85, 29, -1, ! 31, 4, 5, 6, 7, 8, -1, -1, -1, -1, ! 13, 14, 15, -1, -1, -1, 76, -1, -1, -1, ! -1, 81, 11, 54, -1, 85, 29, 4, 5, 6, ! 7, 8, -1, -1, -1, -1, 13, 14, 15, -1, ! -1, -1, -1, -1, -1, 76, -1, -1, -1, -1, ! 81, 54, 29, -1, 85, 44, 45, 46, -1, 48, ! 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, ! 59, 60, 61, 76, -1, -1, -1, 54, 81, 44, ! 45, 46, 85, 48, 49, 50, 51, 52, 53, 54, ! 55, 56, 57, 58, 59, 60, 61, -1, -1, 76, ! -1, -1, 91, -1, 81, 3, 4, -1, 85, 7, ! 8, -1, -1, -1, 12, 13, 14, 15, 16, 17, ! 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, ! 28, 29, 30, -1, -1, -1, -1, -1, -1, -1, ! -1, 3, 4, -1, -1, 7, 8, -1, -1, 47, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, ! 22, 23, 24, 25, 26, 27, 28, 29, 30, -1, ! 68, -1, -1, -1, -1, -1, -1, -1, 76, -1, ! -1, -1, -1, 81, -1, 47, 3, 4, -1, -1, ! 7, 8, -1, -1, -1, 12, 13, 14, 15, 16, ! 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, ! 27, 28, 29, 30, 76, -1, -1, -1, -1, 81, ! -1, -1, 3, 4, -1, -1, 7, 8, -1, -1, ! 47, 12, 13, 14, 15, 16, 17, 18, 19, 20, ! 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, ! -1, 4, 5, 6, 7, 8, -1, -1, 11, 76, ! 13, 14, 15, -1, 81, -1, 47, -1, -1, 4, ! 5, 6, 7, 8, -1, -1, 29, -1, 13, 14, ! 15, 4, 5, 6, 7, 8, -1, -1, -1, -1, ! 13, 14, 15, -1, 29, 76, 31, -1, -1, -1, ! 81, 54, -1, -1, -1, -1, 29, -1, 31, -1, ! -1, 4, 5, 6, 7, 8, -1, -1, -1, 54, ! 13, 14, 15, 76, -1, -1, -1, -1, 81, -1, ! -1, 54, -1, -1, -1, -1, 29, -1, 31, -1, ! -1, 76, -1, -1, -1, -1, 81, -1, -1, -1, ! -1, -1, -1, 76, -1, -1, -1, -1, 81, -1, ! -1, 54, 4, 5, 6, 7, 8, -1, -1, -1, ! -1, 13, 14, 15, -1, 4, 5, 6, 7, 8, ! -1, -1, -1, 76, 13, 14, 15, 29, 81, 31, ! -1, -1, -1, -1, 4, 5, 6, 7, 8, -1, ! 29, -1, 31, 13, 14, 15, 4, 5, 6, 7, ! 8, -1, 54, -1, -1, 13, 14, 15, -1, 29, ! -1, -1, -1, -1, -1, 54, 4, 5, 6, 7, ! 8, 29, -1, -1, 76, 13, 14, 15, -1, 81, ! -1, -1, -1, -1, 54, -1, -1, 76, -1, -1, ! -1, 29, 81, -1, -1, -1, 54, -1, -1, 4, ! 5, 6, 7, 8, -1, -1, 76, -1, 13, 14, ! 15, 81, -1, -1, -1, -1, 54, 4, 76, -1, ! 7, 8, -1, 81, 29, -1, 13, 14, 15, -1, ! 4, -1, -1, 7, 8, -1, -1, -1, 76, 13, ! 14, 15, 29, 81, 31, -1, -1, -1, -1, 54, ! 4, -1, -1, 7, 8, 29, -1, 31, -1, 13, ! 14, 15, -1, -1, -1, -1, -1, 54, -1, -1, ! -1, 76, -1, -1, -1, 29, 81, 31, -1, -1, ! 54, -1, -1, -1, -1, -1, -1, -1, -1, 76, ! -1, -1, -1, -1, 81, 11, -1, -1, -1, -1, ! 54, -1, 76, -1, 44, 45, 46, 81, 48, 49, ! 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, ! 60, 61, 76, -1, -1, -1, -1, 81, 44, 45, ! 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, ! 56, 57, 58, 59, 60, 61, -1, -1, 44, 45, ! 46, 91, 48, 49, 50, 51, 52, 53, 54, 55, ! 56, 57, 58, 59, 60, 61, 44, 45, 46, -1, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, ! 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, ! 44, 45, 46, 89, 48, 49, 50, 51, 52, 53, ! 54, 55, 56, 57, 58, 59, 60, 61, 44, 45, ! 46, 89, 48, 49, 50, 51, 52, 53, 54, 55, ! 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, ! -1, -1, 31, -1, -1, 89, -1, -1, -1, -1, ! -1, -1, -1, -1, -1, 44, 45, 46, 84, 48, ! 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, ! 59, 60, 61, 44, 45, 46, 47, 48, 49, 50, ! 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, ! 61 }; + /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ + #line 3 "/usr/share/bison/bison.simple" ! /* Skeleton output parser for bison, ! ! Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 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. ! ! 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., 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! ! /* As a special exception, when this file is copied by Bison into a ! Bison output file, you may use that output file without restriction. ! This special exception was added by the Free Software Foundation ! in version 1.24 of Bison. */ ! ! /* This is the parser code that is written into each bison parser when ! the %semantic_parser declaration is not specified in the grammar. ! It was written by Richard Stallman by simplifying the hairy parser ! used when %semantic_parser is specified. */ ! ! /* All symbols defined below should begin with yy or YY, to avoid ! infringing on user name space. This should be done even for local ! variables, as they might otherwise be expanded by user macros. ! There are some unavoidable exceptions within include files to ! define necessary library symbols; they are noted "INFRINGES ON ! USER NAME SPACE" below. */ ! ! #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) ! ! /* The parser invokes alloca or malloc; define the necessary symbols. */ ! ! # if YYSTACK_USE_ALLOCA ! # define YYSTACK_ALLOC alloca ! # else ! # ifndef YYSTACK_USE_ALLOCA ! # if defined (alloca) || defined (_ALLOCA_H) ! # define YYSTACK_ALLOC alloca ! # else ! # ifdef __GNUC__ ! # define YYSTACK_ALLOC __builtin_alloca ! # endif ! # endif ! # endif ! # endif ! ! # ifdef YYSTACK_ALLOC ! /* Pacify GCC's `empty if-body' warning. */ ! # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) ! # else ! # if defined (__STDC__) || defined (__cplusplus) ! # include /* INFRINGES ON USER NAME SPACE */ ! # define YYSIZE_T size_t ! # endif ! # define YYSTACK_ALLOC malloc ! # define YYSTACK_FREE free ! # endif ! #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ ! ! ! #if (! defined (yyoverflow) \ ! && (! defined (__cplusplus) \ ! || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) ! ! /* A type that is properly aligned for any stack member. */ ! union yyalloc { ! short yyss; ! YYSTYPE yyvs; ! # if YYLSP_NEEDED ! YYLTYPE yyls; ! # endif }; + /* The size of the maximum gap between one aligned stack and the next. */ + # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) + + /* The size of an array large to enough to hold all stacks, each with + N elements. */ + # if YYLSP_NEEDED + # define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAX) + # else + # define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAX) + # endif + + /* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ + # ifndef YYCOPY + # if 1 < __GNUC__ + # define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) + # else + # define YYCOPY(To, From, Count) \ + do \ + { \ + register YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (0) + # endif + # endif + + /* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + 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) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + + #endif + + #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ #endif *************** static const unsigned short yystos[] = *** 2613,2646 **** #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) ! #define YYEMPTY (-2) #define YYEOF 0 - #define YYACCEPT goto yyacceptlab ! #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 - /* 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. */ - #define YYFAIL goto yyerrlab - #define YYRECOVERING() (!!yyerrstatus) - #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ ! yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { \ ! yyerror ("syntax error: cannot back up");\ YYERROR; \ } \ while (0) --- 2383,2411 ---- #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) ! #define YYEMPTY -2 #define YYEOF 0 #define YYACCEPT goto yyacceptlab ! #define YYABORT goto yyabortlab #define YYERROR goto yyerrlab1 /* 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. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ ! yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { \ ! yyerror ("syntax error: cannot back up"); \ YYERROR; \ } \ while (0) *************** while (0) *** 2648,2671 **** #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Compute the default location (before the actions ! are run). */ #ifndef YYLLOC_DEFAULT ! # define YYLLOC_DEFAULT(Current, Rhs, N) \ ! Current.first_line = Rhs[1].first_line; \ ! Current.first_column = Rhs[1].first_column; \ ! Current.last_line = Rhs[N].last_line; \ ! Current.last_column = Rhs[N].last_column; #endif /* YYLEX -- calling `yylex' with the right arguments. */ ! #ifdef YYLEX_PARAM ! # define YYLEX yylex (YYLEX_PARAM) ! #else ! # define YYLEX yylex () ! #endif /* Enable debugging if requested. */ #if YYDEBUG --- 2413,2453 ---- #define YYTERROR 1 #define YYERRCODE 256 + /* YYLLOC_DEFAULT -- Compute the default location (before the actions ! are run). ! ! When YYLLOC_DEFAULT is run, CURRENT is set the location of the ! first token. By default, to implement support for ranges, extend ! its range to the last symbol. */ #ifndef YYLLOC_DEFAULT ! # define YYLLOC_DEFAULT(Current, Rhs, N) \ ! Current.last_line = Rhs[N].last_line; \ ! Current.last_column = Rhs[N].last_column; #endif + /* YYLEX -- calling `yylex' with the right arguments. */ ! #if YYPURE ! # if YYLSP_NEEDED ! # ifdef YYLEX_PARAM ! # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) ! # else ! # define YYLEX yylex (&yylval, &yylloc) ! # endif ! # else /* !YYLSP_NEEDED */ ! # ifdef YYLEX_PARAM ! # define YYLEX yylex (&yylval, YYLEX_PARAM) ! # else ! # define YYLEX yylex (&yylval) ! # endif ! # endif /* !YYLSP_NEEDED */ ! #else /* !YYPURE */ ! # define YYLEX yylex () ! #endif /* !YYPURE */ ! /* Enable debugging if requested. */ #if YYDEBUG *************** do { \ *** 2680,2772 **** if (yydebug) \ YYFPRINTF Args; \ } while (0) - - # define YYDSYMPRINT(Args) \ - do { \ - if (yydebug) \ - yysymprint Args; \ - } while (0) - - # define YYDSYMPRINTF(Title, Token, Value, Location) \ - do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Token, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ - } while (0) - - /*------------------------------------------------------------------. - | yy_stack_print -- Print the state stack from its BOTTOM up to its | - | TOP (cinluded). | - `------------------------------------------------------------------*/ - - #if defined (__STDC__) || defined (__cplusplus) - static void - yy_stack_print (short *bottom, short *top) - #else - static void - yy_stack_print (bottom, top) - short *bottom; - short *top; - #endif - { - YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); - YYFPRINTF (stderr, "\n"); - } - - # define YY_STACK_PRINT(Bottom, Top) \ - do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ - } while (0) - - - /*------------------------------------------------. - | Report that the YYRULE is going to be reduced. | - `------------------------------------------------*/ - - #if defined (__STDC__) || defined (__cplusplus) - static void - yy_reduce_print (int yyrule) - #else - static void - yy_reduce_print (yyrule) - int yyrule; - #endif - { - int yyi; - unsigned int yylineno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", - yyrule - 1, yylineno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); - } - - # define YY_REDUCE_PRINT(Rule) \ - do { \ - if (yydebug) \ - yy_reduce_print (Rule); \ - } while (0) - /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) - # define YYDSYMPRINT(Args) - # define YYDSYMPRINTF(Title, Token, Value, Location) - # define YY_STACK_PRINT(Bottom, Top) - # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ - /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 --- 2462,2474 ---- *************** int yydebug; *** 2786,2795 **** #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif - ! ! #if YYERROR_VERBOSE # ifndef yystrlen # if defined (__GLIBC__) && defined (_STRING_H) --- 2488,2495 ---- #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif ! #ifdef YYERROR_VERBOSE # ifndef yystrlen # if defined (__GLIBC__) && defined (_STRING_H) *************** yystpcpy (yydest, yysrc) *** 2839,2972 **** } # endif # endif - - #endif /* !YYERROR_VERBOSE */ - - - - #if YYDEBUG - /*--------------------------------. - | Print this symbol on YYOUTPUT. | - `--------------------------------*/ - - #if defined (__STDC__) || defined (__cplusplus) - static void - yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) - #else - static void - yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; - #endif - { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - if (yytype < YYNTOKENS) - { - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - # ifdef YYPRINT - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); - # endif - } - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - switch (yytype) - { - default: - break; - } - YYFPRINTF (yyoutput, ")"); - } - - #endif /* ! YYDEBUG */ - /*-----------------------------------------------. - | Release the memory associated to this symbol. | - `-----------------------------------------------*/ - - #if defined (__STDC__) || defined (__cplusplus) - static void - yydestruct (int yytype, YYSTYPE *yyvaluep) - #else - static void - yydestruct (yytype, yyvaluep) - int yytype; - YYSTYPE *yyvaluep; #endif - { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - switch (yytype) - { - - default: - break; - } - } ! /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM # if defined (__STDC__) || defined (__cplusplus) ! int yyparse (void *YYPARSE_PARAM); # else ! int yyparse (); # endif ! #else /* ! YYPARSE_PARAM */ ! #if defined (__STDC__) || defined (__cplusplus) int yyparse (void); ! #else ! int yyparse (); #endif - #endif /* ! YYPARSE_PARAM */ - - ! /* The lookahead symbol. */ ! int yychar; ! ! /* The semantic value of the lookahead symbol. */ ! YYSTYPE yylval; ! /* Number of syntax errors so far. */ int yynerrs; ! /*----------. ! | yyparse. | ! `----------*/ ! #ifdef YYPARSE_PARAM ! # if defined (__STDC__) || defined (__cplusplus) ! int yyparse (void *YYPARSE_PARAM) ! # else ! int yyparse (YYPARSE_PARAM) ! void *YYPARSE_PARAM; ! # endif ! #else /* ! YYPARSE_PARAM */ ! #if defined (__STDC__) || defined (__cplusplus) ! int ! yyparse (void) ! #else ! int ! yyparse () ! #endif ! #endif { ! register int yystate; register int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Lookahead token as an internal (translated) token number. */ ! int yytoken = 0; /* Three stacks and their tools: `yyss': related to states, --- 2539,2624 ---- } # endif # endif #endif + #line 315 "/usr/share/bison/bison.simple" ! ! /* The user can define YYPARSE_PARAM as the name of an argument to be passed ! into yyparse. The argument should have type void *. ! It should actually point to an object. ! Grammar actions can access the variable by casting it ! to the proper pointer type. */ #ifdef YYPARSE_PARAM # if defined (__STDC__) || defined (__cplusplus) ! # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM ! # define YYPARSE_PARAM_DECL # else ! # define YYPARSE_PARAM_ARG YYPARSE_PARAM ! # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; # endif ! #else /* !YYPARSE_PARAM */ ! # define YYPARSE_PARAM_ARG ! # define YYPARSE_PARAM_DECL ! #endif /* !YYPARSE_PARAM */ ! ! /* Prevent warning if -Wstrict-prototypes. */ ! #ifdef __GNUC__ ! # ifdef YYPARSE_PARAM ! int yyparse (void *); ! # else int yyparse (void); ! # endif #endif ! /* YY_DECL_VARIABLES -- depending whether we use a pure parser, ! variables are global, or local to YYPARSE. */ ! #define YY_DECL_NON_LSP_VARIABLES \ ! /* The lookahead symbol. */ \ ! int yychar; \ ! \ ! /* The semantic value of the lookahead symbol. */ \ ! YYSTYPE yylval; \ ! \ ! /* Number of parse errors so far. */ \ int yynerrs; + #if YYLSP_NEEDED + # define YY_DECL_VARIABLES \ + YY_DECL_NON_LSP_VARIABLES \ + \ + /* Location data for the lookahead symbol. */ \ + YYLTYPE yylloc; + #else + # define YY_DECL_VARIABLES \ + YY_DECL_NON_LSP_VARIABLES + #endif ! /* If nonreentrant, generate the variables here. */ ! #if !YYPURE ! YY_DECL_VARIABLES ! #endif /* !YYPURE */ ! int ! yyparse (YYPARSE_PARAM_ARG) ! YYPARSE_PARAM_DECL { ! /* If reentrant, generate the variables here. */ ! #if YYPURE ! YY_DECL_VARIABLES ! #endif /* !YYPURE */ ! register int yystate; register int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Lookahead token as an internal (translated) token number. */ ! int yychar1 = 0; /* Three stacks and their tools: `yyss': related to states, *************** yyparse () *** 2976,2982 **** Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ ! /* The state stack. */ short yyssa[YYINITDEPTH]; short *yyss = yyssa; register short *yyssp; --- 2628,2634 ---- Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ ! /* The state stack. */ short yyssa[YYINITDEPTH]; short *yyss = yyssa; register short *yyssp; *************** yyparse () *** 2986,3004 **** YYSTYPE *yyvs = yyvsa; register YYSTYPE *yyvsp; ! ! #define YYPOPSTACK (yyvsp--, yyssp--) YYSIZE_T yystacksize = YYINITDEPTH; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; ! /* When reducing, the number of symbols on the RHS of the reduced ! rule. */ int yylen; YYDPRINTF ((stderr, "Starting parse\n")); --- 2638,2668 ---- YYSTYPE *yyvs = yyvsa; register YYSTYPE *yyvsp; + #if YYLSP_NEEDED + /* The location stack. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp; + #endif ! #if YYLSP_NEEDED ! # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) ! #else ! # define YYPOPSTACK (yyvsp--, yyssp--) ! #endif YYSIZE_T yystacksize = YYINITDEPTH; + /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; ! #if YYLSP_NEEDED ! YYLTYPE yyloc; ! #endif /* When reducing, the number of symbols on the RHS of the reduced ! rule. */ int yylen; YYDPRINTF ((stderr, "Starting parse\n")); *************** yyparse () *** 3015,3021 **** yyssp = yyss; yyvsp = yyvs; ! goto yysetstate; /*------------------------------------------------------------. --- 2679,2687 ---- yyssp = yyss; yyvsp = yyvs; ! #if YYLSP_NEEDED ! yylsp = yyls; ! #endif goto yysetstate; /*------------------------------------------------------------. *************** yyparse () *** 3030,3036 **** yysetstate: *yyssp = yystate; ! if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; --- 2696,2702 ---- yysetstate: *yyssp = yystate; ! if (yyssp >= yyss + yystacksize - 1) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; *************** yyparse () *** 3043,3059 **** YYSTYPE *yyvs1 = yyvs; short *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 ! be undefined if yyoverflow is a macro. */ yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), ! &yystacksize); ! yyss = yyss1; yyvs = yyvs1; } --- 2709,2732 ---- YYSTYPE *yyvs1 = yyvs; short *yyss1 = yyss; /* Each stack pointer address is followed by the size of the ! data in use in that stack, in bytes. */ ! # if YYLSP_NEEDED ! YYLTYPE *yyls1 = yyls; ! /* This used to be a conditional around just the two extra args, ! but that might be undefined if yyoverflow is a macro. */ yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), ! &yyls1, yysize * sizeof (*yylsp), &yystacksize); ! yyls = yyls1; ! # else ! yyoverflow ("parser stack overflow", ! &yyss1, yysize * sizeof (*yyssp), ! &yyvs1, yysize * sizeof (*yyvsp), ! &yystacksize); ! # endif yyss = yyss1; yyvs = yyvs1; } *************** yyparse () *** 3062,3071 **** goto yyoverflowlab; # else /* Extend the stack our own way. */ ! if (YYMAXDEPTH <= yystacksize) goto yyoverflowlab; yystacksize *= 2; ! if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { --- 2735,2744 ---- goto yyoverflowlab; # else /* Extend the stack our own way. */ ! if (yystacksize >= YYMAXDEPTH) goto yyoverflowlab; yystacksize *= 2; ! if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; { *************** yyparse () *** 3076,3083 **** goto yyoverflowlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); ! ! # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } --- 2749,2758 ---- goto yyoverflowlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); ! # if YYLSP_NEEDED ! YYSTACK_RELOCATE (yyls); ! # endif ! # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } *************** yyparse () *** 3086,3097 **** yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; ! YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); ! if (yyss + yystacksize - 1 <= yyssp) YYABORT; } --- 2761,2774 ---- yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; ! #if YYLSP_NEEDED ! yylsp = yyls + yysize - 1; ! #endif YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); ! if (yyssp >= yyss + yystacksize - 1) YYABORT; } *************** yyparse () *** 3099,3104 **** --- 2776,2782 ---- goto yybackup; + /*-----------. | yybackup. | `-----------*/ *************** yybackup: *** 3111,3165 **** /* 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 lookahead token if don't already have one. */ ! /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } ! if (yychar <= YYEOF) { ! yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { ! yytoken = YYTRANSLATE (yychar); ! YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); } ! /* If the proper action on seeing token YYTOKEN is to reduce or to ! detect an error, take that action. */ ! yyn += yytoken; ! if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; ! if (yyn <= 0) { ! if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ ! YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; ! /* Count tokens shifted since error; after three, turn off error status. */ --- 2789,2876 ---- /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; ! if (yyn == YYFLAG) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ ! /* yychar is either YYEMPTY or YYEOF ! or a valid token in external form. */ ! if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } ! /* Convert token to internal form (in yychar1) for indexing tables with */ ! ! if (yychar <= 0) /* This means end of input. */ { ! yychar1 = 0; ! yychar = YYEOF; /* Don't call YYLEX any more */ ! YYDPRINTF ((stderr, "Now at end of input.\n")); } else { ! yychar1 = YYTRANSLATE (yychar); ! ! #if YYDEBUG ! /* We have to keep this `#if YYDEBUG', since we use variables ! which are defined only if `YYDEBUG' is set. */ ! if (yydebug) ! { ! YYFPRINTF (stderr, "Next token is %d (%s", ! yychar, yytname[yychar1]); ! /* Give the individual parser a way to print the precise ! meaning of a token, for further debugging info. */ ! # ifdef YYPRINT ! YYPRINT (stderr, yychar, yylval); ! # endif ! YYFPRINTF (stderr, ")\n"); ! } ! #endif } ! yyn += yychar1; ! if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; + yyn = yytable[yyn]; ! ! /* yyn is what to do for this token type in this state. ! Negative => reduce, -yyn is rule number. ! Positive => shift, yyn is new state. ! New state is final state => don't bother to shift, ! just return success. ! 0, or most negative number => error. */ ! ! if (yyn < 0) { ! if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } + else if (yyn == 0) + goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; /* Shift the lookahead token. */ ! YYDPRINTF ((stderr, "Shifting token %d (%s), ", ! yychar, yytname[yychar1])); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; ! #if YYLSP_NEEDED ! *++yylsp = yylloc; ! #endif /* Count tokens shifted since error; after three, turn off error status. */ *************** yyreduce: *** 3190,3688 **** /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. ! Otherwise, the following line sets YYVAL to garbage. ! This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; ! YY_REDUCE_PRINT (yyn); ! switch (yyn) { ! case 2: ! #line 308 "objc-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids an empty source file"); finish_file (); ! ;} ! break; ! ! case 3: ! #line 313 "objc-parse.y" ! { /* In case there were missing closebraces, get us back to the global binding level. */ while (! global_bindings_p ()) poplevel (0, 0, 0); finish_file (); ! ;} ! break; ! ! case 4: ! #line 327 "objc-parse.y" ! {yyval.ttype = NULL_TREE; ;} ! break; ! ! case 6: ! #line 328 "objc-parse.y" ! {yyval.ttype = NULL_TREE; ggc_collect(); ;} ! break; ! ! case 11: ! #line 336 "objc-parse.y" ! { STRIP_NOPS (yyvsp[-2].ttype); if ((TREE_CODE (yyvsp[-2].ttype) == ADDR_EXPR && TREE_CODE (TREE_OPERAND (yyvsp[-2].ttype, 0)) == STRING_CST) || TREE_CODE (yyvsp[-2].ttype) == STRING_CST) assemble_asm (yyvsp[-2].ttype); else ! error ("argument of `asm' is not a constant string"); ;} ! break; ! ! case 12: ! #line 344 "objc-parse.y" ! { RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ;} ! break; ! ! case 13: ! #line 349 "objc-parse.y" ! { if (pedantic) error ("ISO C forbids data definition with no type or storage class"); ! else if (!flag_traditional) ! warning ("data definition has no type or storage class"); ! ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 14: ! #line 356 "objc-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 15: ! #line 358 "objc-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 16: ! #line 360 "objc-parse.y" ! { shadow_tag (yyvsp[-1].ttype); ;} ! break; ! ! case 19: ! #line 364 "objc-parse.y" ! { if (pedantic) ! pedwarn ("ISO C does not allow extra `;' outside of a function"); ;} ! break; ! case 20: ! #line 370 "objc-parse.y" ! { if (! start_function (current_declspecs, yyvsp[0].ttype, all_prefix_attributes)) YYERROR1; ! ;} ! break; ! ! case 21: ! #line 375 "objc-parse.y" ! { store_parm_decls (); ;} ! break; ! ! case 22: ! #line 377 "objc-parse.y" ! { DECL_SOURCE_FILE (current_function_decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (current_function_decl) = yyvsp[-1].lineno; ! finish_function (0, 1); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 23: ! #line 382 "objc-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 24: ! #line 384 "objc-parse.y" ! { if (! start_function (current_declspecs, yyvsp[0].ttype, all_prefix_attributes)) YYERROR1; ! ;} ! break; ! ! case 25: ! #line 389 "objc-parse.y" ! { store_parm_decls (); ;} ! break; ! ! case 26: ! #line 391 "objc-parse.y" ! { DECL_SOURCE_FILE (current_function_decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (current_function_decl) = yyvsp[-1].lineno; ! finish_function (0, 1); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 27: ! #line 396 "objc-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 28: ! #line 398 "objc-parse.y" ! { if (! start_function (NULL_TREE, yyvsp[0].ttype, all_prefix_attributes)) YYERROR1; ! ;} ! break; ! ! case 29: ! #line 403 "objc-parse.y" ! { store_parm_decls (); ;} ! break; ! ! case 30: ! #line 405 "objc-parse.y" ! { DECL_SOURCE_FILE (current_function_decl) = yyvsp[-2].filename; ! DECL_SOURCE_LINE (current_function_decl) = yyvsp[-1].lineno; ! finish_function (0, 1); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 31: ! #line 410 "objc-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 36: ! #line 421 "objc-parse.y" ! { yyval.code = ADDR_EXPR; ;} ! break; ! ! case 37: ! #line 423 "objc-parse.y" ! { yyval.code = NEGATE_EXPR; ;} ! break; ! ! case 38: ! #line 425 "objc-parse.y" ! { yyval.code = CONVERT_EXPR; ! ;} ! break; ! ! case 39: ! #line 428 "objc-parse.y" ! { yyval.code = PREINCREMENT_EXPR; ;} ! break; ! ! case 40: ! #line 430 "objc-parse.y" ! { yyval.code = PREDECREMENT_EXPR; ;} ! break; ! ! case 41: ! #line 432 "objc-parse.y" ! { yyval.code = BIT_NOT_EXPR; ;} ! break; ! ! case 42: ! #line 434 "objc-parse.y" ! { yyval.code = TRUTH_NOT_EXPR; ;} ! break; ! ! case 43: ! #line 438 "objc-parse.y" ! { yyval.ttype = build_compound_expr (yyvsp[0].ttype); ;} ! break; ! ! case 44: ! #line 443 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 46: #line 449 "objc-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;} ! break; ! ! case 47: #line 451 "objc-parse.y" ! { chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ;} ! break; ! ! case 49: ! #line 457 "objc-parse.y" ! { yyval.ttype = build_indirect_ref (yyvsp[0].ttype, "unary *"); ;} ! break; ! ! case 50: ! #line 460 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ;} ! break; ! ! case 51: ! #line 463 "objc-parse.y" ! { yyval.ttype = build_unary_op (yyvsp[-1].code, yyvsp[0].ttype, 0); ! overflow_warning (yyval.ttype); ;} ! break; ! ! case 52: #line 467 "objc-parse.y" ! { yyval.ttype = finish_label_address_expr (yyvsp[0].ttype); ;} ! break; ! ! case 53: #line 484 "objc-parse.y" ! { skip_evaluation--; if (TREE_CODE (yyvsp[0].ttype) == COMPONENT_REF && DECL_C_BIT_FIELD (TREE_OPERAND (yyvsp[0].ttype, 1))) error ("`sizeof' applied to a bit-field"); ! yyval.ttype = c_sizeof (TREE_TYPE (yyvsp[0].ttype)); ;} ! break; ! ! case 54: ! #line 490 "objc-parse.y" ! { skip_evaluation--; ! yyval.ttype = c_sizeof (groktypename (yyvsp[-1].ttype)); ;} ! break; ! ! case 55: ! #line 493 "objc-parse.y" ! { skip_evaluation--; ! yyval.ttype = c_alignof_expr (yyvsp[0].ttype); ;} ! break; ! ! case 56: ! #line 496 "objc-parse.y" ! { skip_evaluation--; ! yyval.ttype = c_alignof (groktypename (yyvsp[-1].ttype)); ;} ! break; ! ! case 57: ! #line 499 "objc-parse.y" ! { yyval.ttype = build_unary_op (REALPART_EXPR, yyvsp[0].ttype, 0); ;} ! break; ! ! case 58: ! #line 501 "objc-parse.y" ! { yyval.ttype = build_unary_op (IMAGPART_EXPR, yyvsp[0].ttype, 0); ;} ! break; ! ! case 59: ! #line 505 "objc-parse.y" ! { skip_evaluation++; ;} ! break; ! ! case 60: ! #line 509 "objc-parse.y" ! { skip_evaluation++; ;} ! break; ! ! case 61: ! #line 513 "objc-parse.y" ! { skip_evaluation++; ;} ! break; ! ! case 63: ! #line 519 "objc-parse.y" ! { yyval.ttype = c_cast_expr (yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 65: ! #line 525 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 66: #line 527 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 67: ! #line 529 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 68: ! #line 531 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 69: ! #line 533 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 70: ! #line 535 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 71: ! #line 537 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 72: ! #line 539 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 73: ! #line 541 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 74: ! #line 543 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 75: ! #line 545 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 76: ! #line 547 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 77: ! #line 549 "objc-parse.y" ! { yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); ! skip_evaluation += yyvsp[-1].ttype == boolean_false_node; ;} ! break; ! ! case 78: ! #line 552 "objc-parse.y" ! { skip_evaluation -= yyvsp[-3].ttype == boolean_false_node; ! yyval.ttype = parser_build_binary_op (TRUTH_ANDIF_EXPR, yyvsp[-3].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 79: ! #line 555 "objc-parse.y" ! { yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); ! skip_evaluation += yyvsp[-1].ttype == boolean_true_node; ;} ! break; ! ! case 80: #line 558 "objc-parse.y" ! { skip_evaluation -= yyvsp[-3].ttype == boolean_true_node; ! yyval.ttype = parser_build_binary_op (TRUTH_ORIF_EXPR, yyvsp[-3].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 81: ! #line 561 "objc-parse.y" ! { yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); ! skip_evaluation += yyvsp[-1].ttype == boolean_false_node; ;} ! break; ! ! case 82: #line 564 "objc-parse.y" ! { skip_evaluation += ((yyvsp[-4].ttype == boolean_true_node) ! - (yyvsp[-4].ttype == boolean_false_node)); ;} ! break; ! ! case 83: ! #line 567 "objc-parse.y" ! { skip_evaluation -= yyvsp[-6].ttype == boolean_true_node; ! yyval.ttype = build_conditional_expr (yyvsp[-6].ttype, yyvsp[-3].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 84: #line 570 "objc-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids omitting the middle term of a ?: expression"); /* Make sure first operand is calculated only once. */ yyvsp[0].ttype = save_expr (yyvsp[-1].ttype); ! yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[0].ttype)); ! skip_evaluation += yyvsp[-1].ttype == boolean_true_node; ;} ! break; ! ! case 85: ! #line 577 "objc-parse.y" ! { skip_evaluation -= yyvsp[-4].ttype == boolean_true_node; ! yyval.ttype = build_conditional_expr (yyvsp[-4].ttype, yyvsp[-3].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 86: ! #line 580 "objc-parse.y" ! { char class; yyval.ttype = build_modify_expr (yyvsp[-2].ttype, NOP_EXPR, yyvsp[0].ttype); class = TREE_CODE_CLASS (TREE_CODE (yyval.ttype)); if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE (yyval.ttype, MODIFY_EXPR); ! ;} ! break; ! ! case 87: ! #line 587 "objc-parse.y" ! { char class; yyval.ttype = build_modify_expr (yyvsp[-2].ttype, yyvsp[-1].code, yyvsp[0].ttype); ! /* This inhibits warnings in truthvalue_conversion. */ class = TREE_CODE_CLASS (TREE_CODE (yyval.ttype)); if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE (yyval.ttype, ERROR_MARK); ! ;} ! break; ! ! case 88: ! #line 598 "objc-parse.y" ! { if (yychar == YYEMPTY) yychar = YYLEX; yyval.ttype = build_external_ref (yyvsp[0].ttype, yychar == '('); ! ;} ! break; ! ! case 90: ! #line 605 "objc-parse.y" ! { yyval.ttype = combine_strings (yyvsp[0].ttype); ;} ! break; ! ! case 91: ! #line 607 "objc-parse.y" ! { yyval.ttype = fname_decl (C_RID_CODE (yyval.ttype), yyval.ttype); ;} ! break; ! ! case 92: ! #line 609 "objc-parse.y" ! { start_init (NULL_TREE, NULL, 0); yyvsp[-2].ttype = groktypename (yyvsp[-2].ttype); ! really_start_incremental_init (yyvsp[-2].ttype); ;} ! break; ! ! case 93: ! #line 613 "objc-parse.y" ! { tree constructor = pop_init_level (0); tree type = yyvsp[-5].ttype; finish_init (); if (pedantic && ! flag_isoc99) pedwarn ("ISO C89 forbids compound literals"); yyval.ttype = build_compound_literal (type, constructor); ! ;} ! break; ! ! case 94: ! #line 622 "objc-parse.y" ! { char class = TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)); if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE (yyvsp[-1].ttype, ERROR_MARK); ! yyval.ttype = yyvsp[-1].ttype; ;} ! break; ! ! case 95: ! #line 627 "objc-parse.y" ! { yyval.ttype = error_mark_node; ;} ! break; ! ! case 96: ! #line 629 "objc-parse.y" ! { tree saved_last_tree; if (pedantic) pedwarn ("ISO C forbids braced-groups within expressions"); --- 2901,3356 ---- /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. ! Otherwise, the following line sets YYVAL to the semantic value of ! the lookahead token. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; + #if YYLSP_NEEDED + /* Similarly for the default location. Let the user run additional + commands if for instance locations are ranges. */ + yyloc = yylsp[1-yylen]; + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + #endif ! #if YYDEBUG ! /* We have to keep this `#if YYDEBUG', since we use variables which ! are defined only if `YYDEBUG' is set. */ ! if (yydebug) { ! int yyi; ! ! YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", ! yyn, yyrline[yyn]); ! ! /* Print the symbols being reduced, and their result. */ ! for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) ! YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); ! YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); ! } ! #endif ! ! switch (yyn) { ! ! case 1: ! #line 345 "objc-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids an empty source file"); finish_file (); ! ; ! break;} ! case 2: ! #line 350 "objc-parse.y" ! { /* In case there were missing closebraces, get us back to the global binding level. */ while (! global_bindings_p ()) poplevel (0, 0, 0); + /* __FUNCTION__ is defined at file scope (""). This + call may not be necessary as my tests indicate it + still works without it. */ + finish_fname_decls (); finish_file (); ! ; ! break;} ! case 3: ! #line 368 "objc-parse.y" ! {yyval.ttype = NULL_TREE; ; ! break;} ! case 5: ! #line 369 "objc-parse.y" ! {yyval.ttype = NULL_TREE; ggc_collect(); ; ! break;} ! case 7: ! #line 374 "objc-parse.y" ! { parsing_iso_function_signature = false; ; ! break;} ! case 11: ! #line 382 "objc-parse.y" ! { STRIP_NOPS (yyvsp[-2].ttype); if ((TREE_CODE (yyvsp[-2].ttype) == ADDR_EXPR && TREE_CODE (TREE_OPERAND (yyvsp[-2].ttype, 0)) == STRING_CST) || TREE_CODE (yyvsp[-2].ttype) == STRING_CST) assemble_asm (yyvsp[-2].ttype); else ! error ("argument of `asm' is not a constant string"); ; ! break;} ! case 12: ! #line 390 "objc-parse.y" ! { RESTORE_EXT_FLAGS (yyvsp[-1].ttype); ; ! break;} ! case 13: ! #line 395 "objc-parse.y" ! { if (pedantic) error ("ISO C forbids data definition with no type or storage class"); ! else ! warning ("data definition has no type or storage class"); ! POP_DECLSPEC_STACK; ; ! break;} ! case 14: ! #line 402 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 15: ! #line 404 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 16: ! #line 406 "objc-parse.y" ! { shadow_tag (yyvsp[-1].ttype); ; ! break;} ! case 19: ! #line 410 "objc-parse.y" ! { if (pedantic) ! pedwarn ("ISO C does not allow extra `;' outside of a function"); ; ! break;} ! case 20: ! #line 416 "objc-parse.y" ! { if (! start_function (current_declspecs, yyvsp[0].ttype, all_prefix_attributes)) YYERROR1; ! ; ! break;} ! case 21: ! #line 421 "objc-parse.y" ! { store_parm_decls (); ; ! break;} ! case 22: ! #line 423 "objc-parse.y" ! { DECL_SOURCE_FILE (current_function_decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (current_function_decl) = yyvsp[-1].lineno; ! finish_function (0, 1); ! POP_DECLSPEC_STACK; ; ! break;} ! case 23: ! #line 428 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 24: ! #line 430 "objc-parse.y" ! { if (! start_function (current_declspecs, yyvsp[0].ttype, all_prefix_attributes)) YYERROR1; ! ; ! break;} ! case 25: ! #line 435 "objc-parse.y" ! { store_parm_decls (); ; ! break;} ! case 26: ! #line 437 "objc-parse.y" ! { DECL_SOURCE_FILE (current_function_decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (current_function_decl) = yyvsp[-1].lineno; ! finish_function (0, 1); ! POP_DECLSPEC_STACK; ; ! break;} ! case 27: ! #line 442 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 28: ! #line 444 "objc-parse.y" ! { if (! start_function (NULL_TREE, yyvsp[0].ttype, all_prefix_attributes)) YYERROR1; ! ; ! break;} ! case 29: #line 449 "objc-parse.y" ! { store_parm_decls (); ; ! break;} ! case 30: #line 451 "objc-parse.y" ! { DECL_SOURCE_FILE (current_function_decl) = yyvsp[-2].filename; ! DECL_SOURCE_LINE (current_function_decl) = yyvsp[-1].lineno; ! finish_function (0, 1); ! POP_DECLSPEC_STACK; ; ! break;} ! case 31: ! #line 456 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 36: #line 467 "objc-parse.y" ! { yyval.code = ADDR_EXPR; ; ! break;} ! case 37: ! #line 469 "objc-parse.y" ! { yyval.code = NEGATE_EXPR; ; ! break;} ! case 38: ! #line 471 "objc-parse.y" ! { yyval.code = CONVERT_EXPR; ! ; ! break;} ! case 39: ! #line 474 "objc-parse.y" ! { yyval.code = PREINCREMENT_EXPR; ; ! break;} ! case 40: ! #line 476 "objc-parse.y" ! { yyval.code = PREDECREMENT_EXPR; ; ! break;} ! case 41: ! #line 478 "objc-parse.y" ! { yyval.code = BIT_NOT_EXPR; ; ! break;} ! case 42: ! #line 480 "objc-parse.y" ! { yyval.code = TRUTH_NOT_EXPR; ; ! break;} ! case 43: #line 484 "objc-parse.y" ! { yyval.ttype = build_compound_expr (yyvsp[0].ttype); ; ! break;} ! case 44: ! #line 489 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 46: ! #line 495 "objc-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; ! break;} ! case 47: ! #line 497 "objc-parse.y" ! { chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; ! break;} ! case 49: ! #line 503 "objc-parse.y" ! { yyval.ttype = build_indirect_ref (yyvsp[0].ttype, "unary *"); ; ! break;} ! case 50: ! #line 506 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! RESTORE_EXT_FLAGS (yyvsp[-1].ttype); ; ! break;} ! case 51: ! #line 509 "objc-parse.y" ! { yyval.ttype = build_unary_op (yyvsp[-1].code, yyvsp[0].ttype, 0); ! overflow_warning (yyval.ttype); ; ! break;} ! case 52: ! #line 513 "objc-parse.y" ! { yyval.ttype = finish_label_address_expr (yyvsp[0].ttype); ; ! break;} ! case 53: ! #line 515 "objc-parse.y" ! { skip_evaluation--; if (TREE_CODE (yyvsp[0].ttype) == COMPONENT_REF && DECL_C_BIT_FIELD (TREE_OPERAND (yyvsp[0].ttype, 1))) error ("`sizeof' applied to a bit-field"); ! yyval.ttype = c_sizeof (TREE_TYPE (yyvsp[0].ttype)); ; ! break;} ! case 54: ! #line 521 "objc-parse.y" ! { skip_evaluation--; ! yyval.ttype = c_sizeof (groktypename (yyvsp[-1].ttype)); ; ! break;} ! case 55: ! #line 524 "objc-parse.y" ! { skip_evaluation--; ! yyval.ttype = c_alignof_expr (yyvsp[0].ttype); ; ! break;} ! case 56: #line 527 "objc-parse.y" ! { skip_evaluation--; ! yyval.ttype = c_alignof (groktypename (yyvsp[-1].ttype)); ; ! break;} ! case 57: ! #line 530 "objc-parse.y" ! { yyval.ttype = build_unary_op (REALPART_EXPR, yyvsp[0].ttype, 0); ; ! break;} ! case 58: ! #line 532 "objc-parse.y" ! { yyval.ttype = build_unary_op (IMAGPART_EXPR, yyvsp[0].ttype, 0); ; ! break;} ! case 59: ! #line 536 "objc-parse.y" ! { skip_evaluation++; ; ! break;} ! case 60: ! #line 540 "objc-parse.y" ! { skip_evaluation++; ; ! break;} ! case 61: ! #line 544 "objc-parse.y" ! { skip_evaluation++; ; ! break;} ! case 63: ! #line 550 "objc-parse.y" ! { yyval.ttype = c_cast_expr (yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 65: ! #line 556 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 66: #line 558 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 67: ! #line 560 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 68: ! #line 562 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 69: #line 564 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 70: ! #line 566 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 71: ! #line 568 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 72: #line 570 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 73: ! #line 572 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 74: ! #line 574 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 75: ! #line 576 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 76: ! #line 578 "objc-parse.y" ! { yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 77: ! #line 580 "objc-parse.y" ! { yyvsp[-1].ttype = c_common_truthvalue_conversion ! (default_conversion (yyvsp[-1].ttype)); ! skip_evaluation += yyvsp[-1].ttype == boolean_false_node; ; ! break;} ! case 78: ! #line 584 "objc-parse.y" ! { skip_evaluation -= yyvsp[-3].ttype == boolean_false_node; ! yyval.ttype = parser_build_binary_op (TRUTH_ANDIF_EXPR, yyvsp[-3].ttype, yyvsp[0].ttype); ; ! break;} ! case 79: ! #line 587 "objc-parse.y" ! { yyvsp[-1].ttype = c_common_truthvalue_conversion ! (default_conversion (yyvsp[-1].ttype)); ! skip_evaluation += yyvsp[-1].ttype == boolean_true_node; ; ! break;} ! case 80: ! #line 591 "objc-parse.y" ! { skip_evaluation -= yyvsp[-3].ttype == boolean_true_node; ! yyval.ttype = parser_build_binary_op (TRUTH_ORIF_EXPR, yyvsp[-3].ttype, yyvsp[0].ttype); ; ! break;} ! case 81: ! #line 594 "objc-parse.y" ! { yyvsp[-1].ttype = c_common_truthvalue_conversion ! (default_conversion (yyvsp[-1].ttype)); ! skip_evaluation += yyvsp[-1].ttype == boolean_false_node; ; ! break;} ! case 82: ! #line 598 "objc-parse.y" ! { skip_evaluation += ((yyvsp[-4].ttype == boolean_true_node) ! - (yyvsp[-4].ttype == boolean_false_node)); ; ! break;} ! case 83: ! #line 601 "objc-parse.y" ! { skip_evaluation -= yyvsp[-6].ttype == boolean_true_node; ! yyval.ttype = build_conditional_expr (yyvsp[-6].ttype, yyvsp[-3].ttype, yyvsp[0].ttype); ; ! break;} ! case 84: ! #line 604 "objc-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids omitting the middle term of a ?: expression"); /* Make sure first operand is calculated only once. */ yyvsp[0].ttype = save_expr (yyvsp[-1].ttype); ! yyvsp[-1].ttype = c_common_truthvalue_conversion ! (default_conversion (yyvsp[0].ttype)); ! skip_evaluation += yyvsp[-1].ttype == boolean_true_node; ; ! break;} ! case 85: ! #line 612 "objc-parse.y" ! { skip_evaluation -= yyvsp[-4].ttype == boolean_true_node; ! yyval.ttype = build_conditional_expr (yyvsp[-4].ttype, yyvsp[-3].ttype, yyvsp[0].ttype); ; ! break;} ! case 86: ! #line 615 "objc-parse.y" ! { char class; yyval.ttype = build_modify_expr (yyvsp[-2].ttype, NOP_EXPR, yyvsp[0].ttype); class = TREE_CODE_CLASS (TREE_CODE (yyval.ttype)); if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE (yyval.ttype, MODIFY_EXPR); ! ; ! break;} ! case 87: ! #line 622 "objc-parse.y" ! { char class; yyval.ttype = build_modify_expr (yyvsp[-2].ttype, yyvsp[-1].code, yyvsp[0].ttype); ! /* This inhibits warnings in ! c_common_truthvalue_conversion. */ class = TREE_CODE_CLASS (TREE_CODE (yyval.ttype)); if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE (yyval.ttype, ERROR_MARK); ! ; ! break;} ! case 88: ! #line 634 "objc-parse.y" ! { if (yychar == YYEMPTY) yychar = YYLEX; yyval.ttype = build_external_ref (yyvsp[0].ttype, yychar == '('); ! ; ! break;} ! case 90: ! #line 641 "objc-parse.y" ! { yyval.ttype = fix_string_type (yyval.ttype); ; ! break;} ! case 91: ! #line 643 "objc-parse.y" ! { yyval.ttype = fname_decl (C_RID_CODE (yyval.ttype), yyval.ttype); ; ! break;} ! case 92: ! #line 645 "objc-parse.y" ! { start_init (NULL_TREE, NULL, 0); yyvsp[-2].ttype = groktypename (yyvsp[-2].ttype); ! really_start_incremental_init (yyvsp[-2].ttype); ; ! break;} ! case 93: ! #line 649 "objc-parse.y" ! { tree constructor = pop_init_level (0); tree type = yyvsp[-5].ttype; finish_init (); if (pedantic && ! flag_isoc99) pedwarn ("ISO C89 forbids compound literals"); yyval.ttype = build_compound_literal (type, constructor); ! ; ! break;} ! case 94: ! #line 658 "objc-parse.y" ! { char class = TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)); if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE (yyvsp[-1].ttype, ERROR_MARK); ! yyval.ttype = yyvsp[-1].ttype; ; ! break;} ! case 95: ! #line 663 "objc-parse.y" ! { yyval.ttype = error_mark_node; ; ! break;} ! case 96: ! #line 665 "objc-parse.y" ! { tree saved_last_tree; if (pedantic) pedwarn ("ISO C forbids braced-groups within expressions"); *************** yyreduce: *** 3696,3727 **** last_expr_type = void_type_node; yyval.ttype = build1 (STMT_EXPR, last_expr_type, yyvsp[-2].ttype); TREE_SIDE_EFFECTS (yyval.ttype) = 1; ! ;} ! break; ! ! case 97: ! #line 645 "objc-parse.y" ! { pop_label_level (); last_tree = COMPOUND_BODY (yyvsp[-2].ttype); TREE_CHAIN (last_tree) = NULL_TREE; yyval.ttype = error_mark_node; ! ;} ! break; ! ! case 98: ! #line 652 "objc-parse.y" ! { yyval.ttype = build_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype); ;} ! break; ! ! case 99: ! #line 654 "objc-parse.y" ! { yyval.ttype = build_va_arg (yyvsp[-3].ttype, groktypename (yyvsp[-1].ttype)); ;} ! break; ! ! case 100: ! #line 657 "objc-parse.y" ! { tree c; c = fold (yyvsp[-5].ttype); --- 3364,3391 ---- last_expr_type = void_type_node; yyval.ttype = build1 (STMT_EXPR, last_expr_type, yyvsp[-2].ttype); TREE_SIDE_EFFECTS (yyval.ttype) = 1; ! ; ! break;} ! case 97: ! #line 681 "objc-parse.y" ! { pop_label_level (); last_tree = COMPOUND_BODY (yyvsp[-2].ttype); TREE_CHAIN (last_tree) = NULL_TREE; yyval.ttype = error_mark_node; ! ; ! break;} ! case 98: ! #line 688 "objc-parse.y" ! { yyval.ttype = build_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype); ; ! break;} ! case 99: ! #line 690 "objc-parse.y" ! { yyval.ttype = build_va_arg (yyvsp[-3].ttype, groktypename (yyvsp[-1].ttype)); ; ! break;} ! case 100: ! #line 693 "objc-parse.y" ! { tree c; c = fold (yyvsp[-5].ttype); *************** yyreduce: *** 3729,3740 **** if (TREE_CODE (c) != INTEGER_CST) error ("first argument to __builtin_choose_expr not a constant"); yyval.ttype = integer_zerop (c) ? yyvsp[-1].ttype : yyvsp[-3].ttype; ! ;} ! break; ! ! case 101: ! #line 667 "objc-parse.y" ! { tree e1, e2; e1 = TYPE_MAIN_VARIANT (groktypename (yyvsp[-3].ttype)); --- 3393,3403 ---- if (TREE_CODE (c) != INTEGER_CST) error ("first argument to __builtin_choose_expr not a constant"); yyval.ttype = integer_zerop (c) ? yyvsp[-1].ttype : yyvsp[-3].ttype; ! ; ! break;} ! case 101: ! #line 703 "objc-parse.y" ! { tree e1, e2; e1 = TYPE_MAIN_VARIANT (groktypename (yyvsp[-3].ttype)); *************** yyreduce: *** 3742,4649 **** yyval.ttype = comptypes (e1, e2) ? build_int_2 (1, 0) : build_int_2 (0, 0); ! ;} ! break; ! ! case 102: ! #line 677 "objc-parse.y" ! { yyval.ttype = build_array_ref (yyvsp[-3].ttype, yyvsp[-1].ttype); ;} ! break; ! ! case 103: ! #line 679 "objc-parse.y" ! { if (!is_public (yyvsp[-2].ttype, yyvsp[0].ttype)) yyval.ttype = error_mark_node; else yyval.ttype = build_component_ref (yyvsp[-2].ttype, yyvsp[0].ttype); ! ;} ! break; ! ! case 104: ! #line 686 "objc-parse.y" ! { tree expr = build_indirect_ref (yyvsp[-2].ttype, "->"); if (!is_public (expr, yyvsp[0].ttype)) yyval.ttype = error_mark_node; else yyval.ttype = build_component_ref (expr, yyvsp[0].ttype); ! ;} ! break; ! ! case 105: ! #line 695 "objc-parse.y" ! { yyval.ttype = build_unary_op (POSTINCREMENT_EXPR, yyvsp[-1].ttype, 0); ;} ! break; ! ! case 106: ! #line 697 "objc-parse.y" ! { yyval.ttype = build_unary_op (POSTDECREMENT_EXPR, yyvsp[-1].ttype, 0); ;} ! break; ! ! case 107: ! #line 699 "objc-parse.y" ! { yyval.ttype = build_message_expr (yyvsp[0].ttype); ;} ! break; ! ! case 108: ! #line 701 "objc-parse.y" ! { yyval.ttype = build_selector_expr (yyvsp[0].ttype); ;} ! break; ! ! case 109: ! #line 703 "objc-parse.y" ! { yyval.ttype = build_protocol_expr (yyvsp[0].ttype); ;} ! break; ! ! case 110: ! #line 705 "objc-parse.y" ! { yyval.ttype = build_encode_expr (yyvsp[0].ttype); ;} ! break; ! ! case 111: ! #line 707 "objc-parse.y" ! { yyval.ttype = build_objc_string_object (yyvsp[0].ttype); ;} ! break; ! ! case 113: ! #line 714 "objc-parse.y" ! { ! yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ! ;} ! break; ! ! case 114: ! #line 723 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 115: ! #line 725 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 118: #line 733 "objc-parse.y" ! { c_mark_varargs (); ! if (pedantic) ! pedwarn ("ISO C does not permit use of `varargs.h'"); ;} ! break; ! ! case 119: #line 743 "objc-parse.y" ! { ;} ! break; ! ! case 124: ! #line 759 "objc-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 125: ! #line 761 "objc-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 126: ! #line 763 "objc-parse.y" ! { shadow_tag_warned (yyvsp[-1].ttype, 1); ! pedwarn ("empty declaration"); ;} ! break; ! ! case 127: ! #line 766 "objc-parse.y" ! { pedwarn ("empty declaration"); ;} ! break; ! ! case 128: ! #line 775 "objc-parse.y" ! { ;} ! break; ! ! case 129: ! #line 783 "objc-parse.y" ! { pending_xref_error (); PUSH_DECLSPEC_STACK; split_specs_attrs (yyvsp[0].ttype, ¤t_declspecs, &prefix_attributes); ! all_prefix_attributes = prefix_attributes; ;} ! break; ! ! case 130: ! #line 794 "objc-parse.y" ! { all_prefix_attributes = chainon (yyvsp[0].ttype, prefix_attributes); ;} ! break; ! ! case 131: ! #line 799 "objc-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 132: ! #line 801 "objc-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 133: ! #line 803 "objc-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 134: ! #line 805 "objc-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 135: ! #line 807 "objc-parse.y" ! { shadow_tag (yyvsp[-1].ttype); ;} ! break; ! ! case 136: ! #line 809 "objc-parse.y" ! { RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ;} ! break; ! ! case 137: ! #line 866 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 138: ! #line 869 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 139: ! #line 872 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 140: ! #line 878 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 141: ! #line 884 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 142: ! #line 887 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 143: ! #line 893 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 0; ;} ! break; ! ! case 144: ! #line 896 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 145: ! #line 902 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 146: ! #line 905 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 147: ! #line 908 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 148: ! #line 911 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 149: ! #line 914 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 150: ! #line 917 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 151: ! #line 920 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 152: ! #line 926 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 153: ! #line 929 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 154: ! #line 932 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 155: ! #line 935 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 156: ! #line 938 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 157: ! #line 941 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 158: ! #line 947 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 159: ! #line 950 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 160: ! #line 953 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 161: ! #line 956 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 162: ! #line 959 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 163: ! #line 962 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 164: ! #line 968 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 165: ! #line 971 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 166: ! #line 974 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 167: ! #line 977 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 168: ! #line 980 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 169: ! #line 986 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 0; ;} ! break; ! ! case 170: ! #line 989 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 171: ! #line 992 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 172: ! #line 995 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 173: ! #line 1001 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 174: ! #line 1007 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 175: ! #line 1013 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 176: ! #line 1022 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 177: ! #line 1028 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 178: ! #line 1031 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 179: ! #line 1034 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 180: ! #line 1040 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 181: ! #line 1046 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 182: ! #line 1052 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 183: ! #line 1061 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 184: ! #line 1067 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 185: ! #line 1070 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 186: ! #line 1073 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 187: ! #line 1076 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 188: ! #line 1079 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 189: ! #line 1082 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 190: ! #line 1085 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 191: ! #line 1091 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 192: ! #line 1097 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 193: ! #line 1103 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 194: ! #line 1112 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 195: ! #line 1115 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 196: ! #line 1118 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 197: ! #line 1121 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 198: ! #line 1124 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 199: ! #line 1130 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 200: ! #line 1133 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 201: ! #line 1136 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 202: ! #line 1139 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 203: ! #line 1142 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 204: ! #line 1145 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 205: ! #line 1148 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 206: ! #line 1154 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 207: ! #line 1160 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 208: ! #line 1166 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 209: ! #line 1175 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;} ! break; ! ! case 210: ! #line 1178 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 211: ! #line 1181 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 212: ! #line 1184 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 213: ! #line 1187 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ;} ! break; ! ! case 270: ! #line 1275 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 271: ! #line 1277 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 275: #line 1312 "objc-parse.y" ! { OBJC_NEED_RAW_IDENTIFIER (1); ;} ! break; ! ! case 278: ! #line 1322 "objc-parse.y" ! { /* For a typedef name, record the meaning, not the name. In case of `foo foo, bar;'. */ ! yyval.ttype = lookup_name (yyvsp[0].ttype); ;} ! break; ! ! case 279: ! #line 1326 "objc-parse.y" ! { yyval.ttype = get_static_reference (yyvsp[-1].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 280: ! #line 1328 "objc-parse.y" ! { yyval.ttype = get_object_reference (yyvsp[0].ttype); ;} ! break; ! ! case 281: ! #line 1333 "objc-parse.y" ! { yyval.ttype = get_object_reference (yyvsp[0].ttype); ;} ! break; ! ! case 282: ! #line 1335 "objc-parse.y" ! { skip_evaluation--; yyval.ttype = TREE_TYPE (yyvsp[-1].ttype); ;} ! break; ! ! case 283: ! #line 1337 "objc-parse.y" ! { skip_evaluation--; yyval.ttype = groktypename (yyvsp[-1].ttype); ;} ! break; ! ! case 288: ! #line 1354 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 289: ! #line 1356 "objc-parse.y" ! { if (TREE_CHAIN (yyvsp[-1].ttype)) yyvsp[-1].ttype = combine_strings (yyvsp[-1].ttype); ! yyval.ttype = yyvsp[-1].ttype; ! ;} ! break; ! ! case 290: #line 1363 "objc-parse.y" ! { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1, ! chainon (yyvsp[-1].ttype, all_prefix_attributes)); ! start_init (yyval.ttype, yyvsp[-2].ttype, global_bindings_p ()); ;} ! break; ! ! case 291: #line 1368 "objc-parse.y" ! { finish_init (); ! finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ;} ! break; ! ! case 292: ! #line 1371 "objc-parse.y" ! { tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0, chainon (yyvsp[0].ttype, all_prefix_attributes)); ! finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ! ;} ! break; ! ! case 293: ! #line 1379 "objc-parse.y" ! { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1, chainon (yyvsp[-1].ttype, all_prefix_attributes)); ! start_init (yyval.ttype, yyvsp[-2].ttype, global_bindings_p ()); ;} ! break; ! ! case 294: ! #line 1384 "objc-parse.y" ! { finish_init (); ! finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ;} ! break; ! ! case 295: ! #line 1387 "objc-parse.y" ! { tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0, chainon (yyvsp[0].ttype, all_prefix_attributes)); ! finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ;} ! break; ! ! case 296: ! #line 1395 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 297: ! #line 1397 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 298: ! #line 1402 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 299: ! #line 1404 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 300: ! #line 1409 "objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype; ;} ! break; ! ! case 301: ! #line 1414 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 302: ! #line 1416 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 303: ! #line 1421 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 304: ! #line 1423 "objc-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); ;} ! break; ! ! case 305: ! #line 1425 "objc-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-3].ttype, build_tree_list (NULL_TREE, yyvsp[-1].ttype)); ;} ! break; ! ! case 306: ! #line 1427 "objc-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-5].ttype, tree_cons (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype)); ;} ! break; ! ! case 307: ! #line 1429 "objc-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ;} ! break; ! ! case 313: #line 1447 "objc-parse.y" ! { really_start_incremental_init (NULL_TREE); ;} ! break; ! ! case 314: #line 1449 "objc-parse.y" ! { yyval.ttype = pop_init_level (0); ;} ! break; ! ! case 315: ! #line 1451 "objc-parse.y" ! { yyval.ttype = error_mark_node; ;} ! break; ! ! case 316: ! #line 1457 "objc-parse.y" ! { if (pedantic) ! pedwarn ("ISO C forbids empty initializer braces"); ;} ! break; ! ! case 320: ! #line 1471 "objc-parse.y" ! { if (pedantic && ! flag_isoc99) ! pedwarn ("ISO C89 forbids specifying subobject to initialize"); ;} ! break; ! ! case 321: ! #line 1474 "objc-parse.y" ! { if (pedantic) ! pedwarn ("obsolete use of designated initializer without `='"); ;} ! break; ! ! case 322: ! #line 1477 "objc-parse.y" ! { set_init_label (yyvsp[-1].ttype); ! if (pedantic) ! pedwarn ("obsolete use of designated initializer with `:'"); ;} ! break; ! ! case 323: ! #line 1481 "objc-parse.y" ! {;} ! break; ! ! case 325: #line 1487 "objc-parse.y" ! { push_init_level (0); ;} ! break; ! ! case 326: #line 1489 "objc-parse.y" ! { process_init_element (pop_init_level (0)); ;} ! break; ! ! case 327: ! #line 1491 "objc-parse.y" ! { process_init_element (yyvsp[0].ttype); ;} ! break; ! ! case 331: ! #line 1502 "objc-parse.y" ! { set_init_label (yyvsp[0].ttype); ;} ! break; ! ! case 332: ! #line 1510 "objc-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids nested functions"); push_function_context (); --- 3405,4176 ---- yyval.ttype = comptypes (e1, e2) ? build_int_2 (1, 0) : build_int_2 (0, 0); ! ; ! break;} ! case 102: ! #line 713 "objc-parse.y" ! { yyval.ttype = build_array_ref (yyvsp[-3].ttype, yyvsp[-1].ttype); ; ! break;} ! case 103: ! #line 715 "objc-parse.y" ! { if (!is_public (yyvsp[-2].ttype, yyvsp[0].ttype)) yyval.ttype = error_mark_node; else yyval.ttype = build_component_ref (yyvsp[-2].ttype, yyvsp[0].ttype); ! ; ! break;} ! case 104: ! #line 722 "objc-parse.y" ! { tree expr = build_indirect_ref (yyvsp[-2].ttype, "->"); if (!is_public (expr, yyvsp[0].ttype)) yyval.ttype = error_mark_node; else yyval.ttype = build_component_ref (expr, yyvsp[0].ttype); ! ; ! break;} ! case 105: ! #line 731 "objc-parse.y" ! { yyval.ttype = build_unary_op (POSTINCREMENT_EXPR, yyvsp[-1].ttype, 0); ; ! break;} ! case 106: #line 733 "objc-parse.y" ! { yyval.ttype = build_unary_op (POSTDECREMENT_EXPR, yyvsp[-1].ttype, 0); ; ! break;} ! case 107: ! #line 735 "objc-parse.y" ! { yyval.ttype = build_message_expr (yyvsp[0].ttype); ; ! break;} ! case 108: ! #line 737 "objc-parse.y" ! { yyval.ttype = build_selector_expr (yyvsp[0].ttype); ; ! break;} ! case 109: ! #line 739 "objc-parse.y" ! { yyval.ttype = build_protocol_expr (yyvsp[0].ttype); ; ! break;} ! case 110: ! #line 741 "objc-parse.y" ! { yyval.ttype = build_encode_expr (yyvsp[0].ttype); ; ! break;} ! case 111: #line 743 "objc-parse.y" ! { yyval.ttype = build_objc_string_object (yyvsp[0].ttype); ; ! break;} ! case 112: ! #line 750 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 113: ! #line 752 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 114: ! #line 757 "objc-parse.y" ! { ! parsing_iso_function_signature = false; /* Reset after decls. */ ! ; ! break;} ! case 115: ! #line 764 "objc-parse.y" ! { ! if (warn_traditional && !in_system_header ! && parsing_iso_function_signature) ! warning ("traditional C rejects ISO C style function definitions"); ! parsing_iso_function_signature = false; /* Reset after warning. */ ! ; ! break;} ! case 117: ! #line 778 "objc-parse.y" ! { ; ! break;} ! case 122: ! #line 794 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 123: ! #line 796 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 124: ! #line 798 "objc-parse.y" ! { shadow_tag_warned (yyvsp[-1].ttype, 1); ! pedwarn ("empty declaration"); ; ! break;} ! case 125: ! #line 801 "objc-parse.y" ! { pedwarn ("empty declaration"); ; ! break;} ! case 126: ! #line 810 "objc-parse.y" ! { ; ! break;} ! case 127: ! #line 818 "objc-parse.y" ! { pending_xref_error (); PUSH_DECLSPEC_STACK; split_specs_attrs (yyvsp[0].ttype, ¤t_declspecs, &prefix_attributes); ! all_prefix_attributes = prefix_attributes; ; ! break;} ! case 128: ! #line 829 "objc-parse.y" ! { all_prefix_attributes = chainon (yyvsp[0].ttype, prefix_attributes); ; ! break;} ! case 129: ! #line 834 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 130: ! #line 836 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 131: ! #line 838 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 132: ! #line 840 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 133: ! #line 842 "objc-parse.y" ! { shadow_tag (yyvsp[-1].ttype); ; ! break;} ! case 134: ! #line 844 "objc-parse.y" ! { RESTORE_EXT_FLAGS (yyvsp[-1].ttype); ; ! break;} ! case 135: ! #line 901 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 136: ! #line 904 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 137: ! #line 907 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 138: ! #line 913 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 139: ! #line 919 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 140: ! #line 922 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 141: ! #line 928 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 0; ; ! break;} ! case 142: ! #line 931 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 143: ! #line 937 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 144: ! #line 940 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 145: ! #line 943 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 146: ! #line 946 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 147: ! #line 949 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 148: ! #line 952 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 149: ! #line 955 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 150: ! #line 961 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 151: ! #line 964 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 152: ! #line 967 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 153: ! #line 970 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 154: ! #line 973 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 155: ! #line 976 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 156: ! #line 982 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 157: ! #line 985 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 158: ! #line 988 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 159: ! #line 991 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 160: ! #line 994 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 161: ! #line 997 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 162: ! #line 1003 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 163: ! #line 1006 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 164: ! #line 1009 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 165: ! #line 1012 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 166: ! #line 1015 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 167: ! #line 1021 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! TREE_STATIC (yyval.ttype) = 0; ; ! break;} ! case 168: ! #line 1024 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 169: ! #line 1027 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 170: ! #line 1030 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 171: ! #line 1036 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 172: ! #line 1042 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 173: ! #line 1048 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 174: ! #line 1057 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 175: ! #line 1063 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 176: ! #line 1066 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 177: ! #line 1069 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 178: ! #line 1075 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 179: ! #line 1081 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 180: ! #line 1087 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 181: ! #line 1096 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 182: ! #line 1102 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 183: ! #line 1105 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 184: ! #line 1108 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 185: ! #line 1111 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 186: ! #line 1114 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 187: ! #line 1117 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 188: ! #line 1120 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 189: ! #line 1126 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 190: ! #line 1132 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 191: ! #line 1138 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 192: ! #line 1147 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 193: ! #line 1150 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 194: ! #line 1153 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 195: ! #line 1156 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 196: ! #line 1159 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 197: ! #line 1165 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 198: ! #line 1168 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 199: ! #line 1171 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 200: ! #line 1174 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 201: ! #line 1177 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 202: ! #line 1180 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 203: ! #line 1183 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 204: ! #line 1189 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 205: ! #line 1195 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 206: ! #line 1201 "objc-parse.y" ! { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 207: ! #line 1210 "objc-parse.y" ! { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; ! break;} ! case 208: ! #line 1213 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 209: ! #line 1216 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 210: ! #line 1219 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 211: ! #line 1222 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ! TREE_STATIC (yyval.ttype) = 1; ; ! break;} ! case 268: ! #line 1310 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 269: #line 1312 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 273: ! #line 1347 "objc-parse.y" ! { OBJC_NEED_RAW_IDENTIFIER (1); ; ! break;} ! case 276: ! #line 1357 "objc-parse.y" ! { /* For a typedef name, record the meaning, not the name. In case of `foo foo, bar;'. */ ! yyval.ttype = lookup_name (yyvsp[0].ttype); ; ! break;} ! case 277: ! #line 1361 "objc-parse.y" ! { yyval.ttype = get_static_reference (yyvsp[-1].ttype, yyvsp[0].ttype); ; ! break;} ! case 278: #line 1363 "objc-parse.y" ! { yyval.ttype = get_object_reference (yyvsp[0].ttype); ; ! break;} ! case 279: #line 1368 "objc-parse.y" ! { yyval.ttype = get_object_reference (yyvsp[0].ttype); ; ! break;} ! case 280: ! #line 1370 "objc-parse.y" ! { skip_evaluation--; yyval.ttype = TREE_TYPE (yyvsp[-1].ttype); ; ! break;} ! case 281: ! #line 1372 "objc-parse.y" ! { skip_evaluation--; yyval.ttype = groktypename (yyvsp[-1].ttype); ; ! break;} ! case 286: ! #line 1389 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 287: ! #line 1391 "objc-parse.y" ! { yyval.ttype = yyvsp[-1].ttype; ; ! break;} ! case 288: ! #line 1396 "objc-parse.y" ! { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1, ! chainon (yyvsp[-1].ttype, all_prefix_attributes)); ! start_init (yyval.ttype, yyvsp[-2].ttype, global_bindings_p ()); ; ! break;} ! case 289: ! #line 1401 "objc-parse.y" ! { finish_init (); ! finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; ! break;} ! case 290: ! #line 1404 "objc-parse.y" ! { tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0, chainon (yyvsp[0].ttype, all_prefix_attributes)); ! finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ! ; ! break;} ! case 291: ! #line 1412 "objc-parse.y" ! { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1, chainon (yyvsp[-1].ttype, all_prefix_attributes)); ! start_init (yyval.ttype, yyvsp[-2].ttype, global_bindings_p ()); ; ! break;} ! case 292: ! #line 1417 "objc-parse.y" ! { finish_init (); ! finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; ! break;} ! case 293: ! #line 1420 "objc-parse.y" ! { tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0, chainon (yyvsp[0].ttype, all_prefix_attributes)); ! finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ; ! break;} ! case 294: ! #line 1428 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 295: ! #line 1430 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 296: ! #line 1435 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 297: ! #line 1437 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; ! break;} ! case 298: ! #line 1442 "objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype; ; ! break;} ! case 299: #line 1447 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 300: #line 1449 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 301: ! #line 1454 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 302: ! #line 1456 "objc-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 303: ! #line 1458 "objc-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-3].ttype, build_tree_list (NULL_TREE, yyvsp[-1].ttype)); ; ! break;} ! case 304: ! #line 1460 "objc-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-5].ttype, tree_cons (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype)); ; ! break;} ! case 305: ! #line 1462 "objc-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; ! break;} ! case 313: ! #line 1485 "objc-parse.y" ! { really_start_incremental_init (NULL_TREE); ; ! break;} ! case 314: #line 1487 "objc-parse.y" ! { yyval.ttype = pop_init_level (0); ; ! break;} ! case 315: #line 1489 "objc-parse.y" ! { yyval.ttype = error_mark_node; ; ! break;} ! case 316: ! #line 1495 "objc-parse.y" ! { if (pedantic) ! pedwarn ("ISO C forbids empty initializer braces"); ; ! break;} ! case 320: ! #line 1509 "objc-parse.y" ! { if (pedantic && ! flag_isoc99) ! pedwarn ("ISO C89 forbids specifying subobject to initialize"); ; ! break;} ! case 321: ! #line 1512 "objc-parse.y" ! { if (pedantic) ! pedwarn ("obsolete use of designated initializer without `='"); ; ! break;} ! case 322: ! #line 1515 "objc-parse.y" ! { set_init_label (yyvsp[-1].ttype); ! if (pedantic) ! pedwarn ("obsolete use of designated initializer with `:'"); ; ! break;} ! case 323: ! #line 1519 "objc-parse.y" ! {; ! break;} ! case 325: ! #line 1525 "objc-parse.y" ! { push_init_level (0); ; ! break;} ! case 326: ! #line 1527 "objc-parse.y" ! { process_init_element (pop_init_level (0)); ; ! break;} ! case 327: ! #line 1529 "objc-parse.y" ! { process_init_element (yyvsp[0].ttype); ; ! break;} ! case 331: ! #line 1540 "objc-parse.y" ! { set_init_label (yyvsp[0].ttype); ; ! break;} ! case 332: ! #line 1542 "objc-parse.y" ! { set_init_index (yyvsp[-3].ttype, yyvsp[-1].ttype); ! if (pedantic) ! pedwarn ("ISO C forbids specifying range of elements to initialize"); ; ! break;} ! case 333: ! #line 1546 "objc-parse.y" ! { set_init_index (yyvsp[-1].ttype, NULL_TREE); ; ! break;} ! case 334: ! #line 1551 "objc-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids nested functions"); push_function_context (); *************** yyreduce: *** 4653,4679 **** pop_function_context (); YYERROR1; } ! ;} ! break; ! ! case 333: ! #line 1522 "objc-parse.y" ! { store_parm_decls (); ;} ! break; ! ! case 334: ! #line 1530 "objc-parse.y" ! { tree decl = current_function_decl; DECL_SOURCE_FILE (decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (decl) = yyvsp[-1].lineno; finish_function (1, 1); ! pop_function_context (); ! add_decl_stmt (decl); ;} ! break; ! ! case 335: ! #line 1540 "objc-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids nested functions"); push_function_context (); --- 4180,4204 ---- pop_function_context (); YYERROR1; } ! parsing_iso_function_signature = false; /* Don't warn about nested functions. */ ! ; ! break;} ! case 335: ! #line 1564 "objc-parse.y" ! { store_parm_decls (); ; ! break;} ! case 336: ! #line 1572 "objc-parse.y" ! { tree decl = current_function_decl; DECL_SOURCE_FILE (decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (decl) = yyvsp[-1].lineno; finish_function (1, 1); ! pop_function_context (); ! add_decl_stmt (decl); ; ! break;} ! case 337: ! #line 1582 "objc-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids nested functions"); push_function_context (); *************** yyreduce: *** 4683,4924 **** pop_function_context (); YYERROR1; } ! ;} ! break; ! ! case 336: ! #line 1552 "objc-parse.y" ! { store_parm_decls (); ;} ! break; ! ! case 337: ! #line 1560 "objc-parse.y" ! { tree decl = current_function_decl; DECL_SOURCE_FILE (decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (decl) = yyvsp[-1].lineno; finish_function (1, 1); ! pop_function_context (); ! add_decl_stmt (decl); ;} ! break; ! ! case 340: ! #line 1580 "objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ;} ! break; ! ! case 341: ! #line 1582 "objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ;} ! break; ! ! case 342: ! #line 1587 "objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ;} ! break; ! ! case 343: ! #line 1589 "objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 348: ! #line 1605 "objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ;} ! break; ! ! case 349: ! #line 1610 "objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ;} ! break; ! ! case 352: ! #line 1617 "objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ;} ! break; ! ! case 353: ! #line 1622 "objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ;} ! break; ! ! case 354: ! #line 1624 "objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 355: ! #line 1626 "objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 356: ! #line 1628 "objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ;} ! break; ! ! case 357: ! #line 1636 "objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ;} ! break; ! ! case 358: ! #line 1641 "objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ;} ! break; ! ! case 359: ! #line 1643 "objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 360: ! #line 1645 "objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ;} ! break; ! ! case 362: ! #line 1651 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 363: #line 1653 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 364: ! #line 1658 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 365: #line 1660 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 366: #line 1665 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 367: #line 1667 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 368: ! #line 1678 "objc-parse.y" ! { yyval.ttype = start_struct (RECORD_TYPE, yyvsp[-1].ttype); ! /* Start scope of tag before parsing components. */ ! ;} ! break; ! ! case 369: ! #line 1682 "objc-parse.y" ! { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ;} ! break; ! ! case 370: #line 1684 "objc-parse.y" ! { yyval.ttype = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), ! yyvsp[-2].ttype, chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ! ;} ! break; ! ! case 371: #line 1688 "objc-parse.y" ! { yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ;} ! break; ! ! case 372: ! #line 1690 "objc-parse.y" ! { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ;} ! break; ! ! case 373: ! #line 1692 "objc-parse.y" ! { yyval.ttype = finish_struct (start_struct (UNION_TYPE, NULL_TREE), ! yyvsp[-2].ttype, chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ! ;} ! break; ! ! case 374: #line 1696 "objc-parse.y" ! { yyval.ttype = start_enum (yyvsp[-1].ttype); ;} ! break; ! ! case 375: ! #line 1698 "objc-parse.y" ! { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), ! chainon (yyvsp[-7].ttype, yyvsp[0].ttype)); ;} ! break; ! ! case 376: #line 1701 "objc-parse.y" ! { yyval.ttype = start_enum (NULL_TREE); ;} ! break; ! ! case 377: #line 1703 "objc-parse.y" ! { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), ! chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ;} ! break; ! ! case 378: ! #line 1709 "objc-parse.y" ! { yyval.ttype = xref_tag (RECORD_TYPE, yyvsp[0].ttype); ;} ! break; ! ! case 379: ! #line 1711 "objc-parse.y" ! { yyval.ttype = xref_tag (UNION_TYPE, yyvsp[0].ttype); ;} ! break; ! ! case 380: ! #line 1713 "objc-parse.y" ! { yyval.ttype = xref_tag (ENUMERAL_TYPE, yyvsp[0].ttype); /* In ISO C, enumerated types can be referred to only if already defined. */ if (pedantic && !COMPLETE_TYPE_P (yyval.ttype)) ! pedwarn ("ISO C forbids forward references to `enum' types"); ;} ! break; ! ! case 384: ! #line 1728 "objc-parse.y" ! { if (pedantic && ! flag_isoc99) ! pedwarn ("comma at end of enumerator list"); ;} ! break; ! ! case 385: ! #line 1734 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 386: ! #line 1736 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ! pedwarn ("no semicolon at end of struct or union"); ;} ! break; ! ! case 387: ! #line 1741 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 388: ! #line 1743 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[-1].ttype); ;} ! break; ! ! case 389: ! #line 1745 "objc-parse.y" ! { if (pedantic) ! pedwarn ("extra semicolon in struct or union specified"); ;} ! break; ! ! case 390: ! #line 1749 "objc-parse.y" ! { tree interface = lookup_interface (yyvsp[-1].ttype); if (interface) --- 4208,4407 ---- pop_function_context (); YYERROR1; } ! parsing_iso_function_signature = false; /* Don't warn about nested functions. */ ! ; ! break;} ! case 338: ! #line 1595 "objc-parse.y" ! { store_parm_decls (); ; ! break;} ! case 339: ! #line 1603 "objc-parse.y" ! { tree decl = current_function_decl; DECL_SOURCE_FILE (decl) = yyvsp[-2].filename; DECL_SOURCE_LINE (decl) = yyvsp[-1].lineno; finish_function (1, 1); ! pop_function_context (); ! add_decl_stmt (decl); ; ! break;} ! case 342: ! #line 1623 "objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ; ! break;} ! case 343: ! #line 1625 "objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 344: ! #line 1630 "objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ; ! break;} ! case 345: ! #line 1632 "objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; ! break;} ! case 350: ! #line 1648 "objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 351: #line 1653 "objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ; ! break;} ! case 354: #line 1660 "objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 355: #line 1665 "objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ; ! break;} ! case 356: #line 1667 "objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; ! break;} ! case 357: ! #line 1669 "objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; ! break;} ! case 358: ! #line 1671 "objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ; ! break;} ! case 359: ! #line 1679 "objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 360: #line 1684 "objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ; ! break;} ! case 361: ! #line 1686 "objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; ! break;} ! case 362: #line 1688 "objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 0); ; ! break;} ! case 364: ! #line 1694 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 365: #line 1696 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 366: #line 1701 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 367: #line 1703 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 368: ! #line 1708 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 369: ! #line 1710 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 370: ! #line 1721 "objc-parse.y" ! { yyval.ttype = start_struct (RECORD_TYPE, yyvsp[-1].ttype); ! /* Start scope of tag before parsing components. */ ! ; ! break;} ! case 371: ! #line 1725 "objc-parse.y" ! { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; ! break;} ! case 372: ! #line 1727 "objc-parse.y" ! { yyval.ttype = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), ! yyvsp[-2].ttype, chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ! ; ! break;} ! case 373: ! #line 1731 "objc-parse.y" ! { yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ; ! break;} ! case 374: ! #line 1733 "objc-parse.y" ! { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; ! break;} ! case 375: ! #line 1735 "objc-parse.y" ! { yyval.ttype = finish_struct (start_struct (UNION_TYPE, NULL_TREE), ! yyvsp[-2].ttype, chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ! ; ! break;} ! case 376: ! #line 1739 "objc-parse.y" ! { yyval.ttype = start_enum (yyvsp[-1].ttype); ; ! break;} ! case 377: ! #line 1741 "objc-parse.y" ! { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), ! chainon (yyvsp[-7].ttype, yyvsp[0].ttype)); ; ! break;} ! case 378: ! #line 1744 "objc-parse.y" ! { yyval.ttype = start_enum (NULL_TREE); ; ! break;} ! case 379: ! #line 1746 "objc-parse.y" ! { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), ! chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; ! break;} ! case 380: ! #line 1752 "objc-parse.y" ! { yyval.ttype = xref_tag (RECORD_TYPE, yyvsp[0].ttype); ; ! break;} ! case 381: ! #line 1754 "objc-parse.y" ! { yyval.ttype = xref_tag (UNION_TYPE, yyvsp[0].ttype); ; ! break;} ! case 382: ! #line 1756 "objc-parse.y" ! { yyval.ttype = xref_tag (ENUMERAL_TYPE, yyvsp[0].ttype); /* In ISO C, enumerated types can be referred to only if already defined. */ if (pedantic && !COMPLETE_TYPE_P (yyval.ttype)) ! pedwarn ("ISO C forbids forward references to `enum' types"); ; ! break;} ! case 386: ! #line 1771 "objc-parse.y" ! { if (pedantic && ! flag_isoc99) ! pedwarn ("comma at end of enumerator list"); ; ! break;} ! case 387: ! #line 1777 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 388: ! #line 1779 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ! pedwarn ("no semicolon at end of struct or union"); ; ! break;} ! case 389: ! #line 1784 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 390: ! #line 1786 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[-1].ttype); ; ! break;} ! case 391: ! #line 1788 "objc-parse.y" ! { if (pedantic) ! pedwarn ("extra semicolon in struct or union specified"); ; ! break;} ! case 392: ! #line 1792 "objc-parse.y" ! { tree interface = lookup_interface (yyvsp[-1].ttype); if (interface) *************** yyreduce: *** 4929,5209 **** IDENTIFIER_POINTER (yyvsp[-1].ttype)); yyval.ttype = NULL_TREE; } ! ;} ! break; ! ! case 391: ! #line 1765 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 392: ! #line 1768 "objc-parse.y" ! { ! /* Support for unnamed structs or unions as members of ! structs or unions (which is [a] useful and [b] supports MS P-SDK). */ if (pedantic) pedwarn ("ISO C doesn't support unnamed structs/unions"); yyval.ttype = grokfield(yyvsp[-1].filename, yyvsp[0].lineno, NULL, current_declspecs, NULL_TREE); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 393: ! #line 1778 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 394: ! #line 1781 "objc-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids member declarations with no members"); shadow_tag(yyvsp[0].ttype); ! yyval.ttype = NULL_TREE; ;} ! break; ! ! case 395: ! #line 1786 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 396: ! #line 1788 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ;} ! break; ! ! case 398: ! #line 1795 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-3].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 400: ! #line 1801 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-3].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 401: ! #line 1806 "objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-1].ttype, current_declspecs, NULL_TREE); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ;} ! break; ! ! case 402: ! #line 1810 "objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-5].filename, yyvsp[-4].lineno, yyvsp[-3].ttype, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ;} ! break; ! ! case 403: ! #line 1813 "objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-4].filename, yyvsp[-3].lineno, NULL_TREE, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ;} ! break; ! ! case 404: ! #line 1819 "objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-1].ttype, current_declspecs, NULL_TREE); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ;} ! break; ! ! case 405: ! #line 1823 "objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-5].filename, yyvsp[-4].lineno, yyvsp[-3].ttype, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ;} ! break; ! ! case 406: ! #line 1826 "objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-4].filename, yyvsp[-3].lineno, NULL_TREE, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ;} ! break; ! ! case 408: #line 1838 "objc-parse.y" ! { if (yyvsp[-2].ttype == error_mark_node) ! yyval.ttype = yyvsp[-2].ttype; ! else ! yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-2].ttype); ;} ! break; ! ! case 409: ! #line 1843 "objc-parse.y" ! { yyval.ttype = error_mark_node; ;} ! break; ! ! case 410: #line 1849 "objc-parse.y" ! { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ;} ! break; ! ! case 411: ! #line 1851 "objc-parse.y" ! { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 412: #line 1856 "objc-parse.y" ! { pending_xref_error (); ! yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 413: ! #line 1859 "objc-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 414: ! #line 1864 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 416: ! #line 1870 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, NULL_TREE), ! all_prefix_attributes); ;} ! break; ! ! case 417: ! #line 1874 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[0].ttype), ! all_prefix_attributes); ;} ! break; ! ! case 418: ! #line 1878 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ;} ! break; ! ! case 422: ! #line 1891 "objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 423: ! #line 1896 "objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ;} ! break; ! ! case 424: ! #line 1898 "objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 425: ! #line 1903 "objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ;} ! break; ! ! case 426: ! #line 1905 "objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ;} ! break; ! ! case 427: ! #line 1907 "objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 1); ;} ! break; ! ! case 428: ! #line 1909 "objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ;} ! break; ! ! case 429: ! #line 1911 "objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, NULL_TREE, 1); ;} ! break; ! ! case 430: ! #line 1918 "objc-parse.y" ! { yyval.ttype = build_array_declarator (yyvsp[-1].ttype, NULL_TREE, 0, 0); ;} ! break; ! ! case 431: ! #line 1920 "objc-parse.y" ! { yyval.ttype = build_array_declarator (yyvsp[-1].ttype, yyvsp[-2].ttype, 0, 0); ;} ! break; ! ! case 432: ! #line 1922 "objc-parse.y" ! { yyval.ttype = build_array_declarator (NULL_TREE, NULL_TREE, 0, 0); ;} ! break; ! ! case 433: ! #line 1924 "objc-parse.y" ! { yyval.ttype = build_array_declarator (NULL_TREE, yyvsp[-1].ttype, 0, 0); ;} ! break; ! ! case 434: ! #line 1926 "objc-parse.y" ! { yyval.ttype = build_array_declarator (NULL_TREE, NULL_TREE, 0, 1); ;} ! break; ! ! case 435: ! #line 1928 "objc-parse.y" ! { yyval.ttype = build_array_declarator (NULL_TREE, yyvsp[-2].ttype, 0, 1); ;} ! break; ! ! case 436: ! #line 1930 "objc-parse.y" ! { if (C_RID_CODE (yyvsp[-2].ttype) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! yyval.ttype = build_array_declarator (yyvsp[-1].ttype, NULL_TREE, 1, 0); ;} ! break; ! ! case 437: #line 1934 "objc-parse.y" ! { if (C_RID_CODE (yyvsp[-3].ttype) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! yyval.ttype = build_array_declarator (yyvsp[-1].ttype, yyvsp[-2].ttype, 1, 0); ;} ! break; ! ! case 438: ! #line 1938 "objc-parse.y" ! { if (C_RID_CODE (yyvsp[-2].ttype) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! yyval.ttype = build_array_declarator (yyvsp[-1].ttype, yyvsp[-3].ttype, 1, 0); ;} ! break; ! ! case 441: ! #line 1953 "objc-parse.y" ! { ! pedwarn ("deprecated use of label at end of compound statement"); ! ;} ! break; ! ! case 449: #line 1970 "objc-parse.y" ! { if (pedantic && !flag_isoc99) ! pedwarn ("ISO C89 forbids mixed declarations and code"); ;} ! break; ! ! case 464: #line 2000 "objc-parse.y" ! { pushlevel (0); clear_last_expr (); add_scope_stmt (/*begin_p=*/1, /*partial_p=*/0); if (objc_method_context) add_objc_decls (); ! ;} ! break; ! ! case 465: ! #line 2009 "objc-parse.y" ! { yyval.ttype = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); ;} ! break; ! ! case 466: ! #line 2014 "objc-parse.y" ! { if (flag_isoc99) { yyval.ttype = c_begin_compound_stmt (); pushlevel (0); --- 4412,4624 ---- IDENTIFIER_POINTER (yyvsp[-1].ttype)); yyval.ttype = NULL_TREE; } ! ; ! break;} ! case 393: ! #line 1808 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 394: ! #line 1811 "objc-parse.y" ! { ! /* Support for unnamed structs or unions as members of ! structs or unions (which is [a] useful and [b] supports MS P-SDK). */ if (pedantic) pedwarn ("ISO C doesn't support unnamed structs/unions"); yyval.ttype = grokfield(yyvsp[-1].filename, yyvsp[0].lineno, NULL, current_declspecs, NULL_TREE); ! POP_DECLSPEC_STACK; ; ! break;} ! case 395: ! #line 1821 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 396: ! #line 1824 "objc-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids member declarations with no members"); shadow_tag(yyvsp[0].ttype); ! yyval.ttype = NULL_TREE; ; ! break;} ! case 397: ! #line 1829 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 398: ! #line 1831 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! RESTORE_EXT_FLAGS (yyvsp[-1].ttype); ; ! break;} ! case 400: #line 1838 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-3].ttype, yyvsp[0].ttype); ; ! break;} ! case 402: ! #line 1844 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-3].ttype, yyvsp[0].ttype); ; ! break;} ! case 403: #line 1849 "objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-1].ttype, current_declspecs, NULL_TREE); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; ! break;} ! case 404: ! #line 1853 "objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-5].filename, yyvsp[-4].lineno, yyvsp[-3].ttype, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; ! break;} ! case 405: #line 1856 "objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-4].filename, yyvsp[-3].lineno, NULL_TREE, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; ! break;} ! case 406: ! #line 1862 "objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-1].ttype, current_declspecs, NULL_TREE); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; ! break;} ! case 407: ! #line 1866 "objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-5].filename, yyvsp[-4].lineno, yyvsp[-3].ttype, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; ! break;} ! case 408: ! #line 1869 "objc-parse.y" ! { yyval.ttype = grokfield (yyvsp[-4].filename, yyvsp[-3].lineno, NULL_TREE, current_declspecs, yyvsp[-1].ttype); ! decl_attributes (&yyval.ttype, chainon (yyvsp[0].ttype, all_prefix_attributes), 0); ; ! break;} ! case 410: ! #line 1881 "objc-parse.y" ! { if (yyvsp[-2].ttype == error_mark_node) ! yyval.ttype = yyvsp[-2].ttype; ! else ! yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-2].ttype); ; ! break;} ! case 411: ! #line 1886 "objc-parse.y" ! { yyval.ttype = error_mark_node; ; ! break;} ! case 412: ! #line 1892 "objc-parse.y" ! { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 413: ! #line 1894 "objc-parse.y" ! { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 414: ! #line 1899 "objc-parse.y" ! { pending_xref_error (); ! yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 415: ! #line 1902 "objc-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; ! break;} ! case 416: ! #line 1907 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 418: ! #line 1913 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, NULL_TREE), ! all_prefix_attributes); ; ! break;} ! case 419: ! #line 1917 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[0].ttype), ! all_prefix_attributes); ; ! break;} ! case 420: ! #line 1921 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ; ! break;} ! case 424: #line 1934 "objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; ! break;} ! case 425: ! #line 1939 "objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 426: ! #line 1941 "objc-parse.y" ! { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; ! break;} ! case 427: ! #line 1946 "objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype ? tree_cons (yyvsp[-2].ttype, yyvsp[-1].ttype, NULL_TREE) : yyvsp[-1].ttype; ; ! break;} ! case 428: ! #line 1948 "objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 429: ! #line 1950 "objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, yyvsp[-1].ttype, 1); ; ! break;} ! case 430: ! #line 1952 "objc-parse.y" ! { yyval.ttype = build_nt (CALL_EXPR, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 431: ! #line 1954 "objc-parse.y" ! { yyval.ttype = set_array_declarator_type (yyvsp[0].ttype, NULL_TREE, 1); ; ! break;} ! case 432: ! #line 1961 "objc-parse.y" ! { yyval.ttype = build_array_declarator (yyvsp[-1].ttype, yyvsp[-2].ttype, 0, 0); ; ! break;} ! case 433: ! #line 1963 "objc-parse.y" ! { yyval.ttype = build_array_declarator (NULL_TREE, yyvsp[-1].ttype, 0, 0); ; ! break;} ! case 434: ! #line 1965 "objc-parse.y" ! { yyval.ttype = build_array_declarator (NULL_TREE, yyvsp[-2].ttype, 0, 1); ; ! break;} ! case 435: ! #line 1967 "objc-parse.y" ! { yyval.ttype = build_array_declarator (yyvsp[-1].ttype, yyvsp[-2].ttype, 1, 0); ; ! break;} ! case 436: #line 1970 "objc-parse.y" ! { yyval.ttype = build_array_declarator (yyvsp[-1].ttype, yyvsp[-3].ttype, 1, 0); ; ! break;} ! case 439: ! #line 1983 "objc-parse.y" ! { ! pedwarn ("deprecated use of label at end of compound statement"); ! ; ! break;} ! case 447: #line 2000 "objc-parse.y" ! { if (pedantic && !flag_isoc99) ! pedwarn ("ISO C89 forbids mixed declarations and code"); ; ! break;} ! case 462: ! #line 2030 "objc-parse.y" ! { pushlevel (0); clear_last_expr (); add_scope_stmt (/*begin_p=*/1, /*partial_p=*/0); if (objc_method_context) add_objc_decls (); ! ; ! break;} ! case 463: ! #line 2039 "objc-parse.y" ! { yyval.ttype = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); ; ! break;} ! case 464: ! #line 2044 "objc-parse.y" ! { if (flag_isoc99) { yyval.ttype = c_begin_compound_stmt (); pushlevel (0); *************** yyreduce: *** 5214,5281 **** } else yyval.ttype = NULL_TREE; ! ;} ! break; ! ! case 467: ! #line 2032 "objc-parse.y" ! { if (flag_isoc99) { tree scope_stmt = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); ! yyval.ttype = poplevel (kept_level_p (), 0, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE (scope_stmt)) = SCOPE_STMT_BLOCK (TREE_VALUE (scope_stmt)) = yyval.ttype; } else ! yyval.ttype = NULL_TREE; ;} ! break; ! ! case 469: ! #line 2049 "objc-parse.y" ! { if (pedantic) ! pedwarn ("ISO C forbids label declarations"); ;} ! break; ! ! case 472: ! #line 2060 "objc-parse.y" ! { tree link; for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) { tree label = shadow_label (TREE_VALUE (link)); C_DECLARED_LABEL_FLAG (label) = 1; add_decl_stmt (label); } ! ;} ! break; ! ! case 473: ! #line 2074 "objc-parse.y" ! {;} ! break; ! ! case 475: ! #line 2078 "objc-parse.y" ! { compstmt_count++; ! yyval.ttype = c_begin_compound_stmt (); ;} ! break; ! ! case 476: ! #line 2083 "objc-parse.y" ! { yyval.ttype = convert (void_type_node, integer_zero_node); ;} ! break; ! ! case 477: ! #line 2085 "objc-parse.y" ! { yyval.ttype = poplevel (kept_level_p (), 1, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE (yyvsp[0].ttype)) = SCOPE_STMT_BLOCK (TREE_VALUE (yyvsp[0].ttype)) ! = yyval.ttype; ;} ! break; ! ! case 480: ! #line 2098 "objc-parse.y" ! { if (current_function_decl == 0) { error ("braced-group within expression allowed only inside a function"); YYERROR; --- 4629,4688 ---- } else yyval.ttype = NULL_TREE; ! ; ! break;} ! case 465: ! #line 2062 "objc-parse.y" ! { if (flag_isoc99) { tree scope_stmt = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); ! yyval.ttype = poplevel (kept_level_p (), 0, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE (scope_stmt)) = SCOPE_STMT_BLOCK (TREE_VALUE (scope_stmt)) = yyval.ttype; } else ! yyval.ttype = NULL_TREE; ; ! break;} ! case 467: ! #line 2079 "objc-parse.y" ! { if (pedantic) ! pedwarn ("ISO C forbids label declarations"); ; ! break;} ! case 470: ! #line 2090 "objc-parse.y" ! { tree link; for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) { tree label = shadow_label (TREE_VALUE (link)); C_DECLARED_LABEL_FLAG (label) = 1; add_decl_stmt (label); } ! ; ! break;} ! case 471: ! #line 2104 "objc-parse.y" ! {; ! break;} ! case 473: ! #line 2108 "objc-parse.y" ! { compstmt_count++; ! yyval.ttype = c_begin_compound_stmt (); ; ! break;} ! case 474: ! #line 2113 "objc-parse.y" ! { yyval.ttype = convert (void_type_node, integer_zero_node); ; ! break;} ! case 475: ! #line 2115 "objc-parse.y" ! { yyval.ttype = poplevel (kept_level_p (), 1, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE (yyvsp[0].ttype)) = SCOPE_STMT_BLOCK (TREE_VALUE (yyvsp[0].ttype)) ! = yyval.ttype; ; ! break;} ! case 478: ! #line 2128 "objc-parse.y" ! { if (current_function_decl == 0) { error ("braced-group within expression allowed only inside a function"); YYERROR; *************** yyreduce: *** 5288,5365 **** push_label_level (); compstmt_count++; yyval.ttype = add_stmt (build_stmt (COMPOUND_STMT, last_tree)); ! ;} ! break; ! ! case 481: ! #line 2115 "objc-parse.y" ! { RECHAIN_STMTS (yyvsp[-1].ttype, COMPOUND_BODY (yyvsp[-1].ttype)); last_expr_type = NULL_TREE; ! yyval.ttype = yyvsp[-1].ttype; ;} ! break; ! ! case 482: ! #line 2123 "objc-parse.y" ! { c_finish_then (); ;} ! break; ! ! case 484: ! #line 2140 "objc-parse.y" ! { yyval.ttype = c_begin_if_stmt (); ;} ! break; ! ! case 485: ! #line 2142 "objc-parse.y" ! { c_expand_start_cond (truthvalue_conversion (yyvsp[-1].ttype), compstmt_count,yyvsp[-3].ttype); yyval.itype = stmt_count; if_stmt_file = yyvsp[-7].filename; ! if_stmt_line = yyvsp[-6].lineno; ;} ! break; ! ! case 486: ! #line 2154 "objc-parse.y" ! { stmt_count++; compstmt_count++; ! yyval.ttype = add_stmt (build_stmt (DO_STMT, NULL_TREE, NULL_TREE)); /* In the event that a parse error prevents parsing the complete do-statement, set the condition now. Otherwise, we can get crashes at RTL-generation time. */ ! DO_COND (yyval.ttype) = error_mark_node; ;} ! break; ! ! case 487: ! #line 2165 "objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype; ! RECHAIN_STMTS (yyval.ttype, DO_BODY (yyval.ttype)); ;} ! break; ! ! case 488: ! #line 2173 "objc-parse.y" ! { if (yychar == YYEMPTY) yychar = YYLEX; ! yyval.filename = input_filename; ;} ! break; ! ! case 489: ! #line 2179 "objc-parse.y" ! { if (yychar == YYEMPTY) yychar = YYLEX; ! yyval.lineno = lineno; ;} ! break; ! ! case 492: ! #line 2192 "objc-parse.y" ! { if (flag_isoc99) ! RECHAIN_STMTS (yyvsp[-2].ttype, COMPOUND_BODY (yyvsp[-2].ttype)); ;} ! break; ! ! case 493: ! #line 2198 "objc-parse.y" ! { if (yyvsp[0].ttype) { STMT_LINENO (yyvsp[0].ttype) = yyvsp[-1].lineno; /* ??? We currently have no way of recording --- 4695,4762 ---- push_label_level (); compstmt_count++; yyval.ttype = add_stmt (build_stmt (COMPOUND_STMT, last_tree)); ! ; ! break;} ! case 479: ! #line 2145 "objc-parse.y" ! { RECHAIN_STMTS (yyvsp[-1].ttype, COMPOUND_BODY (yyvsp[-1].ttype)); last_expr_type = NULL_TREE; ! yyval.ttype = yyvsp[-1].ttype; ; ! break;} ! case 480: ! #line 2153 "objc-parse.y" ! { c_finish_then (); ; ! break;} ! case 482: ! #line 2170 "objc-parse.y" ! { yyval.ttype = c_begin_if_stmt (); ; ! break;} ! case 483: ! #line 2172 "objc-parse.y" ! { c_expand_start_cond (c_common_truthvalue_conversion (yyvsp[-1].ttype), compstmt_count,yyvsp[-3].ttype); yyval.itype = stmt_count; if_stmt_file = yyvsp[-7].filename; ! if_stmt_line = yyvsp[-6].lineno; ; ! break;} ! case 484: ! #line 2184 "objc-parse.y" ! { stmt_count++; compstmt_count++; ! yyval.ttype = add_stmt (build_stmt (DO_STMT, NULL_TREE, NULL_TREE)); /* In the event that a parse error prevents parsing the complete do-statement, set the condition now. Otherwise, we can get crashes at RTL-generation time. */ ! DO_COND (yyval.ttype) = error_mark_node; ; ! break;} ! case 485: ! #line 2195 "objc-parse.y" ! { yyval.ttype = yyvsp[-2].ttype; ! RECHAIN_STMTS (yyval.ttype, DO_BODY (yyval.ttype)); ; ! break;} ! case 486: ! #line 2203 "objc-parse.y" ! { if (yychar == YYEMPTY) yychar = YYLEX; ! yyval.filename = input_filename; ; ! break;} ! case 487: ! #line 2209 "objc-parse.y" ! { if (yychar == YYEMPTY) yychar = YYLEX; ! yyval.lineno = lineno; ; ! break;} ! case 490: ! #line 2222 "objc-parse.y" ! { if (flag_isoc99) ! RECHAIN_STMTS (yyvsp[-2].ttype, COMPOUND_BODY (yyvsp[-2].ttype)); ; ! break;} ! case 491: ! #line 2228 "objc-parse.y" ! { if (yyvsp[0].ttype) { STMT_LINENO (yyvsp[0].ttype) = yyvsp[-1].lineno; /* ??? We currently have no way of recording *************** yyreduce: *** 5368,5564 **** but I suspect that problems will occur when doing inlining at the tree level. */ } ! ;} ! break; ! ! case 494: ! #line 2212 "objc-parse.y" ! { if (yyvsp[0].ttype) { STMT_LINENO (yyvsp[0].ttype) = yyvsp[-1].lineno; } ! ;} ! break; ! ! case 495: ! #line 2221 "objc-parse.y" ! { c_expand_start_else (); ! yyvsp[-1].itype = stmt_count; ;} ! break; ! ! case 496: ! #line 2224 "objc-parse.y" ! { c_finish_else (); c_expand_end_cond (); if (extra_warnings && stmt_count == yyvsp[-3].itype) ! warning ("empty body in an else-statement"); ;} ! break; ! ! case 497: ! #line 2229 "objc-parse.y" ! { c_expand_end_cond (); /* This warning is here instead of in simple_if, because we do not want a warning if an empty if is followed by an else statement. Increment stmt_count so we don't give a second error if this is a nested `if'. */ if (extra_warnings && stmt_count++ == yyvsp[0].itype) warning_with_file_and_line (if_stmt_file, if_stmt_line, ! "empty body in an if-statement"); ;} ! break; ! ! case 498: ! #line 2241 "objc-parse.y" ! { c_expand_end_cond (); ;} ! break; ! ! case 499: ! #line 2251 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = c_begin_while_stmt (); ;} ! break; ! ! case 500: ! #line 2254 "objc-parse.y" ! { yyvsp[-1].ttype = truthvalue_conversion (yyvsp[-1].ttype); ! c_finish_while_stmt_cond (truthvalue_conversion (yyvsp[-1].ttype), ! yyvsp[-3].ttype); ! yyval.ttype = add_stmt (yyvsp[-3].ttype); ;} ! break; ! ! case 501: ! #line 2259 "objc-parse.y" ! { RECHAIN_STMTS (yyvsp[-1].ttype, WHILE_BODY (yyvsp[-1].ttype)); ;} ! break; ! ! case 502: ! #line 2262 "objc-parse.y" ! { DO_COND (yyvsp[-4].ttype) = truthvalue_conversion (yyvsp[-2].ttype); ;} ! break; ! ! case 503: ! #line 2264 "objc-parse.y" ! { ;} ! break; ! ! case 504: ! #line 2266 "objc-parse.y" ! { yyval.ttype = build_stmt (FOR_STMT, NULL_TREE, NULL_TREE, ! NULL_TREE, NULL_TREE); ! add_stmt (yyval.ttype); ;} ! break; ! ! case 505: ! #line 2270 "objc-parse.y" ! { stmt_count++; ! RECHAIN_STMTS (yyvsp[-2].ttype, FOR_INIT_STMT (yyvsp[-2].ttype)); ;} ! break; ! ! case 506: ! #line 2273 "objc-parse.y" ! { if (yyvsp[-1].ttype) ! FOR_COND (yyvsp[-5].ttype) = truthvalue_conversion (yyvsp[-1].ttype); ;} ! break; ! ! case 507: ! #line 2276 "objc-parse.y" ! { FOR_EXPR (yyvsp[-8].ttype) = yyvsp[-1].ttype; ;} ! break; ! ! case 508: ! #line 2278 "objc-parse.y" ! { RECHAIN_STMTS (yyvsp[-10].ttype, FOR_BODY (yyvsp[-10].ttype)); ;} ! break; ! ! case 509: ! #line 2280 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = c_start_case (yyvsp[-1].ttype); ;} ! break; ! ! case 510: ! #line 2283 "objc-parse.y" ! { c_finish_case (); ;} ! break; ! ! case 511: ! #line 2288 "objc-parse.y" ! { add_stmt (build_stmt (EXPR_STMT, yyvsp[-1].ttype)); ;} ! break; ! ! case 512: ! #line 2290 "objc-parse.y" ! { check_for_loop_decls (); ;} ! break; ! ! case 513: #line 2296 "objc-parse.y" ! { stmt_count++; yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 514: ! #line 2298 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = c_expand_expr_stmt (yyvsp[-1].ttype); ;} ! break; ! ! case 515: ! #line 2301 "objc-parse.y" ! { if (flag_isoc99) ! RECHAIN_STMTS (yyvsp[-2].ttype, COMPOUND_BODY (yyvsp[-2].ttype)); ! yyval.ttype = NULL_TREE; ;} ! break; ! ! case 516: ! #line 2305 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = add_stmt (build_break_stmt ()); ;} ! break; ! ! case 517: ! #line 2308 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = add_stmt (build_continue_stmt ()); ;} ! break; ! ! case 518: #line 2311 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = c_expand_return (NULL_TREE); ;} ! break; ! ! case 519: #line 2314 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = c_expand_return (yyvsp[-1].ttype); ;} ! break; ! ! case 520: ! #line 2317 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = simple_asm_stmt (yyvsp[-2].ttype); ;} ! break; ! ! case 521: #line 2321 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = build_asm_stmt (yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, NULL_TREE); ;} ! break; ! ! case 522: ! #line 2326 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = build_asm_stmt (yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE); ;} ! break; ! ! case 523: ! #line 2331 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = build_asm_stmt (yyvsp[-10].ttype, yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype); ;} ! break; ! ! case 524: ! #line 2334 "objc-parse.y" ! { tree decl; stmt_count++; decl = lookup_label (yyvsp[-1].ttype); if (decl != 0) --- 4765,4931 ---- but I suspect that problems will occur when doing inlining at the tree level. */ } ! ; ! break;} ! case 492: ! #line 2242 "objc-parse.y" ! { if (yyvsp[0].ttype) { STMT_LINENO (yyvsp[0].ttype) = yyvsp[-1].lineno; } ! ; ! break;} ! case 493: ! #line 2251 "objc-parse.y" ! { c_expand_start_else (); ! yyvsp[-1].itype = stmt_count; ; ! break;} ! case 494: ! #line 2254 "objc-parse.y" ! { c_finish_else (); c_expand_end_cond (); if (extra_warnings && stmt_count == yyvsp[-3].itype) ! warning ("empty body in an else-statement"); ; ! break;} ! case 495: ! #line 2259 "objc-parse.y" ! { c_expand_end_cond (); /* This warning is here instead of in simple_if, because we do not want a warning if an empty if is followed by an else statement. Increment stmt_count so we don't give a second error if this is a nested `if'. */ if (extra_warnings && stmt_count++ == yyvsp[0].itype) warning_with_file_and_line (if_stmt_file, if_stmt_line, ! "empty body in an if-statement"); ; ! break;} ! case 496: ! #line 2271 "objc-parse.y" ! { c_expand_end_cond (); ; ! break;} ! case 497: ! #line 2281 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = c_begin_while_stmt (); ; ! break;} ! case 498: ! #line 2284 "objc-parse.y" ! { yyvsp[-1].ttype = c_common_truthvalue_conversion (yyvsp[-1].ttype); ! c_finish_while_stmt_cond ! (c_common_truthvalue_conversion (yyvsp[-1].ttype), yyvsp[-3].ttype); ! yyval.ttype = add_stmt (yyvsp[-3].ttype); ; ! break;} ! case 499: ! #line 2289 "objc-parse.y" ! { RECHAIN_STMTS (yyvsp[-1].ttype, WHILE_BODY (yyvsp[-1].ttype)); ; ! break;} ! case 500: ! #line 2292 "objc-parse.y" ! { DO_COND (yyvsp[-4].ttype) = c_common_truthvalue_conversion (yyvsp[-2].ttype); ; ! break;} ! case 501: ! #line 2294 "objc-parse.y" ! { ; ! break;} ! case 502: #line 2296 "objc-parse.y" ! { yyval.ttype = build_stmt (FOR_STMT, NULL_TREE, NULL_TREE, ! NULL_TREE, NULL_TREE); ! add_stmt (yyval.ttype); ; ! break;} ! case 503: ! #line 2300 "objc-parse.y" ! { stmt_count++; ! RECHAIN_STMTS (yyvsp[-2].ttype, FOR_INIT_STMT (yyvsp[-2].ttype)); ; ! break;} ! case 504: ! #line 2303 "objc-parse.y" ! { if (yyvsp[-1].ttype) ! FOR_COND (yyvsp[-5].ttype) ! = c_common_truthvalue_conversion (yyvsp[-1].ttype); ; ! break;} ! case 505: ! #line 2307 "objc-parse.y" ! { FOR_EXPR (yyvsp[-8].ttype) = yyvsp[-1].ttype; ; ! break;} ! case 506: ! #line 2309 "objc-parse.y" ! { RECHAIN_STMTS (yyvsp[-10].ttype, FOR_BODY (yyvsp[-10].ttype)); ; ! break;} ! case 507: #line 2311 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = c_start_case (yyvsp[-1].ttype); ; ! break;} ! case 508: #line 2314 "objc-parse.y" ! { c_finish_case (); ; ! break;} ! case 509: ! #line 2319 "objc-parse.y" ! { add_stmt (build_stmt (EXPR_STMT, yyvsp[-1].ttype)); ; ! break;} ! case 510: #line 2321 "objc-parse.y" ! { check_for_loop_decls (); ; ! break;} ! case 511: ! #line 2327 "objc-parse.y" ! { stmt_count++; yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 512: ! #line 2329 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = c_expand_expr_stmt (yyvsp[-1].ttype); ; ! break;} ! case 513: ! #line 2332 "objc-parse.y" ! { if (flag_isoc99) ! RECHAIN_STMTS (yyvsp[-2].ttype, COMPOUND_BODY (yyvsp[-2].ttype)); ! yyval.ttype = NULL_TREE; ; ! break;} ! case 514: ! #line 2336 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = add_stmt (build_break_stmt ()); ; ! break;} ! case 515: ! #line 2339 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = add_stmt (build_continue_stmt ()); ; ! break;} ! case 516: ! #line 2342 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = c_expand_return (NULL_TREE); ; ! break;} ! case 517: ! #line 2345 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = c_expand_return (yyvsp[-1].ttype); ; ! break;} ! case 518: ! #line 2348 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = simple_asm_stmt (yyvsp[-2].ttype); ; ! break;} ! case 519: ! #line 2352 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = build_asm_stmt (yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, NULL_TREE); ; ! break;} ! case 520: ! #line 2357 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = build_asm_stmt (yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE); ; ! break;} ! case 521: ! #line 2362 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = build_asm_stmt (yyvsp[-10].ttype, yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype); ; ! break;} ! case 522: ! #line 2365 "objc-parse.y" ! { tree decl; stmt_count++; decl = lookup_label (yyvsp[-1].ttype); if (decl != 0) *************** yyreduce: *** 5568,5611 **** } else yyval.ttype = NULL_TREE; ! ;} ! break; ! ! case 525: ! #line 2346 "objc-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids `goto *expr;'"); stmt_count++; yyvsp[-1].ttype = convert (ptr_type_node, yyvsp[-1].ttype); ! yyval.ttype = add_stmt (build_stmt (GOTO_STMT, yyvsp[-1].ttype)); ;} ! break; ! ! case 526: ! #line 2352 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 527: ! #line 2360 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = do_case (yyvsp[-1].ttype, NULL_TREE); ;} ! break; ! ! case 528: ! #line 2363 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = do_case (yyvsp[-3].ttype, yyvsp[-1].ttype); ;} ! break; ! ! case 529: ! #line 2366 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = do_case (NULL_TREE, NULL_TREE); ;} ! break; ! ! case 530: ! #line 2369 "objc-parse.y" ! { tree label = define_label (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-4].ttype); stmt_count++; if (label) { --- 4935,4972 ---- } else yyval.ttype = NULL_TREE; ! ; ! break;} ! case 523: ! #line 2377 "objc-parse.y" ! { if (pedantic) pedwarn ("ISO C forbids `goto *expr;'"); stmt_count++; yyvsp[-1].ttype = convert (ptr_type_node, yyvsp[-1].ttype); ! yyval.ttype = add_stmt (build_stmt (GOTO_STMT, yyvsp[-1].ttype)); ; ! break;} ! case 524: ! #line 2383 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 525: ! #line 2391 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = do_case (yyvsp[-1].ttype, NULL_TREE); ; ! break;} ! case 526: ! #line 2394 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = do_case (yyvsp[-3].ttype, yyvsp[-1].ttype); ; ! break;} ! case 527: ! #line 2397 "objc-parse.y" ! { stmt_count++; ! yyval.ttype = do_case (NULL_TREE, NULL_TREE); ; ! break;} ! case 528: ! #line 2400 "objc-parse.y" ! { tree label = define_label (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-4].ttype); stmt_count++; if (label) { *************** yyreduce: *** 5614,5717 **** } else yyval.ttype = NULL_TREE; ! ;} ! break; ! ! case 531: ! #line 2385 "objc-parse.y" ! { emit_line_note (input_filename, lineno); ! yyval.ttype = NULL_TREE; ;} ! break; ! ! case 532: ! #line 2388 "objc-parse.y" ! { emit_line_note (input_filename, lineno); ;} ! break; ! ! case 533: ! #line 2393 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 535: ! #line 2400 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 538: ! #line 2407 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ;} ! break; ! ! case 539: ! #line 2412 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (NULL_TREE, yyvsp[-3].ttype), yyvsp[-1].ttype); ;} ! break; ! ! case 540: ! #line 2414 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (yyvsp[-5].ttype, yyvsp[-3].ttype), yyvsp[-1].ttype); ;} ! break; ! ! case 541: #line 2419 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), NULL_TREE); ;} ! break; ! ! case 542: ! #line 2421 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), yyvsp[-2].ttype); ;} ! break; ! ! case 543: #line 2431 "objc-parse.y" ! { pushlevel (0); clear_parm_order (); ! declare_parm_level (0); ;} ! break; ! ! case 544: ! #line 2435 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); ! poplevel (0, 0, 0); ;} ! break; ! ! case 546: ! #line 2443 "objc-parse.y" ! { tree parm; if (pedantic) pedwarn ("ISO C forbids forward parameter declarations"); /* Mark the forward decls as such. */ for (parm = getdecls (); parm; parm = TREE_CHAIN (parm)) TREE_ASM_WRITTEN (parm) = 1; ! clear_parm_order (); ;} ! break; ! ! case 547: ! #line 2451 "objc-parse.y" ! { /* Dummy action so attributes are in known place ! on parser stack. */ ;} ! break; ! ! case 548: ! #line 2454 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 549: ! #line 2456 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ;} ! break; ! ! case 550: ! #line 2462 "objc-parse.y" ! { yyval.ttype = get_parm_info (0); ;} ! break; ! ! case 551: ! #line 2464 "objc-parse.y" ! { yyval.ttype = get_parm_info (0); /* Gcc used to allow this as an extension. However, it does not work for all targets, and thus has been disabled. Also, since func (...) and func () are indistinguishable, --- 4975,5063 ---- } else yyval.ttype = NULL_TREE; ! ; ! break;} ! case 529: ! #line 2416 "objc-parse.y" ! { emit_line_note (input_filename, lineno); ! yyval.ttype = NULL_TREE; ; ! break;} ! case 530: #line 2419 "objc-parse.y" ! { emit_line_note (input_filename, lineno); ; ! break;} ! case 531: ! #line 2424 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 533: #line 2431 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 536: ! #line 2438 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; ! break;} ! case 537: ! #line 2443 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (NULL_TREE, yyvsp[-3].ttype), yyvsp[-1].ttype); ; ! break;} ! case 538: ! #line 2445 "objc-parse.y" ! { yyvsp[-5].ttype = build_string (IDENTIFIER_LENGTH (yyvsp[-5].ttype), ! IDENTIFIER_POINTER (yyvsp[-5].ttype)); ! yyval.ttype = build_tree_list (build_tree_list (yyvsp[-5].ttype, yyvsp[-3].ttype), yyvsp[-1].ttype); ; ! break;} ! case 539: ! #line 2452 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; ! break;} ! case 540: ! #line 2454 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-2].ttype); ; ! break;} ! case 541: ! #line 2464 "objc-parse.y" ! { pushlevel (0); clear_parm_order (); ! declare_parm_level (0); ; ! break;} ! case 542: ! #line 2468 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); ! poplevel (0, 0, 0); ; ! break;} ! case 544: ! #line 2476 "objc-parse.y" ! { tree parm; if (pedantic) pedwarn ("ISO C forbids forward parameter declarations"); /* Mark the forward decls as such. */ for (parm = getdecls (); parm; parm = TREE_CHAIN (parm)) TREE_ASM_WRITTEN (parm) = 1; ! clear_parm_order (); ; ! break;} ! case 545: ! #line 2484 "objc-parse.y" ! { /* Dummy action so attributes are in known place ! on parser stack. */ ; ! break;} ! case 546: ! #line 2487 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 547: ! #line 2489 "objc-parse.y" ! { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ; ! break;} ! case 548: ! #line 2495 "objc-parse.y" ! { yyval.ttype = get_parm_info (0); ; ! break;} ! case 549: ! #line 2497 "objc-parse.y" ! { yyval.ttype = get_parm_info (0); /* Gcc used to allow this as an extension. However, it does not work for all targets, and thus has been disabled. Also, since func (...) and func () are indistinguishable, *************** yyreduce: *** 5719,5842 **** tries to verify that BUILT_IN_NEXT_ARG is being used correctly. */ error ("ISO C requires a named argument before `...'"); ! ;} ! break; ! ! case 552: ! #line 2474 "objc-parse.y" ! { yyval.ttype = get_parm_info (1); ;} ! break; ! ! case 553: ! #line 2476 "objc-parse.y" ! { yyval.ttype = get_parm_info (0); ;} ! break; ! ! case 554: ! #line 2481 "objc-parse.y" ! { push_parm_decl (yyvsp[0].ttype); ;} ! break; ! ! case 555: ! #line 2483 "objc-parse.y" ! { push_parm_decl (yyvsp[0].ttype); ;} ! break; ! ! case 556: ! #line 2490 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 557: ! #line 2495 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 558: ! #line 2500 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 559: ! #line 2503 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 560: ! #line 2509 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 561: ! #line 2517 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 562: ! #line 2522 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 563: ! #line 2527 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 564: ! #line 2530 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 565: ! #line 2536 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 566: ! #line 2542 "objc-parse.y" ! { prefix_attributes = chainon (prefix_attributes, yyvsp[-3].ttype); ! all_prefix_attributes = prefix_attributes; ;} ! break; ! ! case 567: ! #line 2551 "objc-parse.y" ! { pushlevel (0); clear_parm_order (); ! declare_parm_level (1); ;} ! break; ! ! case 568: ! #line 2555 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); ! poplevel (0, 0, 0); ;} ! break; ! ! case 570: ! #line 2563 "objc-parse.y" ! { tree t; for (t = yyvsp[-1].ttype; t; t = TREE_CHAIN (t)) if (TREE_VALUE (t) == NULL_TREE) error ("`...' in old-style identifier list"); --- 5065,5172 ---- tries to verify that BUILT_IN_NEXT_ARG is being used correctly. */ error ("ISO C requires a named argument before `...'"); ! ; ! break;} ! case 550: ! #line 2507 "objc-parse.y" ! { yyval.ttype = get_parm_info (1); ! parsing_iso_function_signature = true; ! ; ! break;} ! case 551: ! #line 2511 "objc-parse.y" ! { yyval.ttype = get_parm_info (0); ; ! break;} ! case 552: ! #line 2516 "objc-parse.y" ! { push_parm_decl (yyvsp[0].ttype); ; ! break;} ! case 553: ! #line 2518 "objc-parse.y" ! { push_parm_decl (yyvsp[0].ttype); ; ! break;} ! case 554: ! #line 2525 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ; ! break;} ! case 555: ! #line 2530 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ; ! break;} ! case 556: ! #line 2535 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 557: ! #line 2538 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ; ! break;} ! case 558: ! #line 2544 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 559: ! #line 2552 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ; ! break;} ! case 560: ! #line 2557 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ; ! break;} ! case 561: ! #line 2562 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 562: ! #line 2565 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), chainon (yyvsp[0].ttype, all_prefix_attributes)); ! POP_DECLSPEC_STACK; ; ! break;} ! case 563: ! #line 2571 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 564: ! #line 2577 "objc-parse.y" ! { prefix_attributes = chainon (prefix_attributes, yyvsp[-3].ttype); ! all_prefix_attributes = prefix_attributes; ; ! break;} ! case 565: ! #line 2586 "objc-parse.y" ! { pushlevel (0); clear_parm_order (); ! declare_parm_level (1); ; ! break;} ! case 566: ! #line 2590 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); ! poplevel (0, 0, 0); ; ! break;} ! case 568: ! #line 2598 "objc-parse.y" ! { tree t; for (t = yyvsp[-1].ttype; t; t = TREE_CHAIN (t)) if (TREE_VALUE (t) == NULL_TREE) error ("`...' in old-style identifier list"); *************** yyreduce: *** 5848,5887 **** || TREE_PURPOSE (yyval.ttype) == 0 || TREE_CODE (TREE_PURPOSE (yyval.ttype)) != PARM_DECL)) YYERROR1; ! ;} ! break; ! ! case 571: ! #line 2581 "objc-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;} ! break; ! ! case 572: ! #line 2583 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ;} ! break; ! ! case 573: ! #line 2589 "objc-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;} ! break; ! ! case 574: ! #line 2591 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ;} ! break; ! ! case 575: ! #line 2596 "objc-parse.y" ! { yyval.ttype = SAVE_WARN_FLAGS(); pedantic = 0; warn_pointer_arith = 0; ! warn_traditional = 0; ;} ! break; ! ! case 581: ! #line 2611 "objc-parse.y" ! { if (objc_implementation_context) { finish_class (objc_implementation_context); --- 5178,5212 ---- || TREE_PURPOSE (yyval.ttype) == 0 || TREE_CODE (TREE_PURPOSE (yyval.ttype)) != PARM_DECL)) YYERROR1; ! ; ! break;} ! case 569: ! #line 2616 "objc-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; ! break;} ! case 570: ! #line 2618 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; ! break;} ! case 571: ! #line 2624 "objc-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; ! break;} ! case 572: ! #line 2626 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; ! break;} ! case 573: ! #line 2631 "objc-parse.y" ! { yyval.ttype = SAVE_EXT_FLAGS(); pedantic = 0; warn_pointer_arith = 0; ! warn_traditional = 0; ! flag_iso = 0; ; ! break;} ! case 579: ! #line 2647 "objc-parse.y" ! { if (objc_implementation_context) { finish_class (objc_implementation_context); *************** yyreduce: *** 5890,6534 **** } else warning ("`@end' must appear in an implementation context"); ! ;} ! break; ! ! case 582: ! #line 2626 "objc-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;} ! break; ! ! case 583: ! #line 2628 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ;} ! break; ! ! case 584: ! #line 2633 "objc-parse.y" ! { objc_declare_class (yyvsp[-1].ttype); ! ;} ! break; ! ! case 585: ! #line 2640 "objc-parse.y" ! { objc_declare_alias (yyvsp[-2].ttype, yyvsp[-1].ttype); ! ;} ! break; ! ! case 586: ! #line 2647 "objc-parse.y" ! { objc_interface_context = objc_ivar_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-2].ttype, NULL_TREE, yyvsp[-1].ttype); objc_public_flag = 0; ! ;} ! break; ! ! case 587: ! #line 2653 "objc-parse.y" ! { continue_class (objc_interface_context); ! ;} ! break; ! ! case 588: ! #line 2658 "objc-parse.y" ! { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ! ;} ! break; ! ! case 589: ! #line 2664 "objc-parse.y" ! { objc_interface_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-1].ttype, NULL_TREE, yyvsp[0].ttype); continue_class (objc_interface_context); ! ;} ! break; ! ! case 590: ! #line 2671 "objc-parse.y" ! { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ! ;} ! break; ! ! case 591: ! #line 2677 "objc-parse.y" ! { objc_interface_context = objc_ivar_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[-1].ttype); objc_public_flag = 0; ! ;} ! break; ! ! case 592: ! #line 2683 "objc-parse.y" ! { continue_class (objc_interface_context); ! ;} ! break; ! ! case 593: ! #line 2688 "objc-parse.y" ! { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ! ;} ! break; ! ! case 594: ! #line 2694 "objc-parse.y" ! { objc_interface_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); continue_class (objc_interface_context); ! ;} ! break; ! ! case 595: ! #line 2701 "objc-parse.y" ! { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ! ;} ! break; ! ! case 596: ! #line 2707 "objc-parse.y" ! { objc_implementation_context = objc_ivar_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-1].ttype, NULL_TREE, NULL_TREE); objc_public_flag = 0; ! ;} ! break; ! ! case 597: ! #line 2713 "objc-parse.y" ! { objc_ivar_chain = continue_class (objc_implementation_context); ! ;} ! break; ! ! case 598: ! #line 2719 "objc-parse.y" ! { objc_implementation_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[0].ttype, NULL_TREE, NULL_TREE); objc_ivar_chain = continue_class (objc_implementation_context); ! ;} ! break; ! ! case 599: ! #line 2727 "objc-parse.y" ! { objc_implementation_context = objc_ivar_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, NULL_TREE); objc_public_flag = 0; ! ;} ! break; ! ! case 600: ! #line 2733 "objc-parse.y" ! { objc_ivar_chain = continue_class (objc_implementation_context); ! ;} ! break; ! ! case 601: ! #line 2739 "objc-parse.y" ! { objc_implementation_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); objc_ivar_chain = continue_class (objc_implementation_context); ! ;} ! break; ! ! case 602: ! #line 2747 "objc-parse.y" ! { objc_interface_context = start_class (CATEGORY_INTERFACE_TYPE, yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); continue_class (objc_interface_context); ! ;} ! break; ! ! case 603: ! #line 2754 "objc-parse.y" ! { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ! ;} ! break; ! ! case 604: ! #line 2760 "objc-parse.y" ! { objc_implementation_context = start_class (CATEGORY_IMPLEMENTATION_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, NULL_TREE); objc_ivar_chain = continue_class (objc_implementation_context); ! ;} ! break; ! ! case 605: ! #line 2770 "objc-parse.y" ! { objc_pq_context = 1; objc_interface_context = start_protocol(PROTOCOL_INTERFACE_TYPE, yyvsp[-1].ttype, yyvsp[0].ttype); ! ;} ! break; ! ! case 606: ! #line 2776 "objc-parse.y" ! { objc_pq_context = 0; finish_protocol(objc_interface_context); objc_interface_context = NULL_TREE; ! ;} ! break; ! ! case 607: ! #line 2785 "objc-parse.y" ! { objc_declare_protocols (yyvsp[-1].ttype); ! ;} ! break; ! ! case 608: ! #line 2792 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ! ;} ! break; ! ! case 610: ! #line 2800 "objc-parse.y" ! { if (yyvsp[-2].code == LT_EXPR && yyvsp[0].code == GT_EXPR) yyval.ttype = yyvsp[-1].ttype; else YYERROR1; ! ;} ! break; ! ! case 613: ! #line 2814 "objc-parse.y" ! { objc_public_flag = 2; ;} ! break; ! ! case 614: ! #line 2815 "objc-parse.y" ! { objc_public_flag = 0; ;} ! break; ! ! case 615: ! #line 2816 "objc-parse.y" ! { objc_public_flag = 1; ;} ! break; ! ! case 616: ! #line 2821 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ! ;} ! break; ! ! case 618: ! #line 2826 "objc-parse.y" ! { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ! ;} ! break; ! ! case 619: ! #line 2844 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 620: ! #line 2847 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ;} ! break; ! ! case 621: ! #line 2850 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 622: ! #line 2855 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ;} ! break; ! ! case 625: ! #line 2862 "objc-parse.y" ! { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, yyvsp[0].ttype, current_declspecs, NULL_TREE); ! ;} ! break; ! ! case 626: ! #line 2869 "objc-parse.y" ! { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, yyvsp[-2].ttype, current_declspecs, yyvsp[0].ttype); ! ;} ! break; ! ! case 627: ! #line 2875 "objc-parse.y" ! { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, NULL_TREE, current_declspecs, yyvsp[0].ttype); ! ;} ! break; ! ! case 628: ! #line 2885 "objc-parse.y" ! { objc_inherit_code = CLASS_METHOD_DECL; ;} ! break; ! ! case 629: ! #line 2887 "objc-parse.y" ! { objc_inherit_code = INSTANCE_METHOD_DECL; ;} ! break; ! ! case 630: ! #line 2892 "objc-parse.y" ! { objc_pq_context = 1; if (!objc_implementation_context) fatal_error ("method definition not in class context"); ! ;} ! break; ! ! case 631: ! #line 2898 "objc-parse.y" ! { objc_pq_context = 0; if (objc_inherit_code == CLASS_METHOD_DECL) add_class_method (objc_implementation_context, yyvsp[0].ttype); else add_instance_method (objc_implementation_context, yyvsp[0].ttype); start_method_def (yyvsp[0].ttype); ! ;} ! break; ! ! case 632: ! #line 2907 "objc-parse.y" ! { continue_method_def (); ! ;} ! break; ! ! case 633: ! #line 2911 "objc-parse.y" ! { finish_method_def (); ! ;} ! break; ! ! case 635: ! #line 2922 "objc-parse.y" ! {yyval.ttype = NULL_TREE; ;} ! break; ! ! case 640: ! #line 2929 "objc-parse.y" ! {yyval.ttype = NULL_TREE; ;} ! break; ! ! case 644: ! #line 2939 "objc-parse.y" ! { /* Remember protocol qualifiers in prototypes. */ objc_pq_context = 1; ! ;} ! break; ! ! case 645: ! #line 2944 "objc-parse.y" ! { /* Forget protocol qualifiers here. */ objc_pq_context = 0; if (objc_inherit_code == CLASS_METHOD_DECL) add_class_method (objc_interface_context, yyvsp[0].ttype); else add_instance_method (objc_interface_context, yyvsp[0].ttype); ! ;} ! break; ! ! case 647: ! #line 2957 "objc-parse.y" ! { yyval.ttype = build_method_decl (objc_inherit_code, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ! ;} ! break; ! ! case 648: ! #line 2962 "objc-parse.y" ! { yyval.ttype = build_method_decl (objc_inherit_code, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! ;} ! break; ! ! case 649: ! #line 2967 "objc-parse.y" ! { yyval.ttype = build_method_decl (objc_inherit_code, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ! ;} ! break; ! ! case 650: ! #line 2972 "objc-parse.y" ! { yyval.ttype = build_method_decl (objc_inherit_code, NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ! ;} ! break; ! ! case 659: ! #line 3002 "objc-parse.y" ! { POP_DECLSPEC_STACK; ;} ! break; ! ! case 660: ! #line 3004 "objc-parse.y" ! { shadow_tag (yyvsp[-1].ttype); ;} ! break; ! ! case 661: ! #line 3006 "objc-parse.y" ! { pedwarn ("empty declaration"); ;} ! break; ! ! case 662: ! #line 3011 "objc-parse.y" ! { push_parm_decl (yyvsp[0].ttype); ;} ! break; ! ! case 663: ! #line 3013 "objc-parse.y" ! { push_parm_decl (yyvsp[0].ttype); ;} ! break; ! ! case 664: ! #line 3021 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ;} ! break; ! ! case 665: ! #line 3025 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ;} ! break; ! ! case 666: ! #line 3029 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ;} ! break; ! ! case 667: ! #line 3034 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ! ;} ! break; ! ! case 668: ! #line 3038 "objc-parse.y" ! { /* oh what a kludge! */ yyval.ttype = objc_ellipsis_node; ! ;} ! break; ! ! case 669: ! #line 3043 "objc-parse.y" ! { pushlevel (0); ! ;} ! break; ! ! case 670: ! #line 3047 "objc-parse.y" ! { /* returns a tree list node generated by get_parm_info */ yyval.ttype = yyvsp[0].ttype; poplevel (0, 0, 0); ! ;} ! break; ! ! case 673: ! #line 3062 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ! ;} ! break; ! ! case 700: ! #line 3084 "objc-parse.y" ! { yyval.ttype = build_keyword_decl (yyvsp[-5].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ! ;} ! break; ! ! case 701: ! #line 3089 "objc-parse.y" ! { yyval.ttype = build_keyword_decl (yyvsp[-2].ttype, NULL_TREE, yyvsp[0].ttype); ! ;} ! break; ! ! case 702: ! #line 3094 "objc-parse.y" ! { yyval.ttype = build_keyword_decl (NULL_TREE, yyvsp[-2].ttype, yyvsp[0].ttype); ! ;} ! break; ! ! case 703: ! #line 3099 "objc-parse.y" ! { yyval.ttype = build_keyword_decl (NULL_TREE, NULL_TREE, yyvsp[0].ttype); ! ;} ! break; ! ! case 707: ! #line 3112 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ! ;} ! break; ! ! case 708: ! #line 3120 "objc-parse.y" ! { if (TREE_CHAIN (yyvsp[0].ttype) == NULL_TREE) /* just return the expr., remove a level of indirection */ yyval.ttype = TREE_VALUE (yyvsp[0].ttype); else /* we have a comma expr., we will collapse later */ yyval.ttype = yyvsp[0].ttype; ! ;} ! break; ! ! case 709: ! #line 3132 "objc-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-2].ttype, yyvsp[0].ttype); ! ;} ! break; ! ! case 710: ! #line 3136 "objc-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ! ;} ! break; ! ! case 712: ! #line 3144 "objc-parse.y" ! { yyval.ttype = get_class_reference (yyvsp[0].ttype); ! ;} ! break; ! ! case 713: ! #line 3151 "objc-parse.y" ! { objc_receiver_context = 1; ;} ! break; ! ! case 714: ! #line 3153 "objc-parse.y" ! { objc_receiver_context = 0; ;} ! break; ! ! case 715: ! #line 3155 "objc-parse.y" ! { ! yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ! ;} ! break; ! ! case 719: ! #line 3168 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ! ;} ! break; ! ! case 720: ! #line 3175 "objc-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-1].ttype, NULL_TREE); ! ;} ! break; ! ! case 721: ! #line 3179 "objc-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, NULL_TREE); ! ;} ! break; ! ! case 722: ! #line 3186 "objc-parse.y" ! { yyval.ttype = yyvsp[-1].ttype; ! ;} ! break; ! ! case 723: ! #line 3193 "objc-parse.y" ! { yyval.ttype = yyvsp[-1].ttype; ! ;} ! break; ! ! case 724: ! #line 3202 "objc-parse.y" ! { yyval.ttype = groktypename (yyvsp[-1].ttype); ! ;} ! break; ! ! } - /* Line 991 of yacc.c. */ - #line 6522 "op2534.c" yyvsp -= yylen; yyssp -= yylen; ! ! YY_STACK_PRINT (yyss, yyssp); *++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 --- 5215,5775 ---- } else warning ("`@end' must appear in an implementation context"); ! ; ! break;} ! case 580: ! #line 2662 "objc-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; ! break;} ! case 581: ! #line 2664 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; ! break;} ! case 582: ! #line 2669 "objc-parse.y" ! { objc_declare_class (yyvsp[-1].ttype); ! ; ! break;} ! case 583: ! #line 2676 "objc-parse.y" ! { objc_declare_alias (yyvsp[-2].ttype, yyvsp[-1].ttype); ! ; ! break;} ! case 584: ! #line 2683 "objc-parse.y" ! { objc_interface_context = objc_ivar_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-2].ttype, NULL_TREE, yyvsp[-1].ttype); objc_public_flag = 0; ! ; ! break;} ! case 585: ! #line 2689 "objc-parse.y" ! { continue_class (objc_interface_context); ! ; ! break;} ! case 586: ! #line 2694 "objc-parse.y" ! { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ! ; ! break;} ! case 587: ! #line 2700 "objc-parse.y" ! { objc_interface_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-1].ttype, NULL_TREE, yyvsp[0].ttype); continue_class (objc_interface_context); ! ; ! break;} ! case 588: ! #line 2707 "objc-parse.y" ! { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ! ; ! break;} ! case 589: ! #line 2713 "objc-parse.y" ! { objc_interface_context = objc_ivar_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[-1].ttype); objc_public_flag = 0; ! ; ! break;} ! case 590: ! #line 2719 "objc-parse.y" ! { continue_class (objc_interface_context); ! ; ! break;} ! case 591: ! #line 2724 "objc-parse.y" ! { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ! ; ! break;} ! case 592: ! #line 2730 "objc-parse.y" ! { objc_interface_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); continue_class (objc_interface_context); ! ; ! break;} ! case 593: ! #line 2737 "objc-parse.y" ! { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ! ; ! break;} ! case 594: ! #line 2743 "objc-parse.y" ! { objc_implementation_context = objc_ivar_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-1].ttype, NULL_TREE, NULL_TREE); objc_public_flag = 0; ! ; ! break;} ! case 595: ! #line 2749 "objc-parse.y" ! { objc_ivar_chain = continue_class (objc_implementation_context); ! ; ! break;} ! case 596: ! #line 2755 "objc-parse.y" ! { objc_implementation_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[0].ttype, NULL_TREE, NULL_TREE); objc_ivar_chain = continue_class (objc_implementation_context); ! ; ! break;} ! case 597: ! #line 2763 "objc-parse.y" ! { objc_implementation_context = objc_ivar_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, NULL_TREE); objc_public_flag = 0; ! ; ! break;} ! case 598: ! #line 2769 "objc-parse.y" ! { objc_ivar_chain = continue_class (objc_implementation_context); ! ; ! break;} ! case 599: ! #line 2775 "objc-parse.y" ! { objc_implementation_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); objc_ivar_chain = continue_class (objc_implementation_context); ! ; ! break;} ! case 600: ! #line 2783 "objc-parse.y" ! { objc_interface_context = start_class (CATEGORY_INTERFACE_TYPE, yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); continue_class (objc_interface_context); ! ; ! break;} ! case 601: ! #line 2790 "objc-parse.y" ! { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ! ; ! break;} ! case 602: ! #line 2796 "objc-parse.y" ! { objc_implementation_context = start_class (CATEGORY_IMPLEMENTATION_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, NULL_TREE); objc_ivar_chain = continue_class (objc_implementation_context); ! ; ! break;} ! case 603: ! #line 2806 "objc-parse.y" ! { objc_pq_context = 1; objc_interface_context = start_protocol(PROTOCOL_INTERFACE_TYPE, yyvsp[-1].ttype, yyvsp[0].ttype); ! ; ! break;} ! case 604: ! #line 2812 "objc-parse.y" ! { objc_pq_context = 0; finish_protocol(objc_interface_context); objc_interface_context = NULL_TREE; ! ; ! break;} ! case 605: ! #line 2821 "objc-parse.y" ! { objc_declare_protocols (yyvsp[-1].ttype); ! ; ! break;} ! case 606: ! #line 2828 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ! ; ! break;} ! case 608: ! #line 2836 "objc-parse.y" ! { if (yyvsp[-2].code == LT_EXPR && yyvsp[0].code == GT_EXPR) yyval.ttype = yyvsp[-1].ttype; else YYERROR1; ! ; ! break;} ! case 611: ! #line 2850 "objc-parse.y" ! { objc_public_flag = 2; ; ! break;} ! case 612: ! #line 2851 "objc-parse.y" ! { objc_public_flag = 0; ; ! break;} ! case 613: ! #line 2852 "objc-parse.y" ! { objc_public_flag = 1; ; ! break;} ! case 614: ! #line 2857 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ! ; ! break;} ! case 616: ! #line 2862 "objc-parse.y" ! { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ! ; ! break;} ! case 617: ! #line 2880 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 618: ! #line 2883 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ! POP_DECLSPEC_STACK; ; ! break;} ! case 619: ! #line 2886 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 620: ! #line 2891 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ; ! break;} ! case 623: ! #line 2898 "objc-parse.y" ! { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, yyvsp[0].ttype, current_declspecs, NULL_TREE); ! ; ! break;} ! case 624: ! #line 2905 "objc-parse.y" ! { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, yyvsp[-2].ttype, current_declspecs, yyvsp[0].ttype); ! ; ! break;} ! case 625: ! #line 2911 "objc-parse.y" ! { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, NULL_TREE, current_declspecs, yyvsp[0].ttype); ! ; ! break;} ! case 626: ! #line 2921 "objc-parse.y" ! { objc_inherit_code = CLASS_METHOD_DECL; ; ! break;} ! case 627: ! #line 2923 "objc-parse.y" ! { objc_inherit_code = INSTANCE_METHOD_DECL; ; ! break;} ! case 628: ! #line 2928 "objc-parse.y" ! { objc_pq_context = 1; if (!objc_implementation_context) fatal_error ("method definition not in class context"); ! ; ! break;} ! case 629: ! #line 2934 "objc-parse.y" ! { objc_pq_context = 0; if (objc_inherit_code == CLASS_METHOD_DECL) add_class_method (objc_implementation_context, yyvsp[0].ttype); else add_instance_method (objc_implementation_context, yyvsp[0].ttype); start_method_def (yyvsp[0].ttype); ! ; ! break;} ! case 630: ! #line 2943 "objc-parse.y" ! { continue_method_def (); ! ; ! break;} ! case 631: ! #line 2947 "objc-parse.y" ! { finish_method_def (); ! ; ! break;} ! case 633: ! #line 2958 "objc-parse.y" ! {yyval.ttype = NULL_TREE; ; ! break;} ! case 638: ! #line 2965 "objc-parse.y" ! {yyval.ttype = NULL_TREE; ; ! break;} ! case 642: ! #line 2975 "objc-parse.y" ! { /* Remember protocol qualifiers in prototypes. */ objc_pq_context = 1; ! ; ! break;} ! case 643: ! #line 2980 "objc-parse.y" ! { /* Forget protocol qualifiers here. */ objc_pq_context = 0; if (objc_inherit_code == CLASS_METHOD_DECL) add_class_method (objc_interface_context, yyvsp[0].ttype); else add_instance_method (objc_interface_context, yyvsp[0].ttype); ! ; ! break;} ! case 645: ! #line 2993 "objc-parse.y" ! { yyval.ttype = build_method_decl (objc_inherit_code, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ! ; ! break;} ! case 646: ! #line 2998 "objc-parse.y" ! { yyval.ttype = build_method_decl (objc_inherit_code, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ! ; ! break;} ! case 647: ! #line 3003 "objc-parse.y" ! { yyval.ttype = build_method_decl (objc_inherit_code, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ! ; ! break;} ! case 648: ! #line 3008 "objc-parse.y" ! { yyval.ttype = build_method_decl (objc_inherit_code, NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ! ; ! break;} ! case 657: ! #line 3038 "objc-parse.y" ! { POP_DECLSPEC_STACK; ; ! break;} ! case 658: ! #line 3040 "objc-parse.y" ! { shadow_tag (yyvsp[-1].ttype); ; ! break;} ! case 659: ! #line 3042 "objc-parse.y" ! { pedwarn ("empty declaration"); ; ! break;} ! case 660: ! #line 3047 "objc-parse.y" ! { push_parm_decl (yyvsp[0].ttype); ; ! break;} ! case 661: ! #line 3049 "objc-parse.y" ! { push_parm_decl (yyvsp[0].ttype); ; ! break;} ! case 662: ! #line 3057 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ; ! break;} ! case 663: ! #line 3061 "objc-parse.y" ! { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), ! chainon (yyvsp[0].ttype, all_prefix_attributes)); ; ! break;} ! case 664: ! #line 3065 "objc-parse.y" ! { yyval.ttype = yyvsp[0].ttype; ; ! break;} ! case 665: ! #line 3070 "objc-parse.y" ! { yyval.ttype = NULL_TREE; ! ; ! break;} ! case 666: ! #line 3074 "objc-parse.y" ! { /* oh what a kludge! */ yyval.ttype = objc_ellipsis_node; ! ; ! break;} ! case 667: ! #line 3079 "objc-parse.y" ! { pushlevel (0); ! ; ! break;} ! case 668: ! #line 3083 "objc-parse.y" ! { /* returns a tree list node generated by get_parm_info */ yyval.ttype = yyvsp[0].ttype; poplevel (0, 0, 0); ! ; ! break;} ! case 671: ! #line 3098 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ! ; ! break;} ! case 698: ! #line 3120 "objc-parse.y" ! { yyval.ttype = build_keyword_decl (yyvsp[-5].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ! ; ! break;} ! case 699: ! #line 3125 "objc-parse.y" ! { yyval.ttype = build_keyword_decl (yyvsp[-2].ttype, NULL_TREE, yyvsp[0].ttype); ! ; ! break;} ! case 700: ! #line 3130 "objc-parse.y" ! { yyval.ttype = build_keyword_decl (NULL_TREE, yyvsp[-2].ttype, yyvsp[0].ttype); ! ; ! break;} ! case 701: ! #line 3135 "objc-parse.y" ! { yyval.ttype = build_keyword_decl (NULL_TREE, NULL_TREE, yyvsp[0].ttype); ! ; ! break;} ! case 705: ! #line 3148 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ! ; ! break;} ! case 706: ! #line 3156 "objc-parse.y" ! { if (TREE_CHAIN (yyvsp[0].ttype) == NULL_TREE) /* just return the expr., remove a level of indirection */ yyval.ttype = TREE_VALUE (yyvsp[0].ttype); else /* we have a comma expr., we will collapse later */ yyval.ttype = yyvsp[0].ttype; ! ; ! break;} ! case 707: ! #line 3168 "objc-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-2].ttype, yyvsp[0].ttype); ! ; ! break;} ! case 708: ! #line 3172 "objc-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ! ; ! break;} ! case 710: ! #line 3180 "objc-parse.y" ! { yyval.ttype = get_class_reference (yyvsp[0].ttype); ! ; ! break;} ! case 711: ! #line 3187 "objc-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-2].ttype, yyvsp[-1].ttype); ; ! break;} ! case 715: ! #line 3198 "objc-parse.y" ! { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ! ; ! break;} ! case 716: ! #line 3205 "objc-parse.y" ! { yyval.ttype = build_tree_list (yyvsp[-1].ttype, NULL_TREE); ! ; ! break;} ! case 717: ! #line 3209 "objc-parse.y" ! { yyval.ttype = build_tree_list (NULL_TREE, NULL_TREE); ! ; ! break;} ! case 718: ! #line 3216 "objc-parse.y" ! { yyval.ttype = yyvsp[-1].ttype; ! ; ! break;} ! case 719: ! #line 3223 "objc-parse.y" ! { yyval.ttype = yyvsp[-1].ttype; ! ; ! break;} ! case 720: ! #line 3232 "objc-parse.y" ! { yyval.ttype = groktypename (yyvsp[-1].ttype); ! ; ! break;} ! } ! #line 705 "/usr/share/bison/bison.simple" yyvsp -= yylen; yyssp -= yylen; + #if YYLSP_NEEDED + yylsp -= yylen; + #endif ! #if YYDEBUG ! if (yydebug) ! { ! short *yyssp1 = yyss - 1; ! YYFPRINTF (stderr, "state stack now"); ! while (yyssp1 != yyssp) ! YYFPRINTF (stderr, " %d", *++yyssp1); ! YYFPRINTF (stderr, "\n"); ! } ! #endif *++yyvsp = yyval; ! #if YYLSP_NEEDED ! *++yylsp = yyloc; ! #endif /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule *************** yyreduce: *** 6536,6546 **** yyn = yyr1[yyn]; ! yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; ! if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else ! yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; --- 5777,5787 ---- yyn = yyr1[yyn]; ! yystate = yypgoto[yyn - YYNTBASE] + *yyssp; ! if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else ! yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; *************** yyerrlab: *** 6553,6565 **** if (!yyerrstatus) { ++yynerrs; ! #if YYERROR_VERBOSE yyn = yypact[yystate]; ! if (YYPACT_NINF < yyn && yyn < YYLAST) { YYSIZE_T yysize = 0; - int yytype = YYTRANSLATE (yychar); char *yymsg; int yyx, yycount; --- 5794,5806 ---- if (!yyerrstatus) { ++yynerrs; ! ! #ifdef YYERROR_VERBOSE yyn = yypact[yystate]; ! if (yyn > YYFLAG && yyn < YYLAST) { YYSIZE_T yysize = 0; char *yymsg; int yyx, yycount; *************** yyerrlab: *** 6568,6582 **** YYCHECK. */ for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) ! if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) yysize += yystrlen (yytname[yyx]) + 15, yycount++; ! yysize += yystrlen ("syntax error, unexpected ") + 1; ! yysize += yystrlen (yytname[yytype]); yymsg = (char *) YYSTACK_ALLOC (yysize); if (yymsg != 0) { ! char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); ! yyp = yystpcpy (yyp, yytname[yytype]); if (yycount < 5) { --- 5809,5823 ---- YYCHECK. */ for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) ! if (yycheck[yyx + yyn] == yyx) yysize += yystrlen (yytname[yyx]) + 15, yycount++; ! yysize += yystrlen ("parse error, unexpected ") + 1; ! yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); yymsg = (char *) YYSTACK_ALLOC (yysize); if (yymsg != 0) { ! char *yyp = yystpcpy (yymsg, "parse error, unexpected "); ! yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); if (yycount < 5) { *************** yyerrlab: *** 6584,6590 **** for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) ! if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { const char *yyq = ! yycount ? ", expecting " : " or "; yyp = yystpcpy (yyp, yyq); --- 5825,5831 ---- for (yyx = yyn < 0 ? -yyn : 0; yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) ! if (yycheck[yyx + yyn] == yyx) { const char *yyq = ! yycount ? ", expecting " : " or "; yyp = yystpcpy (yyp, yyq); *************** yyerrlab: *** 6596,6687 **** YYSTACK_FREE (yymsg); } else ! yyerror ("syntax error; also virtual memory exhausted"); } else ! #endif /* YYERROR_VERBOSE */ ! yyerror ("syntax error"); } ! if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ ! /* Return failure if at end of input. */ if (yychar == YYEOF) ! { ! /* Pop the error token. */ ! YYPOPSTACK; ! /* Pop the rest of the stack. */ ! while (yyss < yyssp) ! { ! YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); ! yydestruct (yystos[*yyssp], yyvsp); ! YYPOPSTACK; ! } ! YYABORT; ! } ! ! YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); ! yydestruct (yytoken, &yylval); yychar = YYEMPTY; - } /* Else will try to reuse lookahead token after shifting the error token. */ - goto yyerrlab2; ! /*----------------------------------------------------. ! | yyerrlab1 -- error raised explicitly by an action. | ! `----------------------------------------------------*/ ! yyerrlab1: - /* Suppress GCC warning that yyerrlab1 is unused when no action - invokes YYERROR. */ - #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) - __attribute__ ((__unused__)); - #endif ! goto yyerrlab2; /*---------------------------------------------------------------. ! | yyerrlab2 -- pop states until the error token can be shifted. | `---------------------------------------------------------------*/ ! yyerrlab2: ! yyerrstatus = 3; /* Each real token shifted decrements this. */ ! for (;;) { ! yyn = yypact[yystate]; ! if (yyn != YYPACT_NINF) ! { ! yyn += YYTERROR; ! if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) ! { ! yyn = yytable[yyn]; ! if (0 < yyn) ! break; ! } ! } ! /* Pop the current state because it cannot handle the error token. */ ! if (yyssp == yyss) ! YYABORT; ! YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); ! yydestruct (yystos[yystate], yyvsp); ! yyvsp--; ! yystate = *--yyssp; ! YY_STACK_PRINT (yyss, yyssp); } if (yyn == YYFINAL) YYACCEPT; --- 5837,5938 ---- YYSTACK_FREE (yymsg); } else ! yyerror ("parse error; also virtual memory exhausted"); } else ! #endif /* defined (YYERROR_VERBOSE) */ ! yyerror ("parse error"); } + goto yyerrlab1; ! /*--------------------------------------------------. ! | yyerrlab1 -- error raised explicitly by an action | ! `--------------------------------------------------*/ ! yyerrlab1: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ ! /* return failure if at end of input */ if (yychar == YYEOF) ! YYABORT; ! YYDPRINTF ((stderr, "Discarding token %d (%s).\n", ! yychar, yytname[yychar1])); yychar = YYEMPTY; } /* Else will try to reuse lookahead token after shifting the error token. */ + yyerrstatus = 3; /* Each real token shifted decrements this */ ! goto yyerrhandle; + /*-------------------------------------------------------------------. + | yyerrdefault -- current state does not do anything special for the | + | error token. | + `-------------------------------------------------------------------*/ + yyerrdefault: + #if 0 + /* This is wrong; only states that explicitly want error tokens + should shift them. */ ! /* If its default is to accept any token, ok. Otherwise pop it. */ ! yyn = yydefact[yystate]; ! if (yyn) ! goto yydefault; ! #endif /*---------------------------------------------------------------. ! | yyerrpop -- pop the current state because it cannot handle the | ! | error token | `---------------------------------------------------------------*/ ! yyerrpop: ! if (yyssp == yyss) ! YYABORT; ! yyvsp--; ! yystate = *--yyssp; ! #if YYLSP_NEEDED ! yylsp--; ! #endif ! #if YYDEBUG ! if (yydebug) { ! short *yyssp1 = yyss - 1; ! YYFPRINTF (stderr, "Error: state stack now"); ! while (yyssp1 != yyssp) ! YYFPRINTF (stderr, " %d", *++yyssp1); ! YYFPRINTF (stderr, "\n"); ! } ! #endif ! /*--------------. ! | yyerrhandle. | ! `--------------*/ ! yyerrhandle: ! yyn = yypact[yystate]; ! if (yyn == YYFLAG) ! goto yyerrdefault; ! yyn += YYTERROR; ! if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) ! goto yyerrdefault; ! yyn = yytable[yyn]; ! if (yyn < 0) ! { ! if (yyn == YYFLAG) ! goto yyerrpop; ! yyn = -yyn; ! goto yyreduce; } + else if (yyn == 0) + goto yyerrpop; if (yyn == YYFINAL) YYACCEPT; *************** yyerrlab2: *** 6689,6695 **** YYDPRINTF ((stderr, "Shifting error token, ")); *++yyvsp = yylval; ! yystate = yyn; goto yynewstate; --- 5940,5948 ---- YYDPRINTF ((stderr, "Shifting error token, ")); *++yyvsp = yylval; ! #if YYLSP_NEEDED ! *++yylsp = yylloc; ! #endif yystate = yyn; goto yynewstate; *************** yyabortlab: *** 6709,6723 **** yyresult = 1; goto yyreturn; ! #ifndef yyoverflow ! /*----------------------------------------------. ! | yyoverflowlab -- parser overflow comes here. | ! `----------------------------------------------*/ yyoverflowlab: yyerror ("parser stack overflow"); yyresult = 2; /* Fall through. */ - #endif yyreturn: #ifndef yyoverflow --- 5962,5974 ---- yyresult = 1; goto yyreturn; ! /*---------------------------------------------. ! | yyoverflowab -- parser overflow comes here. | ! `---------------------------------------------*/ yyoverflowlab: yyerror ("parser stack overflow"); yyresult = 2; /* Fall through. */ yyreturn: #ifndef yyoverflow *************** yyreturn: *** 6726,6734 **** #endif return yyresult; } ! ! ! #line 3207 "objc-parse.y" /* yylex() is a thin wrapper around c_lex(), all it does is translate --- 5977,5983 ---- #endif return yyresult; } ! #line 3237 "objc-parse.y" /* yylex() is a thin wrapper around c_lex(), all it does is translate *************** struct resword *** 6746,6756 **** /* Disable mask. Keywords are disabled if (reswords[i].disable & mask) is _true_. */ ! #define D_TRAD 0x01 /* not in traditional C */ ! #define D_C89 0x02 /* not in C89 */ ! #define D_EXT 0x04 /* GCC extension */ ! #define D_EXT89 0x08 /* GCC extension incorporated in C99 */ ! #define D_OBJC 0x10 /* Objective C only */ static const struct resword reswords[] = { --- 5995,6004 ---- /* Disable mask. Keywords are disabled if (reswords[i].disable & mask) is _true_. */ ! #define D_C89 0x01 /* not in C89 */ ! #define D_EXT 0x02 /* GCC extension */ ! #define D_EXT89 0x04 /* GCC extension incorporated in C99 */ ! #define D_OBJC 0x08 /* Objective C only */ static const struct resword reswords[] = { *************** static const struct resword reswords[] = *** 6792,6797 **** --- 6040,6046 ---- { "__restrict__", RID_RESTRICT, 0 }, { "__signed", RID_SIGNED, 0 }, { "__signed__", RID_SIGNED, 0 }, + { "__thread", RID_THREAD, 0 }, { "__typeof", RID_TYPEOF, 0 }, { "__typeof__", RID_TYPEOF, 0 }, { "__unbounded", RID_UNBOUNDED, 0 }, *************** static const struct resword reswords[] = *** 6803,6809 **** { "break", RID_BREAK, 0 }, { "case", RID_CASE, 0 }, { "char", RID_CHAR, 0 }, ! { "const", RID_CONST, D_TRAD }, { "continue", RID_CONTINUE, 0 }, { "default", RID_DEFAULT, 0 }, { "do", RID_DO, 0 }, --- 6052,6058 ---- { "break", RID_BREAK, 0 }, { "case", RID_CASE, 0 }, { "char", RID_CHAR, 0 }, ! { "const", RID_CONST, 0 }, { "continue", RID_CONTINUE, 0 }, { "default", RID_DEFAULT, 0 }, { "do", RID_DO, 0 }, *************** static const struct resword reswords[] = *** 6815,6838 **** { "for", RID_FOR, 0 }, { "goto", RID_GOTO, 0 }, { "if", RID_IF, 0 }, ! { "inline", RID_INLINE, D_TRAD|D_EXT89 }, { "int", RID_INT, 0 }, { "long", RID_LONG, 0 }, { "register", RID_REGISTER, 0 }, ! { "restrict", RID_RESTRICT, D_TRAD|D_C89 }, { "return", RID_RETURN, 0 }, { "short", RID_SHORT, 0 }, ! { "signed", RID_SIGNED, D_TRAD }, { "sizeof", RID_SIZEOF, 0 }, { "static", RID_STATIC, 0 }, { "struct", RID_STRUCT, 0 }, { "switch", RID_SWITCH, 0 }, { "typedef", RID_TYPEDEF, 0 }, ! { "typeof", RID_TYPEOF, D_TRAD|D_EXT }, { "union", RID_UNION, 0 }, { "unsigned", RID_UNSIGNED, 0 }, { "void", RID_VOID, 0 }, ! { "volatile", RID_VOLATILE, D_TRAD }, { "while", RID_WHILE, 0 }, { "id", RID_ID, D_OBJC }, --- 6064,6087 ---- { "for", RID_FOR, 0 }, { "goto", RID_GOTO, 0 }, { "if", RID_IF, 0 }, ! { "inline", RID_INLINE, D_EXT89 }, { "int", RID_INT, 0 }, { "long", RID_LONG, 0 }, { "register", RID_REGISTER, 0 }, ! { "restrict", RID_RESTRICT, D_C89 }, { "return", RID_RETURN, 0 }, { "short", RID_SHORT, 0 }, ! { "signed", RID_SIGNED, 0 }, { "sizeof", RID_SIZEOF, 0 }, { "static", RID_STATIC, 0 }, { "struct", RID_STRUCT, 0 }, { "switch", RID_SWITCH, 0 }, { "typedef", RID_TYPEDEF, 0 }, ! { "typeof", RID_TYPEOF, D_EXT }, { "union", RID_UNION, 0 }, { "unsigned", RID_UNSIGNED, 0 }, { "void", RID_VOID, 0 }, ! { "volatile", RID_VOLATILE, 0 }, { "while", RID_WHILE, 0 }, { "id", RID_ID, D_OBJC }, *************** static const struct resword reswords[] = *** 6867,6873 **** three languages. */ static const short rid_to_yy[RID_MAX] = { ! /* RID_STATIC */ SCSPEC, /* RID_UNSIGNED */ TYPESPEC, /* RID_LONG */ TYPESPEC, /* RID_CONST */ TYPE_QUAL, --- 6116,6122 ---- three languages. */ static const short rid_to_yy[RID_MAX] = { ! /* RID_STATIC */ STATIC, /* RID_UNSIGNED */ TYPESPEC, /* RID_LONG */ TYPESPEC, /* RID_CONST */ TYPE_QUAL, *************** static const short rid_to_yy[RID_MAX] = *** 6885,6890 **** --- 6134,6140 ---- /* RID_BOUNDED */ TYPE_QUAL, /* RID_UNBOUNDED */ TYPE_QUAL, /* RID_COMPLEX */ TYPESPEC, + /* RID_THREAD */ SCSPEC, /* C++ */ /* RID_FRIEND */ 0, *************** static const short rid_to_yy[RID_MAX] = *** 6900,6906 **** /* RID_BYCOPY */ TYPE_QUAL, /* RID_BYREF */ TYPE_QUAL, /* RID_ONEWAY */ TYPE_QUAL, ! /* C */ /* RID_INT */ TYPESPEC, /* RID_CHAR */ TYPESPEC, --- 6150,6156 ---- /* RID_BYCOPY */ TYPE_QUAL, /* RID_BYREF */ TYPE_QUAL, /* RID_ONEWAY */ TYPE_QUAL, ! /* C */ /* RID_INT */ TYPESPEC, /* RID_CHAR */ TYPESPEC, *************** static const short rid_to_yy[RID_MAX] = *** 6974,6992 **** /* RID_REINTCAST */ 0, /* RID_STATCAST */ 0, - /* alternate spellings */ - /* RID_AND */ 0, - /* RID_AND_EQ */ 0, - /* RID_NOT */ 0, - /* RID_NOT_EQ */ 0, - /* RID_OR */ 0, - /* RID_OR_EQ */ 0, - /* RID_XOR */ 0, - /* RID_XOR_EQ */ 0, - /* RID_BITAND */ 0, - /* RID_BITOR */ 0, - /* RID_COMPL */ 0, - /* Objective C */ /* RID_ID */ OBJECTNAME, /* RID_AT_ENCODE */ ENCODE, --- 6224,6229 ---- *************** init_reswords () *** 7009,7018 **** unsigned int i; tree id; int mask = (flag_isoc99 ? 0 : D_C89) - | (flag_traditional ? D_TRAD : 0) | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0); ! if (c_language != clk_objective_c) mask |= D_OBJC; /* It is not necessary to register ridpointers as a GC root, because --- 6246,6254 ---- unsigned int i; tree id; int mask = (flag_isoc99 ? 0 : D_C89) | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0); ! if (!flag_objc) mask |= D_OBJC; /* It is not necessary to register ridpointers as a GC root, because *************** static int *** 7067,7076 **** yylexname () { tree decl; ! int objc_force_identifier = objc_need_raw_identifier; OBJC_NEED_RAW_IDENTIFIER (0); ! if (C_IS_RESERVED_WORD (yylval.ttype)) { enum rid rid_code = C_RID_CODE (yylval.ttype); --- 6303,6312 ---- yylexname () { tree decl; ! int objc_force_identifier = objc_need_raw_identifier; OBJC_NEED_RAW_IDENTIFIER (0); ! if (C_IS_RESERVED_WORD (yylval.ttype)) { enum rid rid_code = C_RID_CODE (yylval.ttype); *************** yylexname () *** 7093,7105 **** /* __FUNCTION__ and __PRETTY_FUNCTION__ get converted to string constants. */ const char *name = fname_string (rid_code); ! yylval.ttype = build_string (strlen (name) + 1, name); C_ARTIFICIAL_STRING_P (yylval.ttype) = 1; last_token = CPP_STRING; /* so yyerror won't choke */ return STRING; } ! /* Return the canonical spelling for this keyword. */ yylval.ttype = ridpointers[(int) rid_code]; return yycode; --- 6329,6341 ---- /* __FUNCTION__ and __PRETTY_FUNCTION__ get converted to string constants. */ const char *name = fname_string (rid_code); ! yylval.ttype = build_string (strlen (name) + 1, name); C_ARTIFICIAL_STRING_P (yylval.ttype) = 1; last_token = CPP_STRING; /* so yyerror won't choke */ return STRING; } ! /* Return the canonical spelling for this keyword. */ yylval.ttype = ridpointers[(int) rid_code]; return yycode; *************** yylexname () *** 7117,7124 **** tree objc_interface_decl = is_class_name (yylval.ttype); /* ObjC class names are in the same namespace as variables and typedefs, and hence are shadowed by local declarations. */ ! if (objc_interface_decl ! && (global_bindings_p () || (!objc_force_identifier && !decl))) { yylval.ttype = objc_interface_decl; --- 6353,6360 ---- tree objc_interface_decl = is_class_name (yylval.ttype); /* ObjC class names are in the same namespace as variables and typedefs, and hence are shadowed by local declarations. */ ! if (objc_interface_decl ! && (global_bindings_p () || (!objc_force_identifier && !decl))) { yylval.ttype = objc_interface_decl; *************** yylexname () *** 7129,7134 **** --- 6365,6409 ---- return IDENTIFIER; } + /* Concatenate strings before returning them to the parser. This isn't quite + as good as having it done in the lexer, but it's better than nothing. */ + + static int + yylexstring () + { + enum cpp_ttype next_type; + tree orig = yylval.ttype; + + next_type = c_lex (&yylval.ttype); + if (next_type == CPP_STRING + || next_type == CPP_WSTRING + || (next_type == CPP_NAME && yylexname () == STRING)) + { + varray_type strings; + + + VARRAY_TREE_INIT (strings, 32, "strings"); + VARRAY_PUSH_TREE (strings, orig); + + do + { + VARRAY_PUSH_TREE (strings, yylval.ttype); + next_type = c_lex (&yylval.ttype); + } + while (next_type == CPP_STRING + || next_type == CPP_WSTRING + || (next_type == CPP_NAME && yylexname () == STRING)); + + yylval.ttype = combine_strings (strings); + } + else + yylval.ttype = orig; + + /* We will have always read one token too many. */ + _cpp_backup_tokens (parse_in, 1); + + return STRING; + } static inline int _yylex () *************** _yylex () *** 7195,7201 **** return 0; case CPP_NAME: ! return yylexname (); case CPP_NUMBER: case CPP_CHAR: --- 6470,6482 ---- return 0; case CPP_NAME: ! { ! int ret = yylexname (); ! if (ret == STRING) ! return yylexstring (); ! else ! return ret; ! } case CPP_NUMBER: case CPP_CHAR: *************** _yylex () *** 7204,7211 **** case CPP_STRING: case CPP_WSTRING: ! return STRING; ! /* This token is Objective-C specific. It gives the next token special significance. */ case CPP_ATSIGN: --- 6485,6492 ---- case CPP_STRING: case CPP_WSTRING: ! return yylexstring (); ! /* This token is Objective-C specific. It gives the next token special significance. */ case CPP_ATSIGN: *************** yylex() *** 7258,7278 **** return r; } - /* Sets the value of the 'yydebug' variable to VALUE. - This is a function so we don't have to have YYDEBUG defined - in order to build the compiler. */ - - void - c_set_yydebug (value) - int value; - { - #if YYDEBUG != 0 - yydebug = value; - #else - warning ("YYDEBUG not defined"); - #endif - } - /* Function used when yydebug is set, to print a token in more detail. */ static void --- 6539,6544 ---- *************** yyprint (file, yychar, yyl) *** 7284,7290 **** tree t = yyl.ttype; fprintf (file, " [%s]", NAME(last_token)); ! switch (yychar) { case IDENTIFIER: --- 6550,6556 ---- tree t = yyl.ttype; fprintf (file, " [%s]", NAME(last_token)); ! switch (yychar) { case IDENTIFIER: *************** yyprint (file, yychar, yyl) *** 7293,7298 **** --- 6559,6565 ---- case TYPESPEC: case TYPE_QUAL: case SCSPEC: + case STATIC: if (IDENTIFIER_POINTER (t)) fprintf (file, " `%s'", IDENTIFIER_POINTER (t)); break; *************** yyprint (file, yychar, yyl) *** 7326,7350 **** /* This is not the ideal place to put these, but we have to get them out of c-lex.c because cp/lex.c has its own versions. */ ! /* Return something to represent absolute declarators containing a *. ! TARGET is the absolute declarator that the * contains. ! TYPE_QUALS_ATTRS is a list of modifiers such as const or volatile ! to apply to the pointer type, represented as identifiers, possible mixed ! with attributes. ! ! We return an INDIRECT_REF whose "contents" are TARGET (inside a TREE_LIST, ! if attributes are present) and whose type is the modifier list. */ ! tree ! make_pointer_declarator (type_quals_attrs, target) ! tree type_quals_attrs, target; { ! tree quals, attrs; ! tree itarget = target; ! split_specs_attrs (type_quals_attrs, &quals, &attrs); ! if (attrs != NULL_TREE) ! itarget = tree_cons (attrs, target, NULL_TREE); ! return build1 (INDIRECT_REF, quals, itarget); } ! --- 6593,6608 ---- /* This is not the ideal place to put these, but we have to get them out of c-lex.c because cp/lex.c has its own versions. */ ! /* Free malloced parser stacks if necessary. */ ! void ! free_parser_stacks () { ! if (malloced_yyss) ! { ! free (malloced_yyss); ! free (malloced_yyvs); ! } } ! #include "gt-c-parse.h" diff -Nrc3pad gcc-3.2.3/gcc/objc/objc-parse.y gcc-3.3/gcc/objc/objc-parse.y *** gcc-3.2.3/gcc/objc/objc-parse.y 2003-04-22 08:19:11.000000000 +0000 --- gcc-3.3/gcc/objc/objc-parse.y 2003-05-14 01:01:42.000000000 +0000 *************** *** 1,7 **** /*WARNING: This file is automatically generated!*/ /* YACC parser for C syntax and for Objective C. -*-c-*- Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, ! 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GCC. --- 1,7 ---- /*WARNING: This file is automatically generated!*/ /* YACC parser for C syntax and for Objective C. -*-c-*- Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, ! 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GCC. *************** Software Foundation, 59 Temple Place - S *** 38,51 **** #include "cpplib.h" #include "intl.h" #include "timevar.h" ! #include "c-lex.h" #include "c-tree.h" - #include "c-pragma.h" #include "flags.h" #include "output.h" #include "toplev.h" #include "ggc.h" ! #ifdef MULTIBYTE_CHARS #include #endif --- 38,50 ---- #include "cpplib.h" #include "intl.h" #include "timevar.h" ! #include "c-pragma.h" /* For YYDEBUG definition, and parse_in. */ #include "c-tree.h" #include "flags.h" #include "output.h" #include "toplev.h" #include "ggc.h" ! #ifdef MULTIBYTE_CHARS #include #endif *************** Software Foundation, 59 Temple Place - S *** 55,65 **** /* Like YYERROR but do call yyerror. */ #define YYERROR1 { yyerror ("syntax error"); YYERROR; } ! /* Cause the "yydebug" variable to be defined. */ ! #define YYDEBUG 1 ! /* Rename the "yyparse" function so that we can override it elsewhere. */ ! #define yyparse yyparse_1 %} %start program --- 54,101 ---- /* Like YYERROR but do call yyerror. */ #define YYERROR1 { yyerror ("syntax error"); YYERROR; } ! /* Like the default stack expander, except (1) use realloc when possible, ! (2) impose no hard maxiumum on stack size, (3) REALLY do not use alloca. ! Irritatingly, YYSTYPE is defined after this %{ %} block, so we cannot ! give malloced_yyvs its proper type. This is ok since all we need from ! it is to be able to free it. */ ! ! static short *malloced_yyss; ! static void *malloced_yyvs; ! ! #define yyoverflow(MSG, SS, SSSIZE, VS, VSSIZE, YYSSZ) \ ! do { \ ! size_t newsize; \ ! short *newss; \ ! YYSTYPE *newvs; \ ! newsize = *(YYSSZ) *= 2; \ ! if (malloced_yyss) \ ! { \ ! newss = (short *) \ ! really_call_realloc (*(SS), newsize * sizeof (short)); \ ! newvs = (YYSTYPE *) \ ! really_call_realloc (*(VS), newsize * sizeof (YYSTYPE)); \ ! } \ ! else \ ! { \ ! newss = (short *) really_call_malloc (newsize * sizeof (short)); \ ! newvs = (YYSTYPE *) really_call_malloc (newsize * sizeof (YYSTYPE)); \ ! if (newss) \ ! memcpy (newss, *(SS), (SSSIZE)); \ ! if (newvs) \ ! memcpy (newvs, *(VS), (VSSIZE)); \ ! } \ ! if (!newss || !newvs) \ ! { \ ! yyerror (MSG); \ ! return 2; \ ! } \ ! *(SS) = newss; \ ! *(VS) = newvs; \ ! malloced_yyss = newss; \ ! malloced_yyvs = (void *) newvs; \ ! } while (0) %} %start program *************** Software Foundation, 59 Temple Place - S *** 78,84 **** /* Reserved words that specify storage class. yylval contains an IDENTIFIER_NODE which indicates which one. */ ! %token SCSPEC /* Reserved words that specify type. yylval contains an IDENTIFIER_NODE which indicates which one. */ --- 114,121 ---- /* Reserved words that specify storage class. yylval contains an IDENTIFIER_NODE which indicates which one. */ ! %token SCSPEC /* Storage class other than static. */ ! %token STATIC /* Static storage class. */ /* Reserved words that specify type. yylval contains an IDENTIFIER_NODE which indicates which one. */ *************** Software Foundation, 59 Temple Place - S *** 144,150 **** %type BREAK CONTINUE RETURN GOTO ASM_KEYWORD SIZEOF TYPEOF ALIGNOF %type identifier IDENTIFIER TYPENAME CONSTANT expr nonnull_exprlist exprlist ! %type expr_no_commas cast_expr unary_expr primary string STRING %type declspecs_nosc_nots_nosa_noea declspecs_nosc_nots_nosa_ea %type declspecs_nosc_nots_sa_noea declspecs_nosc_nots_sa_ea %type declspecs_nosc_ts_nosa_noea declspecs_nosc_ts_nosa_ea --- 181,187 ---- %type BREAK CONTINUE RETURN GOTO ASM_KEYWORD SIZEOF TYPEOF ALIGNOF %type identifier IDENTIFIER TYPENAME CONSTANT expr nonnull_exprlist exprlist ! %type expr_no_commas cast_expr unary_expr primary STRING %type declspecs_nosc_nots_nosa_noea declspecs_nosc_nots_nosa_ea %type declspecs_nosc_nots_sa_noea declspecs_nosc_nots_sa_ea %type declspecs_nosc_ts_nosa_noea declspecs_nosc_ts_nosa_ea *************** Software Foundation, 59 Temple Place - S *** 160,166 **** %type typespec_reserved_nonattr typespec_reserved_attr %type typespec_nonreserved_nonattr ! %type SCSPEC TYPESPEC TYPE_QUAL maybe_type_qual %type initdecls notype_initdecls initdcl notype_initdcl %type init maybeasm %type asm_operands nonnull_asm_operands asm_operand asm_clobbers --- 197,203 ---- %type typespec_reserved_nonattr typespec_reserved_attr %type typespec_nonreserved_nonattr ! %type scspec SCSPEC STATIC TYPESPEC TYPE_QUAL maybe_type_qual %type initdecls notype_initdecls initdcl notype_initdcl %type init maybeasm %type asm_operands nonnull_asm_operands asm_operand asm_clobbers *************** Software Foundation, 59 Temple Place - S *** 209,236 **** %type CLASSNAME OBJECTNAME %{ ! /* Number of statements (loosely speaking) and compound statements seen so far. */ static int stmt_count; static int compstmt_count; ! /* Input file and line number of the end of the body of last simple_if; used by the stmt-rule immediately after simple_if returns. */ static const char *if_stmt_file; static int if_stmt_line; /* List of types and structure classes of the current declaration. */ ! static tree current_declspecs = NULL_TREE; ! static tree prefix_attributes = NULL_TREE; /* List of all the attributes applying to the identifier currently being declared; includes prefix_attributes and possibly some more attributes just after a comma. */ ! static tree all_prefix_attributes = NULL_TREE; /* Stack of saved values of current_declspecs, prefix_attributes and all_prefix_attributes. */ ! static tree declspec_stack; /* PUSH_DECLSPEC_STACK is called from setspecs; POP_DECLSPEC_STACK should be called from the productions making use of setspecs. */ --- 246,273 ---- %type CLASSNAME OBJECTNAME %{ ! /* Number of statements (loosely speaking) and compound statements seen so far. */ static int stmt_count; static int compstmt_count; ! /* Input file and line number of the end of the body of last simple_if; used by the stmt-rule immediately after simple_if returns. */ static const char *if_stmt_file; static int if_stmt_line; /* List of types and structure classes of the current declaration. */ ! static GTY(()) tree current_declspecs; ! static GTY(()) tree prefix_attributes; /* List of all the attributes applying to the identifier currently being declared; includes prefix_attributes and possibly some more attributes just after a comma. */ ! static GTY(()) tree all_prefix_attributes; /* Stack of saved values of current_declspecs, prefix_attributes and all_prefix_attributes. */ ! static GTY(()) tree declspec_stack; /* PUSH_DECLSPEC_STACK is called from setspecs; POP_DECLSPEC_STACK should be called from the productions making use of setspecs. */ *************** static tree declspec_stack; *** 252,268 **** /* For __extension__, save/restore the warning flags which are controlled by __extension__. */ ! #define SAVE_WARN_FLAGS() \ size_int (pedantic \ | (warn_pointer_arith << 1) \ ! | (warn_traditional << 2)) ! #define RESTORE_WARN_FLAGS(tval) \ do { \ int val = tree_low_cst (tval, 0); \ pedantic = val & 1; \ warn_pointer_arith = (val >> 1) & 1; \ warn_traditional = (val >> 2) & 1; \ } while (0) /* Objective-C specific parser/lexer information */ --- 289,307 ---- /* For __extension__, save/restore the warning flags which are controlled by __extension__. */ ! #define SAVE_EXT_FLAGS() \ size_int (pedantic \ | (warn_pointer_arith << 1) \ ! | (warn_traditional << 2) \ ! | (flag_iso << 3)) ! #define RESTORE_EXT_FLAGS(tval) \ do { \ int val = tree_low_cst (tval, 0); \ pedantic = val & 1; \ warn_pointer_arith = (val >> 1) & 1; \ warn_traditional = (val >> 2) & 1; \ + flag_iso = (val >> 3) & 1; \ } while (0) /* Objective-C specific parser/lexer information */ *************** static enum tree_code objc_inherit_code; *** 271,283 **** static int objc_pq_context = 0, objc_public_flag = 0; /* The following flag is needed to contextualize ObjC lexical analysis. ! In some cases (e.g., 'int NSObject;'), it is undesirable to bind ! an identifier to an ObjC class, even if a class with that name exists. */ static int objc_need_raw_identifier; #define OBJC_NEED_RAW_IDENTIFIER(VAL) objc_need_raw_identifier = VAL /* Tell yyparse how to print a token's value, if yydebug is set. */ #define YYPRINT(FILE,YYCHAR,YYLVAL) yyprint(FILE,YYCHAR,YYLVAL) --- 310,324 ---- static int objc_pq_context = 0, objc_public_flag = 0; /* The following flag is needed to contextualize ObjC lexical analysis. ! In some cases (e.g., 'int NSObject;'), it is undesirable to bind ! an identifier to an ObjC class, even if a class with that name exists. */ static int objc_need_raw_identifier; #define OBJC_NEED_RAW_IDENTIFIER(VAL) objc_need_raw_identifier = VAL + static bool parsing_iso_function_signature; + /* Tell yyparse how to print a token's value, if yydebug is set. */ #define YYPRINT(FILE,YYCHAR,YYLVAL) yyprint(FILE,YYCHAR,YYLVAL) *************** static int objc_need_raw_identifier; *** 285,304 **** static void yyprint PARAMS ((FILE *, int, YYSTYPE)); static void yyerror PARAMS ((const char *)); static int yylexname PARAMS ((void)); static inline int _yylex PARAMS ((void)); static int yylex PARAMS ((void)); static void init_reswords PARAMS ((void)); ! /* Add GC roots for variables local to this file. */ void c_parse_init () { init_reswords (); - - ggc_add_tree_root (&declspec_stack, 1); - ggc_add_tree_root (¤t_declspecs, 1); - ggc_add_tree_root (&prefix_attributes, 1); - ggc_add_tree_root (&all_prefix_attributes, 1); } %} --- 326,341 ---- static void yyprint PARAMS ((FILE *, int, YYSTYPE)); static void yyerror PARAMS ((const char *)); static int yylexname PARAMS ((void)); + static int yylexstring PARAMS ((void)); static inline int _yylex PARAMS ((void)); static int yylex PARAMS ((void)); static void init_reswords PARAMS ((void)); ! /* Initialisation routine for this file. */ void c_parse_init () { init_reswords (); } %} *************** program: /* empty */ *** 315,320 **** --- 352,361 ---- get us back to the global binding level. */ while (! global_bindings_p ()) poplevel (0, 0, 0); + /* __FUNCTION__ is defined at file scope (""). This + call may not be necessary as my tests indicate it + still works without it. */ + finish_fname_decls (); finish_file (); } ; *************** extdefs: *** 329,334 **** --- 370,380 ---- ; extdef: + extdef_1 + { parsing_iso_function_signature = false; } /* Reset after any external definition. */ + ; + + extdef_1: fndef | datadef | objcdef *************** extdef: *** 341,355 **** else error ("argument of `asm' is not a constant string"); } | extension extdef ! { RESTORE_WARN_FLAGS ($1); } ; datadef: setspecs notype_initdecls ';' { if (pedantic) error ("ISO C forbids data definition with no type or storage class"); ! else if (!flag_traditional) ! warning ("data definition has no type or storage class"); POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_initdecls ';' --- 387,401 ---- else error ("argument of `asm' is not a constant string"); } | extension extdef ! { RESTORE_EXT_FLAGS ($1); } ; datadef: setspecs notype_initdecls ';' { if (pedantic) error ("ISO C forbids data definition with no type or storage class"); ! else ! warning ("data definition has no type or storage class"); POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_initdecls ';' *************** fndef: *** 376,382 **** save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $7; DECL_SOURCE_LINE (current_function_decl) = $8; ! finish_function (0, 1); POP_DECLSPEC_STACK; } | declspecs_ts setspecs declarator error { POP_DECLSPEC_STACK; } --- 422,428 ---- save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $7; DECL_SOURCE_LINE (current_function_decl) = $8; ! finish_function (0, 1); POP_DECLSPEC_STACK; } | declspecs_ts setspecs declarator error { POP_DECLSPEC_STACK; } *************** fndef: *** 390,396 **** save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $7; DECL_SOURCE_LINE (current_function_decl) = $8; ! finish_function (0, 1); POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_declarator error { POP_DECLSPEC_STACK; } --- 436,442 ---- save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $7; DECL_SOURCE_LINE (current_function_decl) = $8; ! finish_function (0, 1); POP_DECLSPEC_STACK; } | declspecs_nots setspecs notype_declarator error { POP_DECLSPEC_STACK; } *************** fndef: *** 404,410 **** save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $6; DECL_SOURCE_LINE (current_function_decl) = $7; ! finish_function (0, 1); POP_DECLSPEC_STACK; } | setspecs notype_declarator error { POP_DECLSPEC_STACK; } --- 450,456 ---- save_filename save_lineno compstmt_or_error { DECL_SOURCE_FILE (current_function_decl) = $6; DECL_SOURCE_LINE (current_function_decl) = $7; ! finish_function (0, 1); POP_DECLSPEC_STACK; } | setspecs notype_declarator error { POP_DECLSPEC_STACK; } *************** unary_expr: *** 458,485 **** /* __extension__ turns off -pedantic for following primary. */ | extension cast_expr %prec UNARY { $$ = $2; ! RESTORE_WARN_FLAGS ($1); } | unop cast_expr %prec UNARY { $$ = build_unary_op ($1, $2, 0); overflow_warning ($$); } /* Refer to the address of a label as a pointer. */ | ANDAND identifier { $$ = finish_label_address_expr ($2); } - /* This seems to be impossible on some machines, so let's turn it off. - You can use __builtin_next_arg to find the anonymous stack args. - | '&' ELLIPSIS - { tree types = TYPE_ARG_TYPES (TREE_TYPE (current_function_decl)); - $$ = error_mark_node; - if (TREE_VALUE (tree_last (types)) == void_type_node) - error ("`&...' used in function with fixed number of arguments"); - else - { - if (pedantic) - pedwarn ("ISO C forbids `&...'"); - $$ = tree_last (DECL_ARGUMENTS (current_function_decl)); - $$ = build_unary_op (ADDR_EXPR, $$, 0); - } } - */ | sizeof unary_expr %prec UNARY { skip_evaluation--; if (TREE_CODE ($2) == COMPONENT_REF --- 504,516 ---- /* __extension__ turns off -pedantic for following primary. */ | extension cast_expr %prec UNARY { $$ = $2; ! RESTORE_EXT_FLAGS ($1); } | unop cast_expr %prec UNARY { $$ = build_unary_op ($1, $2, 0); overflow_warning ($$); } /* Refer to the address of a label as a pointer. */ | ANDAND identifier { $$ = finish_label_address_expr ($2); } | sizeof unary_expr %prec UNARY { skip_evaluation--; if (TREE_CODE ($2) == COMPONENT_REF *************** expr_no_commas: *** 546,564 **** | expr_no_commas '^' expr_no_commas { $$ = parser_build_binary_op ($2, $1, $3); } | expr_no_commas ANDAND ! { $1 = truthvalue_conversion (default_conversion ($1)); skip_evaluation += $1 == boolean_false_node; } expr_no_commas { skip_evaluation -= $1 == boolean_false_node; $$ = parser_build_binary_op (TRUTH_ANDIF_EXPR, $1, $4); } | expr_no_commas OROR ! { $1 = truthvalue_conversion (default_conversion ($1)); skip_evaluation += $1 == boolean_true_node; } expr_no_commas { skip_evaluation -= $1 == boolean_true_node; $$ = parser_build_binary_op (TRUTH_ORIF_EXPR, $1, $4); } | expr_no_commas '?' ! { $1 = truthvalue_conversion (default_conversion ($1)); skip_evaluation += $1 == boolean_false_node; } expr ':' { skip_evaluation += (($1 == boolean_true_node) --- 577,598 ---- | expr_no_commas '^' expr_no_commas { $$ = parser_build_binary_op ($2, $1, $3); } | expr_no_commas ANDAND ! { $1 = c_common_truthvalue_conversion ! (default_conversion ($1)); skip_evaluation += $1 == boolean_false_node; } expr_no_commas { skip_evaluation -= $1 == boolean_false_node; $$ = parser_build_binary_op (TRUTH_ANDIF_EXPR, $1, $4); } | expr_no_commas OROR ! { $1 = c_common_truthvalue_conversion ! (default_conversion ($1)); skip_evaluation += $1 == boolean_true_node; } expr_no_commas { skip_evaluation -= $1 == boolean_true_node; $$ = parser_build_binary_op (TRUTH_ORIF_EXPR, $1, $4); } | expr_no_commas '?' ! { $1 = c_common_truthvalue_conversion ! (default_conversion ($1)); skip_evaluation += $1 == boolean_false_node; } expr ':' { skip_evaluation += (($1 == boolean_true_node) *************** expr_no_commas: *** 571,577 **** pedwarn ("ISO C forbids omitting the middle term of a ?: expression"); /* Make sure first operand is calculated only once. */ $2 = save_expr ($1); ! $1 = truthvalue_conversion (default_conversion ($2)); skip_evaluation += $1 == boolean_true_node; } ':' expr_no_commas { skip_evaluation -= $1 == boolean_true_node; --- 605,612 ---- pedwarn ("ISO C forbids omitting the middle term of a ?: expression"); /* Make sure first operand is calculated only once. */ $2 = save_expr ($1); ! $1 = c_common_truthvalue_conversion ! (default_conversion ($2)); skip_evaluation += $1 == boolean_true_node; } ':' expr_no_commas { skip_evaluation -= $1 == boolean_true_node; *************** expr_no_commas: *** 586,592 **** | expr_no_commas ASSIGN expr_no_commas { char class; $$ = build_modify_expr ($1, $2, $3); ! /* This inhibits warnings in truthvalue_conversion. */ class = TREE_CODE_CLASS (TREE_CODE ($$)); if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK); --- 621,628 ---- | expr_no_commas ASSIGN expr_no_commas { char class; $$ = build_modify_expr ($1, $2, $3); ! /* This inhibits warnings in ! c_common_truthvalue_conversion. */ class = TREE_CODE_CLASS (TREE_CODE ($$)); if (IS_EXPR_CODE_CLASS (class)) C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK); *************** primary: *** 601,611 **** $$ = build_external_ref ($1, yychar == '('); } | CONSTANT ! | string ! { $$ = combine_strings ($1); } | VAR_FUNC_NAME { $$ = fname_decl (C_RID_CODE ($$), $$); } ! | '(' typename ')' '{' { start_init (NULL_TREE, NULL, 0); $2 = groktypename ($2); really_start_incremental_init ($2); } --- 637,647 ---- $$ = build_external_ref ($1, yychar == '('); } | CONSTANT ! | STRING ! { $$ = fix_string_type ($$); } | VAR_FUNC_NAME { $$ = fname_decl (C_RID_CODE ($$), $$); } ! | '(' typename ')' '{' { start_init (NULL_TREE, NULL, 0); $2 = groktypename ($2); really_start_incremental_init ($2); } *************** primary: *** 707,721 **** { $$ = build_objc_string_object ($1); } ; - /* Produces a STRING_CST with perhaps more STRING_CSTs chained onto it. */ - string: - STRING - | string STRING - { - $$ = chainon ($1, $2); - } - ; - /* Produces an STRING_CST with perhaps more STRING_CSTs chained onto it, which is to be read as an ObjC string object. */ objc_string: --- 743,748 ---- *************** objc_string: *** 726,738 **** ; old_style_parm_decls: /* empty */ | datadecls - | datadecls ELLIPSIS - /* ... is used here to indicate a varargs function. */ - { c_mark_varargs (); - if (pedantic) - pedwarn ("ISO C does not permit use of `varargs.h'"); } ; /* The following are analogous to lineno_decl, decls and decl --- 753,773 ---- ; old_style_parm_decls: + old_style_parm_decls_1 + { + parsing_iso_function_signature = false; /* Reset after decls. */ + } + ; + + old_style_parm_decls_1: /* empty */ + { + if (warn_traditional && !in_system_header + && parsing_iso_function_signature) + warning ("traditional C rejects ISO C style function definitions"); + parsing_iso_function_signature = false; /* Reset after warning. */ + } | datadecls ; /* The following are analogous to lineno_decl, decls and decl *************** decl: *** 806,817 **** | declspecs ';' { shadow_tag ($1); } | extension decl ! { RESTORE_WARN_FLAGS ($1); } ; /* A list of declaration specifiers. These are: ! - Storage class specifiers (SCSPEC), which for GCC currently include function specifiers ("inline"). - Type specifiers (typespec_*). --- 841,852 ---- | declspecs ';' { shadow_tag ($1); } | extension decl ! { RESTORE_EXT_FLAGS ($1); } ; /* A list of declaration specifiers. These are: ! - Storage class specifiers (scspec), which for GCC currently includes function specifiers ("inline"). - Type specifiers (typespec_*). *************** declspecs_nosc_ts_sa_ea: *** 982,988 **** ; declspecs_sc_nots_nosa_noea: ! SCSPEC { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); TREE_STATIC ($$) = 0; } | declspecs_sc_nots_nosa_noea TYPE_QUAL --- 1017,1023 ---- ; declspecs_sc_nots_nosa_noea: ! scspec { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); TREE_STATIC ($$) = 0; } | declspecs_sc_nots_nosa_noea TYPE_QUAL *************** declspecs_sc_nots_nosa_noea: *** 991,1015 **** | declspecs_sc_nots_nosa_ea TYPE_QUAL { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_nots_nosa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_nots_nosa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_nosa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_nosa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); --- 1026,1050 ---- | declspecs_sc_nots_nosa_ea TYPE_QUAL { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_nots_nosa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_nots_nosa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_nosa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_nosa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); *************** declspecs_sc_nots_sa_noea: *** 1030,1054 **** | declspecs_sc_nots_sa_ea TYPE_QUAL { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_nots_sa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_nots_sa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_sa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_sa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); --- 1065,1089 ---- | declspecs_sc_nots_sa_ea TYPE_QUAL { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_nots_sa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_nots_sa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_sa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_nots_sa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); *************** declspecs_sc_ts_nosa_noea: *** 1081,1105 **** | declspecs_sc_nots_nosa_ea typespec_nonattr { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_ts_nosa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_ts_nosa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_nosa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_nosa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); --- 1116,1140 ---- | declspecs_sc_nots_nosa_ea typespec_nonattr { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_ts_nosa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_ts_nosa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_nosa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_nosa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); *************** declspecs_sc_ts_sa_noea: *** 1144,1168 **** | declspecs_sc_nots_sa_ea typespec_nonattr { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_ts_sa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_ts_sa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_sa_noea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_sa_ea SCSPEC { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); --- 1179,1203 ---- | declspecs_sc_nots_sa_ea typespec_nonattr { $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = 1; } ! | declspecs_nosc_ts_sa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_nosc_ts_sa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_sa_noea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); $$ = tree_cons (NULL_TREE, $2, $1); TREE_STATIC ($$) = TREE_STATIC ($1); } ! | declspecs_sc_ts_sa_ea scspec { if (extra_warnings && TREE_STATIC ($1)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER ($2)); *************** notype_initdecls: *** 1352,1361 **** maybeasm: /* empty */ { $$ = NULL_TREE; } ! | ASM_KEYWORD '(' string ')' ! { if (TREE_CHAIN ($3)) $3 = combine_strings ($3); ! $$ = $3; ! } ; initdcl: --- 1387,1394 ---- maybeasm: /* empty */ { $$ = NULL_TREE; } ! | ASM_KEYWORD '(' STRING ')' ! { $$ = $3; } ; initdcl: *************** initdcl: *** 1370,1376 **** | declarator maybeasm maybe_attribute { tree d = start_decl ($1, current_declspecs, 0, chainon ($3, all_prefix_attributes)); ! finish_decl (d, NULL_TREE, $2); } ; --- 1403,1409 ---- | declarator maybeasm maybe_attribute { tree d = start_decl ($1, current_declspecs, 0, chainon ($3, all_prefix_attributes)); ! finish_decl (d, NULL_TREE, $2); } ; *************** maybe_attribute: *** 1396,1402 **** | attributes { $$ = $1; } ; ! attributes: attribute { $$ = $1; } --- 1429,1435 ---- | attributes { $$ = $1; } ; ! attributes: attribute { $$ = $1; } *************** attribute_list: *** 1415,1421 **** | attribute_list ',' attrib { $$ = chainon ($1, $3); } ; ! attrib: /* empty */ { $$ = NULL_TREE; } --- 1448,1454 ---- | attribute_list ',' attrib { $$ = chainon ($1, $3); } ; ! attrib: /* empty */ { $$ = NULL_TREE; } *************** attrib: *** 1434,1443 **** any_word: identifier ! | SCSPEC | TYPESPEC | TYPE_QUAL ; /* Initializers. `init' is the entry point. */ --- 1467,1481 ---- any_word: identifier ! | scspec | TYPESPEC | TYPE_QUAL ; + + scspec: + STATIC + | SCSPEC + ; /* Initializers. `init' is the entry point. */ *************** designator_list: *** 1500,1508 **** designator: '.' identifier { set_init_label ($2); } ! /* These are for labeled elements. The syntax for an array element ! initializer conflicts with the syntax for an Objective-C message, ! so don't include these productions in the Objective-C grammar. */ ; nested_function: --- 1538,1549 ---- designator: '.' identifier { set_init_label ($2); } ! | '[' expr_no_commas ELLIPSIS expr_no_commas ']' ! { set_init_index ($2, $4); ! if (pedantic) ! pedwarn ("ISO C forbids specifying range of elements to initialize"); } ! | '[' expr_no_commas ']' ! { set_init_index ($2, NULL_TREE); } ; nested_function: *************** nested_function: *** 1517,1522 **** --- 1558,1564 ---- pop_function_context (); YYERROR1; } + parsing_iso_function_signature = false; /* Don't warn about nested functions. */ } old_style_parm_decls { store_parm_decls (); } *************** nested_function: *** 1531,1537 **** DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_LINE (decl) = $6; finish_function (1, 1); ! pop_function_context (); add_decl_stmt (decl); } ; --- 1573,1579 ---- DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_LINE (decl) = $6; finish_function (1, 1); ! pop_function_context (); add_decl_stmt (decl); } ; *************** notype_nested_function: *** 1547,1552 **** --- 1589,1595 ---- pop_function_context (); YYERROR1; } + parsing_iso_function_signature = false; /* Don't warn about nested functions. */ } old_style_parm_decls { store_parm_decls (); } *************** notype_nested_function: *** 1561,1567 **** DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_LINE (decl) = $6; finish_function (1, 1); ! pop_function_context (); add_decl_stmt (decl); } ; --- 1604,1610 ---- DECL_SOURCE_FILE (decl) = $5; DECL_SOURCE_LINE (decl) = $6; finish_function (1, 1); ! pop_function_context (); add_decl_stmt (decl); } ; *************** structsp_attr: *** 1678,1684 **** { $$ = start_struct (RECORD_TYPE, $2); /* Start scope of tag before parsing components. */ } ! component_decl_list '}' maybe_attribute { $$ = finish_struct ($4, $5, chainon ($1, $7)); } | struct_head '{' component_decl_list '}' maybe_attribute { $$ = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), --- 1721,1727 ---- { $$ = start_struct (RECORD_TYPE, $2); /* Start scope of tag before parsing components. */ } ! component_decl_list '}' maybe_attribute { $$ = finish_struct ($4, $5, chainon ($1, $7)); } | struct_head '{' component_decl_list '}' maybe_attribute { $$ = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), *************** component_decl: *** 1766,1773 **** POP_DECLSPEC_STACK; } | declspecs_nosc_ts setspecs save_filename save_lineno { ! /* Support for unnamed structs or unions as members of ! structs or unions (which is [a] useful and [b] supports MS P-SDK). */ if (pedantic) pedwarn ("ISO C doesn't support unnamed structs/unions"); --- 1809,1816 ---- POP_DECLSPEC_STACK; } | declspecs_nosc_ts setspecs save_filename save_lineno { ! /* Support for unnamed structs or unions as members of ! structs or unions (which is [a] useful and [b] supports MS P-SDK). */ if (pedantic) pedwarn ("ISO C doesn't support unnamed structs/unions"); *************** component_decl: *** 1786,1792 **** { $$ = NULL_TREE; } | extension component_decl { $$ = $2; ! RESTORE_WARN_FLAGS ($1); } ; components: --- 1829,1835 ---- { $$ = NULL_TREE; } | extension component_decl { $$ = $2; ! RESTORE_EXT_FLAGS ($1); } ; components: *************** direct_absdcl1: *** 1914,1943 **** /* The [...] part of a declarator for an array type. */ array_declarator: ! '[' expr ']' ! { $$ = build_array_declarator ($2, NULL_TREE, 0, 0); } ! | '[' declspecs_nosc expr ']' { $$ = build_array_declarator ($3, $2, 0, 0); } ! | '[' ']' ! { $$ = build_array_declarator (NULL_TREE, NULL_TREE, 0, 0); } ! | '[' declspecs_nosc ']' { $$ = build_array_declarator (NULL_TREE, $2, 0, 0); } ! | '[' '*' ']' ! { $$ = build_array_declarator (NULL_TREE, NULL_TREE, 0, 1); } ! | '[' declspecs_nosc '*' ']' { $$ = build_array_declarator (NULL_TREE, $2, 0, 1); } ! | '[' SCSPEC expr ']' ! { if (C_RID_CODE ($2) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! $$ = build_array_declarator ($3, NULL_TREE, 1, 0); } ! | '[' SCSPEC declspecs_nosc expr ']' ! { if (C_RID_CODE ($2) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! $$ = build_array_declarator ($4, $3, 1, 0); } ! | '[' declspecs_nosc SCSPEC expr ']' ! { if (C_RID_CODE ($3) != RID_STATIC) ! error ("storage class specifier in array declarator"); ! $$ = build_array_declarator ($4, $2, 1, 0); } ; /* A nonempty series of declarations and statements (possibly followed by --- 1957,1973 ---- /* The [...] part of a declarator for an array type. */ array_declarator: ! '[' maybe_type_quals_attrs expr ']' { $$ = build_array_declarator ($3, $2, 0, 0); } ! | '[' maybe_type_quals_attrs ']' { $$ = build_array_declarator (NULL_TREE, $2, 0, 0); } ! | '[' maybe_type_quals_attrs '*' ']' { $$ = build_array_declarator (NULL_TREE, $2, 0, 1); } ! | '[' STATIC maybe_type_quals_attrs expr ']' ! { $$ = build_array_declarator ($4, $3, 1, 0); } ! /* declspecs_nosc_nots is a synonym for type_quals_attrs. */ ! | '[' declspecs_nosc_nots STATIC expr ']' ! { $$ = build_array_declarator ($4, $2, 1, 0); } ; /* A nonempty series of declarations and statements (possibly followed by *************** c99_block_end: /* empty */ *** 2032,2039 **** { if (flag_isoc99) { tree scope_stmt = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); ! $$ = poplevel (kept_level_p (), 0, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE (scope_stmt)) = SCOPE_STMT_BLOCK (TREE_VALUE (scope_stmt)) = $$; } --- 2062,2069 ---- { if (flag_isoc99) { tree scope_stmt = add_scope_stmt (/*begin_p=*/0, /*partial_p=*/0); ! $$ = poplevel (kept_level_p (), 0, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE (scope_stmt)) = SCOPE_STMT_BLOCK (TREE_VALUE (scope_stmt)) = $$; } *************** compstmt_start: '{' { compstmt_count++; *** 2082,2089 **** compstmt_nostart: '}' { $$ = convert (void_type_node, integer_zero_node); } | pushlevel maybe_label_decls compstmt_contents_nonempty '}' poplevel ! { $$ = poplevel (kept_level_p (), 1, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE ($5)) = SCOPE_STMT_BLOCK (TREE_VALUE ($5)) = $$; } ; --- 2112,2119 ---- compstmt_nostart: '}' { $$ = convert (void_type_node, integer_zero_node); } | pushlevel maybe_label_decls compstmt_contents_nonempty '}' poplevel ! { $$ = poplevel (kept_level_p (), 1, 0); ! SCOPE_STMT_BLOCK (TREE_PURPOSE ($5)) = SCOPE_STMT_BLOCK (TREE_VALUE ($5)) = $$; } ; *************** compstmt_primary_start: *** 2112,2118 **** ; compstmt: compstmt_start compstmt_nostart ! { RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); last_expr_type = NULL_TREE; $$ = $1; } ; --- 2142,2148 ---- ; compstmt: compstmt_start compstmt_nostart ! { RECHAIN_STMTS ($1, COMPOUND_BODY ($1)); last_expr_type = NULL_TREE; $$ = $1; } ; *************** if_prefix: *** 2139,2145 **** IF { $$ = c_begin_if_stmt (); } '(' expr ')' ! { c_expand_start_cond (truthvalue_conversion ($4), compstmt_count,$2); $$ = stmt_count; if_stmt_file = $-2; --- 2169,2175 ---- IF { $$ = c_begin_if_stmt (); } '(' expr ')' ! { c_expand_start_cond (c_common_truthvalue_conversion ($4), compstmt_count,$2); $$ = stmt_count; if_stmt_file = $-2; *************** do_stmt_start: *** 2153,2159 **** DO { stmt_count++; compstmt_count++; ! $$ = add_stmt (build_stmt (DO_STMT, NULL_TREE, NULL_TREE)); /* In the event that a parse error prevents --- 2183,2189 ---- DO { stmt_count++; compstmt_count++; ! $$ = add_stmt (build_stmt (DO_STMT, NULL_TREE, NULL_TREE)); /* In the event that a parse error prevents *************** select_or_iter_stmt: *** 2248,2277 **** we later pass to c_finish_while_stmt_cond to fill in the condition and other tidbits. */ | WHILE ! { stmt_count++; $$ = c_begin_while_stmt (); } '(' expr ')' ! { $4 = truthvalue_conversion ($4); ! c_finish_while_stmt_cond (truthvalue_conversion ($4), ! $2); $$ = add_stmt ($2); } c99_block_lineno_labeled_stmt { RECHAIN_STMTS ($6, WHILE_BODY ($6)); } | do_stmt_start '(' expr ')' ';' ! { DO_COND ($1) = truthvalue_conversion ($3); } | do_stmt_start error { } | FOR { $$ = build_stmt (FOR_STMT, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE); ! add_stmt ($$); } '(' for_init_stmt { stmt_count++; RECHAIN_STMTS ($2, FOR_INIT_STMT ($2)); } xexpr ';' ! { if ($6) ! FOR_COND ($2) = truthvalue_conversion ($6); } xexpr ')' { FOR_EXPR ($2) = $9; } c99_block_lineno_labeled_stmt --- 2278,2308 ---- we later pass to c_finish_while_stmt_cond to fill in the condition and other tidbits. */ | WHILE ! { stmt_count++; $$ = c_begin_while_stmt (); } '(' expr ')' ! { $4 = c_common_truthvalue_conversion ($4); ! c_finish_while_stmt_cond ! (c_common_truthvalue_conversion ($4), $2); $$ = add_stmt ($2); } c99_block_lineno_labeled_stmt { RECHAIN_STMTS ($6, WHILE_BODY ($6)); } | do_stmt_start '(' expr ')' ';' ! { DO_COND ($1) = c_common_truthvalue_conversion ($3); } | do_stmt_start error { } | FOR { $$ = build_stmt (FOR_STMT, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE); ! add_stmt ($$); } '(' for_init_stmt { stmt_count++; RECHAIN_STMTS ($2, FOR_INIT_STMT ($2)); } xexpr ';' ! { if ($6) ! FOR_COND ($2) ! = c_common_truthvalue_conversion ($6); } xexpr ')' { FOR_EXPR ($2) = $9; } c99_block_lineno_labeled_stmt *************** select_or_iter_stmt: *** 2285,2291 **** for_init_stmt: xexpr ';' ! { add_stmt (build_stmt (EXPR_STMT, $1)); } | decl { check_for_loop_decls (); } ; --- 2316,2322 ---- for_init_stmt: xexpr ';' ! { add_stmt (build_stmt (EXPR_STMT, $1)); } | decl { check_for_loop_decls (); } ; *************** asm_operand: *** 2411,2424 **** STRING '(' expr ')' { $$ = build_tree_list (build_tree_list (NULL_TREE, $1), $3); } | '[' identifier ']' STRING '(' expr ')' ! { $$ = build_tree_list (build_tree_list ($2, $4), $6); } ; asm_clobbers: ! string ! { $$ = tree_cons (NULL_TREE, combine_strings ($1), NULL_TREE); } ! | asm_clobbers ',' string ! { $$ = tree_cons (NULL_TREE, combine_strings ($3), $1); } ; /* This is what appears inside the parens in a function declarator. --- 2442,2457 ---- STRING '(' expr ')' { $$ = build_tree_list (build_tree_list (NULL_TREE, $1), $3); } | '[' identifier ']' STRING '(' expr ')' ! { $2 = build_string (IDENTIFIER_LENGTH ($2), ! IDENTIFIER_POINTER ($2)); ! $$ = build_tree_list (build_tree_list ($2, $4), $6); } ; asm_clobbers: ! STRING ! { $$ = tree_cons (NULL_TREE, $1, NULL_TREE); } ! | asm_clobbers ',' STRING ! { $$ = tree_cons (NULL_TREE, $3, $1); } ; /* This is what appears inside the parens in a function declarator. *************** parmlist_2: /* empty */ *** 2471,2477 **** error ("ISO C requires a named argument before `...'"); } | parms ! { $$ = get_parm_info (1); } | parms ',' ELLIPSIS { $$ = get_parm_info (0); } ; --- 2504,2512 ---- error ("ISO C requires a named argument before `...'"); } | parms ! { $$ = get_parm_info (1); ! parsing_iso_function_signature = true; ! } | parms ',' ELLIPSIS { $$ = get_parm_info (0); } ; *************** parm: *** 2494,2500 **** | declspecs_ts setspecs notype_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), ! chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_ts setspecs absdcl_maybe_attribute { $$ = $3; --- 2529,2535 ---- | declspecs_ts setspecs notype_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), ! chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_ts setspecs absdcl_maybe_attribute { $$ = $3; *************** firstparm: *** 2521,2527 **** | declspecs_ts_nosa setspecs_fp notype_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), ! chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_ts_nosa setspecs_fp absdcl_maybe_attribute { $$ = $3; --- 2556,2562 ---- | declspecs_ts_nosa setspecs_fp notype_declarator maybe_attribute { $$ = build_tree_list (build_tree_list (current_declspecs, $3), ! chainon ($4, all_prefix_attributes)); POP_DECLSPEC_STACK; } | declspecs_ts_nosa setspecs_fp absdcl_maybe_attribute { $$ = $3; *************** identifiers_or_typenames: *** 2593,2602 **** extension: EXTENSION ! { $$ = SAVE_WARN_FLAGS(); pedantic = 0; warn_pointer_arith = 0; ! warn_traditional = 0; } ; /* Objective-C productions. */ --- 2628,2638 ---- extension: EXTENSION ! { $$ = SAVE_EXT_FLAGS(); pedantic = 0; warn_pointer_arith = 0; ! warn_traditional = 0; ! flag_iso = 0; } ; /* Objective-C productions. */ *************** receiver: *** 3147,3160 **** ; objcmessageexpr: ! '[' ! { objc_receiver_context = 1; } ! receiver ! { objc_receiver_context = 0; } ! messageargs ']' ! { ! $$ = build_tree_list ($3, $5); ! } ; selectorarg: --- 3183,3190 ---- ; objcmessageexpr: ! '[' receiver messageargs ']' ! { $$ = build_tree_list ($2, $3); } ; selectorarg: *************** struct resword *** 3221,3231 **** /* Disable mask. Keywords are disabled if (reswords[i].disable & mask) is _true_. */ ! #define D_TRAD 0x01 /* not in traditional C */ ! #define D_C89 0x02 /* not in C89 */ ! #define D_EXT 0x04 /* GCC extension */ ! #define D_EXT89 0x08 /* GCC extension incorporated in C99 */ ! #define D_OBJC 0x10 /* Objective C only */ static const struct resword reswords[] = { --- 3251,3260 ---- /* Disable mask. Keywords are disabled if (reswords[i].disable & mask) is _true_. */ ! #define D_C89 0x01 /* not in C89 */ ! #define D_EXT 0x02 /* GCC extension */ ! #define D_EXT89 0x04 /* GCC extension incorporated in C99 */ ! #define D_OBJC 0x08 /* Objective C only */ static const struct resword reswords[] = { *************** static const struct resword reswords[] = *** 3267,3272 **** --- 3296,3302 ---- { "__restrict__", RID_RESTRICT, 0 }, { "__signed", RID_SIGNED, 0 }, { "__signed__", RID_SIGNED, 0 }, + { "__thread", RID_THREAD, 0 }, { "__typeof", RID_TYPEOF, 0 }, { "__typeof__", RID_TYPEOF, 0 }, { "__unbounded", RID_UNBOUNDED, 0 }, *************** static const struct resword reswords[] = *** 3278,3284 **** { "break", RID_BREAK, 0 }, { "case", RID_CASE, 0 }, { "char", RID_CHAR, 0 }, ! { "const", RID_CONST, D_TRAD }, { "continue", RID_CONTINUE, 0 }, { "default", RID_DEFAULT, 0 }, { "do", RID_DO, 0 }, --- 3308,3314 ---- { "break", RID_BREAK, 0 }, { "case", RID_CASE, 0 }, { "char", RID_CHAR, 0 }, ! { "const", RID_CONST, 0 }, { "continue", RID_CONTINUE, 0 }, { "default", RID_DEFAULT, 0 }, { "do", RID_DO, 0 }, *************** static const struct resword reswords[] = *** 3290,3313 **** { "for", RID_FOR, 0 }, { "goto", RID_GOTO, 0 }, { "if", RID_IF, 0 }, ! { "inline", RID_INLINE, D_TRAD|D_EXT89 }, { "int", RID_INT, 0 }, { "long", RID_LONG, 0 }, { "register", RID_REGISTER, 0 }, ! { "restrict", RID_RESTRICT, D_TRAD|D_C89 }, { "return", RID_RETURN, 0 }, { "short", RID_SHORT, 0 }, ! { "signed", RID_SIGNED, D_TRAD }, { "sizeof", RID_SIZEOF, 0 }, { "static", RID_STATIC, 0 }, { "struct", RID_STRUCT, 0 }, { "switch", RID_SWITCH, 0 }, { "typedef", RID_TYPEDEF, 0 }, ! { "typeof", RID_TYPEOF, D_TRAD|D_EXT }, { "union", RID_UNION, 0 }, { "unsigned", RID_UNSIGNED, 0 }, { "void", RID_VOID, 0 }, ! { "volatile", RID_VOLATILE, D_TRAD }, { "while", RID_WHILE, 0 }, { "id", RID_ID, D_OBJC }, --- 3320,3343 ---- { "for", RID_FOR, 0 }, { "goto", RID_GOTO, 0 }, { "if", RID_IF, 0 }, ! { "inline", RID_INLINE, D_EXT89 }, { "int", RID_INT, 0 }, { "long", RID_LONG, 0 }, { "register", RID_REGISTER, 0 }, ! { "restrict", RID_RESTRICT, D_C89 }, { "return", RID_RETURN, 0 }, { "short", RID_SHORT, 0 }, ! { "signed", RID_SIGNED, 0 }, { "sizeof", RID_SIZEOF, 0 }, { "static", RID_STATIC, 0 }, { "struct", RID_STRUCT, 0 }, { "switch", RID_SWITCH, 0 }, { "typedef", RID_TYPEDEF, 0 }, ! { "typeof", RID_TYPEOF, D_EXT }, { "union", RID_UNION, 0 }, { "unsigned", RID_UNSIGNED, 0 }, { "void", RID_VOID, 0 }, ! { "volatile", RID_VOLATILE, 0 }, { "while", RID_WHILE, 0 }, { "id", RID_ID, D_OBJC }, *************** static const struct resword reswords[] = *** 3342,3348 **** three languages. */ static const short rid_to_yy[RID_MAX] = { ! /* RID_STATIC */ SCSPEC, /* RID_UNSIGNED */ TYPESPEC, /* RID_LONG */ TYPESPEC, /* RID_CONST */ TYPE_QUAL, --- 3372,3378 ---- three languages. */ static const short rid_to_yy[RID_MAX] = { ! /* RID_STATIC */ STATIC, /* RID_UNSIGNED */ TYPESPEC, /* RID_LONG */ TYPESPEC, /* RID_CONST */ TYPE_QUAL, *************** static const short rid_to_yy[RID_MAX] = *** 3360,3365 **** --- 3390,3396 ---- /* RID_BOUNDED */ TYPE_QUAL, /* RID_UNBOUNDED */ TYPE_QUAL, /* RID_COMPLEX */ TYPESPEC, + /* RID_THREAD */ SCSPEC, /* C++ */ /* RID_FRIEND */ 0, *************** static const short rid_to_yy[RID_MAX] = *** 3375,3381 **** /* RID_BYCOPY */ TYPE_QUAL, /* RID_BYREF */ TYPE_QUAL, /* RID_ONEWAY */ TYPE_QUAL, ! /* C */ /* RID_INT */ TYPESPEC, /* RID_CHAR */ TYPESPEC, --- 3406,3412 ---- /* RID_BYCOPY */ TYPE_QUAL, /* RID_BYREF */ TYPE_QUAL, /* RID_ONEWAY */ TYPE_QUAL, ! /* C */ /* RID_INT */ TYPESPEC, /* RID_CHAR */ TYPESPEC, *************** static const short rid_to_yy[RID_MAX] = *** 3449,3467 **** /* RID_REINTCAST */ 0, /* RID_STATCAST */ 0, - /* alternate spellings */ - /* RID_AND */ 0, - /* RID_AND_EQ */ 0, - /* RID_NOT */ 0, - /* RID_NOT_EQ */ 0, - /* RID_OR */ 0, - /* RID_OR_EQ */ 0, - /* RID_XOR */ 0, - /* RID_XOR_EQ */ 0, - /* RID_BITAND */ 0, - /* RID_BITOR */ 0, - /* RID_COMPL */ 0, - /* Objective C */ /* RID_ID */ OBJECTNAME, /* RID_AT_ENCODE */ ENCODE, --- 3480,3485 ---- *************** init_reswords () *** 3484,3493 **** unsigned int i; tree id; int mask = (flag_isoc99 ? 0 : D_C89) - | (flag_traditional ? D_TRAD : 0) | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0); ! if (c_language != clk_objective_c) mask |= D_OBJC; /* It is not necessary to register ridpointers as a GC root, because --- 3502,3510 ---- unsigned int i; tree id; int mask = (flag_isoc99 ? 0 : D_C89) | (flag_no_asm ? (flag_isoc99 ? D_EXT : D_EXT|D_EXT89) : 0); ! if (!flag_objc) mask |= D_OBJC; /* It is not necessary to register ridpointers as a GC root, because *************** static int *** 3542,3551 **** yylexname () { tree decl; ! int objc_force_identifier = objc_need_raw_identifier; OBJC_NEED_RAW_IDENTIFIER (0); ! if (C_IS_RESERVED_WORD (yylval.ttype)) { enum rid rid_code = C_RID_CODE (yylval.ttype); --- 3559,3568 ---- yylexname () { tree decl; ! int objc_force_identifier = objc_need_raw_identifier; OBJC_NEED_RAW_IDENTIFIER (0); ! if (C_IS_RESERVED_WORD (yylval.ttype)) { enum rid rid_code = C_RID_CODE (yylval.ttype); *************** yylexname () *** 3568,3580 **** /* __FUNCTION__ and __PRETTY_FUNCTION__ get converted to string constants. */ const char *name = fname_string (rid_code); ! yylval.ttype = build_string (strlen (name) + 1, name); C_ARTIFICIAL_STRING_P (yylval.ttype) = 1; last_token = CPP_STRING; /* so yyerror won't choke */ return STRING; } ! /* Return the canonical spelling for this keyword. */ yylval.ttype = ridpointers[(int) rid_code]; return yycode; --- 3585,3597 ---- /* __FUNCTION__ and __PRETTY_FUNCTION__ get converted to string constants. */ const char *name = fname_string (rid_code); ! yylval.ttype = build_string (strlen (name) + 1, name); C_ARTIFICIAL_STRING_P (yylval.ttype) = 1; last_token = CPP_STRING; /* so yyerror won't choke */ return STRING; } ! /* Return the canonical spelling for this keyword. */ yylval.ttype = ridpointers[(int) rid_code]; return yycode; *************** yylexname () *** 3592,3599 **** tree objc_interface_decl = is_class_name (yylval.ttype); /* ObjC class names are in the same namespace as variables and typedefs, and hence are shadowed by local declarations. */ ! if (objc_interface_decl ! && (global_bindings_p () || (!objc_force_identifier && !decl))) { yylval.ttype = objc_interface_decl; --- 3609,3616 ---- tree objc_interface_decl = is_class_name (yylval.ttype); /* ObjC class names are in the same namespace as variables and typedefs, and hence are shadowed by local declarations. */ ! if (objc_interface_decl ! && (global_bindings_p () || (!objc_force_identifier && !decl))) { yylval.ttype = objc_interface_decl; *************** yylexname () *** 3604,3609 **** --- 3621,3665 ---- return IDENTIFIER; } + /* Concatenate strings before returning them to the parser. This isn't quite + as good as having it done in the lexer, but it's better than nothing. */ + + static int + yylexstring () + { + enum cpp_ttype next_type; + tree orig = yylval.ttype; + + next_type = c_lex (&yylval.ttype); + if (next_type == CPP_STRING + || next_type == CPP_WSTRING + || (next_type == CPP_NAME && yylexname () == STRING)) + { + varray_type strings; + + + VARRAY_TREE_INIT (strings, 32, "strings"); + VARRAY_PUSH_TREE (strings, orig); + + do + { + VARRAY_PUSH_TREE (strings, yylval.ttype); + next_type = c_lex (&yylval.ttype); + } + while (next_type == CPP_STRING + || next_type == CPP_WSTRING + || (next_type == CPP_NAME && yylexname () == STRING)); + + yylval.ttype = combine_strings (strings); + } + else + yylval.ttype = orig; + + /* We will have always read one token too many. */ + _cpp_backup_tokens (parse_in, 1); + + return STRING; + } static inline int _yylex () *************** _yylex () *** 3670,3676 **** return 0; case CPP_NAME: ! return yylexname (); case CPP_NUMBER: case CPP_CHAR: --- 3726,3738 ---- return 0; case CPP_NAME: ! { ! int ret = yylexname (); ! if (ret == STRING) ! return yylexstring (); ! else ! return ret; ! } case CPP_NUMBER: case CPP_CHAR: *************** _yylex () *** 3679,3686 **** case CPP_STRING: case CPP_WSTRING: ! return STRING; ! /* This token is Objective-C specific. It gives the next token special significance. */ case CPP_ATSIGN: --- 3741,3748 ---- case CPP_STRING: case CPP_WSTRING: ! return yylexstring (); ! /* This token is Objective-C specific. It gives the next token special significance. */ case CPP_ATSIGN: *************** yylex() *** 3733,3753 **** return r; } - /* Sets the value of the 'yydebug' variable to VALUE. - This is a function so we don't have to have YYDEBUG defined - in order to build the compiler. */ - - void - c_set_yydebug (value) - int value; - { - #if YYDEBUG != 0 - yydebug = value; - #else - warning ("YYDEBUG not defined"); - #endif - } - /* Function used when yydebug is set, to print a token in more detail. */ static void --- 3795,3800 ---- *************** yyprint (file, yychar, yyl) *** 3759,3765 **** tree t = yyl.ttype; fprintf (file, " [%s]", NAME(last_token)); ! switch (yychar) { case IDENTIFIER: --- 3806,3812 ---- tree t = yyl.ttype; fprintf (file, " [%s]", NAME(last_token)); ! switch (yychar) { case IDENTIFIER: *************** yyprint (file, yychar, yyl) *** 3768,3773 **** --- 3815,3821 ---- case TYPESPEC: case TYPE_QUAL: case SCSPEC: + case STATIC: if (IDENTIFIER_POINTER (t)) fprintf (file, " `%s'", IDENTIFIER_POINTER (t)); break; *************** yyprint (file, yychar, yyl) *** 3801,3823 **** /* This is not the ideal place to put these, but we have to get them out of c-lex.c because cp/lex.c has its own versions. */ ! /* Return something to represent absolute declarators containing a *. ! TARGET is the absolute declarator that the * contains. ! TYPE_QUALS_ATTRS is a list of modifiers such as const or volatile ! to apply to the pointer type, represented as identifiers, possible mixed ! with attributes. ! ! We return an INDIRECT_REF whose "contents" are TARGET (inside a TREE_LIST, ! if attributes are present) and whose type is the modifier list. */ ! tree ! make_pointer_declarator (type_quals_attrs, target) ! tree type_quals_attrs, target; { ! tree quals, attrs; ! tree itarget = target; ! split_specs_attrs (type_quals_attrs, &quals, &attrs); ! if (attrs != NULL_TREE) ! itarget = tree_cons (attrs, target, NULL_TREE); ! return build1 (INDIRECT_REF, quals, itarget); } --- 3849,3864 ---- /* This is not the ideal place to put these, but we have to get them out of c-lex.c because cp/lex.c has its own versions. */ ! /* Free malloced parser stacks if necessary. */ ! void ! free_parser_stacks () { ! if (malloced_yyss) ! { ! free (malloced_yyss); ! free (malloced_yyvs); ! } } + + #include "gt-c-parse.h" diff -Nrc3pad gcc-3.2.3/libobjc/aclocal.m4 gcc-3.3/libobjc/aclocal.m4 *** gcc-3.2.3/libobjc/aclocal.m4 2003-01-28 01:44:04.000000000 +0000 --- gcc-3.3/libobjc/aclocal.m4 2003-01-28 01:45:01.000000000 +0000 *************** AC_DEFUN(GLIBCPP_CONFIGURE, [ *** 54,60 **** # These need to be absolute paths, yet at the same time need to # canonicalize only relative paths, because then amd will not unmount # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd. ! glibcpp_builddir=`pwd` case $srcdir in [\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;; *) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;; --- 54,60 ---- # These need to be absolute paths, yet at the same time need to # canonicalize only relative paths, because then amd will not unmount # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd. ! glibcpp_builddir=`${PWDCMD-pwd}` case $srcdir in [\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;; *) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;; diff -Nrc3pad gcc-3.2.3/libobjc/archive.c gcc-3.3/libobjc/archive.c *** gcc-3.2.3/libobjc/archive.c 1999-03-26 23:44:04.000000000 +0000 --- gcc-3.3/libobjc/archive.c 2002-07-02 19:41:56.000000000 +0000 *************** *** 1,5 **** ! /* GNU Objective C Runtime archiving ! Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GNU CC. --- 1,5 ---- ! /* GNU Objective C Runtime archiving ! Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 28,72 **** #include "runtime.h" #include "typedstream.h" #include "encoding.h" - - #ifdef HAVE_STDLIB_H #include - #endif ! extern int fflush(FILE*); #define ROUND(V, A) \ ! ({ typeof(V) __v=(V); typeof(A) __a=(A); \ ! __a*((__v+__a-1)/__a); }) ! #define PTR2LONG(P) (((char*)(P))-(char*)0) ! #define LONG2PTR(L) (((char*)0)+(L)) /* Declare some functions... */ static int ! objc_read_class (struct objc_typed_stream* stream, Class* class); ! int objc_sizeof_type(const char* type); static int ! objc_write_use_common (struct objc_typed_stream* stream, unsigned long key); static int ! objc_write_register_common (struct objc_typed_stream* stream, unsigned long key); static int ! objc_write_class (struct objc_typed_stream* stream, ! struct objc_class* class); ! const char* objc_skip_type (const char* type); ! static void __objc_finish_write_root_object(struct objc_typed_stream*); ! static void __objc_finish_read_root_object(struct objc_typed_stream*); static __inline__ int ! __objc_code_unsigned_char (unsigned char* buf, unsigned char val) { if ((val&_B_VALUE) == val) { --- 28,69 ---- #include "runtime.h" #include "typedstream.h" #include "encoding.h" #include ! extern int fflush (FILE *); #define ROUND(V, A) \ ! ({ typeof (V) __v = (V); typeof (A) __a = (A); \ ! __a * ((__v + __a - 1)/__a); }) ! #define PTR2LONG(P) (((char *) (P))-(char *) 0) ! #define LONG2PTR(L) (((char *) 0) + (L)) /* Declare some functions... */ static int ! objc_read_class (struct objc_typed_stream *stream, Class *class); ! int objc_sizeof_type (const char *type); static int ! objc_write_use_common (struct objc_typed_stream *stream, unsigned long key); static int ! objc_write_register_common (struct objc_typed_stream *stream, unsigned long key); static int ! objc_write_class (struct objc_typed_stream *stream, ! struct objc_class *class); ! const char *objc_skip_type (const char *type); ! static void __objc_finish_write_root_object (struct objc_typed_stream *); ! static void __objc_finish_read_root_object (struct objc_typed_stream *); static __inline__ int ! __objc_code_unsigned_char (unsigned char *buf, unsigned char val) { if ((val&_B_VALUE) == val) { *************** __objc_code_unsigned_char (unsigned char *** 82,97 **** } int ! objc_write_unsigned_char (struct objc_typed_stream* stream, unsigned char value) { ! unsigned char buf[sizeof (unsigned char)+1]; int len = __objc_code_unsigned_char (buf, value); ! return (*stream->write)(stream->physical, buf, len); } static __inline__ int ! __objc_code_char (unsigned char* buf, signed char val) { if (val >= 0) return __objc_code_unsigned_char (buf, val); --- 79,94 ---- } int ! objc_write_unsigned_char (struct objc_typed_stream *stream, unsigned char value) { ! unsigned char buf[sizeof (unsigned char) + 1]; int len = __objc_code_unsigned_char (buf, value); ! return (*stream->write) (stream->physical, buf, len); } static __inline__ int ! __objc_code_char (unsigned char *buf, signed char val) { if (val >= 0) return __objc_code_unsigned_char (buf, val); *************** __objc_code_char (unsigned char* buf, si *** 104,118 **** } int ! objc_write_char (struct objc_typed_stream* stream, signed char value) { ! unsigned char buf[sizeof (char)+1]; int len = __objc_code_char (buf, value); ! return (*stream->write)(stream->physical, buf, len); } static __inline__ int ! __objc_code_unsigned_short (unsigned char* buf, unsigned short val) { if ((val&_B_VALUE) == val) { --- 101,115 ---- } int ! objc_write_char (struct objc_typed_stream *stream, signed char value) { ! unsigned char buf[sizeof (char) + 1]; int len = __objc_code_char (buf, value); ! return (*stream->write) (stream->physical, buf, len); } static __inline__ int ! __objc_code_unsigned_short (unsigned char *buf, unsigned short val) { if ((val&_B_VALUE) == val) { *************** __objc_code_unsigned_short (unsigned cha *** 125,139 **** buf[0] = _B_NINT; ! for (c= sizeof(short); c != 0; c -= 1) ! if (((val>>(8*(c-1)))%0x100) != 0) break; buf[0] |= c; for (b = 1; c != 0; c--, b++) { ! buf[b] = (val >> (8*(c-1)))%0x100; } return b; --- 122,136 ---- buf[0] = _B_NINT; ! for (c = sizeof (short); c != 0; c -= 1) ! if (((val >> (8*(c - 1)))%0x100) != 0) break; buf[0] |= c; for (b = 1; c != 0; c--, b++) { ! buf[b] = (val >> (8*(c - 1)))%0x100; } return b; *************** __objc_code_unsigned_short (unsigned cha *** 141,156 **** } int ! objc_write_unsigned_short (struct objc_typed_stream* stream, unsigned short value) { ! unsigned char buf[sizeof (unsigned short)+1]; int len = __objc_code_unsigned_short (buf, value); ! return (*stream->write)(stream->physical, buf, len); } static __inline__ int ! __objc_code_short (unsigned char* buf, short val) { int sign = (val < 0); int size = __objc_code_unsigned_short (buf, sign ? -val : val); --- 138,153 ---- } int ! objc_write_unsigned_short (struct objc_typed_stream *stream, unsigned short value) { ! unsigned char buf[sizeof (unsigned short) + 1]; int len = __objc_code_unsigned_short (buf, value); ! return (*stream->write) (stream->physical, buf, len); } static __inline__ int ! __objc_code_short (unsigned char *buf, short val) { int sign = (val < 0); int size = __objc_code_unsigned_short (buf, sign ? -val : val); *************** __objc_code_short (unsigned char* buf, s *** 160,175 **** } int ! objc_write_short (struct objc_typed_stream* stream, short value) { ! unsigned char buf[sizeof (short)+1]; int len = __objc_code_short (buf, value); ! return (*stream->write)(stream->physical, buf, len); } static __inline__ int ! __objc_code_unsigned_int (unsigned char* buf, unsigned int val) { if ((val&_B_VALUE) == val) { --- 157,172 ---- } int ! objc_write_short (struct objc_typed_stream *stream, short value) { ! unsigned char buf[sizeof (short) + 1]; int len = __objc_code_short (buf, value); ! return (*stream->write) (stream->physical, buf, len); } static __inline__ int ! __objc_code_unsigned_int (unsigned char *buf, unsigned int val) { if ((val&_B_VALUE) == val) { *************** __objc_code_unsigned_int (unsigned char* *** 182,189 **** buf[0] = _B_NINT; ! for (c= sizeof(int); c != 0; c -= 1) ! if (((val>>(8*(c-1)))%0x100) != 0) break; buf[0] |= c; --- 179,186 ---- buf[0] = _B_NINT; ! for (c = sizeof (int); c != 0; c -= 1) ! if (((val >> (8*(c - 1)))%0x100) != 0) break; buf[0] |= c; *************** __objc_code_unsigned_int (unsigned char* *** 198,212 **** } int ! objc_write_unsigned_int (struct objc_typed_stream* stream, unsigned int value) { ! unsigned char buf[sizeof(unsigned int)+1]; int len = __objc_code_unsigned_int (buf, value); ! return (*stream->write)(stream->physical, buf, len); } static __inline__ int ! __objc_code_int (unsigned char* buf, int val) { int sign = (val < 0); int size = __objc_code_unsigned_int (buf, sign ? -val : val); --- 195,209 ---- } int ! objc_write_unsigned_int (struct objc_typed_stream *stream, unsigned int value) { ! unsigned char buf[sizeof (unsigned int) + 1]; int len = __objc_code_unsigned_int (buf, value); ! return (*stream->write) (stream->physical, buf, len); } static __inline__ int ! __objc_code_int (unsigned char *buf, int val) { int sign = (val < 0); int size = __objc_code_unsigned_int (buf, sign ? -val : val); *************** __objc_code_int (unsigned char* buf, int *** 216,230 **** } int ! objc_write_int (struct objc_typed_stream* stream, int value) { ! unsigned char buf[sizeof(int)+1]; int len = __objc_code_int (buf, value); ! return (*stream->write)(stream->physical, buf, len); } static __inline__ int ! __objc_code_unsigned_long (unsigned char* buf, unsigned long val) { if ((val&_B_VALUE) == val) { --- 213,227 ---- } int ! objc_write_int (struct objc_typed_stream *stream, int value) { ! unsigned char buf[sizeof (int) + 1]; int len = __objc_code_int (buf, value); ! return (*stream->write) (stream->physical, buf, len); } static __inline__ int ! __objc_code_unsigned_long (unsigned char *buf, unsigned long val) { if ((val&_B_VALUE) == val) { *************** __objc_code_unsigned_long (unsigned char *** 237,251 **** buf[0] = _B_NINT; ! for (c= sizeof(long); c != 0; c -= 1) ! if (((val>>(8*(c-1)))%0x100) != 0) break; buf[0] |= c; for (b = 1; c != 0; c--, b++) { ! buf[b] = (val >> (8*(c-1)))%0x100; } return b; --- 234,248 ---- buf[0] = _B_NINT; ! for (c = sizeof (long); c != 0; c -= 1) ! if (((val >> (8*(c - 1)))%0x100) != 0) break; buf[0] |= c; for (b = 1; c != 0; c--, b++) { ! buf[b] = (val >> (8*(c - 1)))%0x100; } return b; *************** __objc_code_unsigned_long (unsigned char *** 253,268 **** } int ! objc_write_unsigned_long (struct objc_typed_stream* stream, unsigned long value) { ! unsigned char buf[sizeof(unsigned long)+1]; int len = __objc_code_unsigned_long (buf, value); ! return (*stream->write)(stream->physical, buf, len); } static __inline__ int ! __objc_code_long (unsigned char* buf, long val) { int sign = (val < 0); int size = __objc_code_unsigned_long (buf, sign ? -val : val); --- 250,265 ---- } int ! objc_write_unsigned_long (struct objc_typed_stream *stream, unsigned long value) { ! unsigned char buf[sizeof (unsigned long) + 1]; int len = __objc_code_unsigned_long (buf, value); ! return (*stream->write) (stream->physical, buf, len); } static __inline__ int ! __objc_code_long (unsigned char *buf, long val) { int sign = (val < 0); int size = __objc_code_unsigned_long (buf, sign ? -val : val); *************** __objc_code_long (unsigned char* buf, lo *** 272,290 **** } int ! objc_write_long (struct objc_typed_stream* stream, long value) { ! unsigned char buf[sizeof(long)+1]; int len = __objc_code_long (buf, value); ! return (*stream->write)(stream->physical, buf, len); } int ! objc_write_string (struct objc_typed_stream* stream, ! const unsigned char* string, unsigned int nbytes) { ! unsigned char buf[sizeof(unsigned int)+1]; int len = __objc_code_unsigned_int (buf, nbytes); if ((buf[0]&_B_CODE) == _B_SINT) --- 269,287 ---- } int ! objc_write_long (struct objc_typed_stream *stream, long value) { ! unsigned char buf[sizeof (long) + 1]; int len = __objc_code_long (buf, value); ! return (*stream->write) (stream->physical, buf, len); } int ! objc_write_string (struct objc_typed_stream *stream, ! const unsigned char *string, unsigned int nbytes) { ! unsigned char buf[sizeof (unsigned int) + 1]; int len = __objc_code_unsigned_int (buf, nbytes); if ((buf[0]&_B_CODE) == _B_SINT) *************** objc_write_string (struct objc_typed_str *** 293,307 **** else /* _B_NINT */ buf[0] = (buf[0]&_B_VALUE)|_B_NSTR; ! if ((*stream->write)(stream->physical, buf, len) != 0) ! return (*stream->write)(stream->physical, string, nbytes); else return 0; } int ! objc_write_string_atomic (struct objc_typed_stream* stream, ! unsigned char* string, unsigned int nbytes) { unsigned long key; if ((key = PTR2LONG(hash_value_for_key (stream->stream_table, string)))) --- 290,304 ---- else /* _B_NINT */ buf[0] = (buf[0]&_B_VALUE)|_B_NSTR; ! if ((*stream->write) (stream->physical, buf, len) != 0) ! return (*stream->write) (stream->physical, string, nbytes); else return 0; } int ! objc_write_string_atomic (struct objc_typed_stream *stream, ! unsigned char *string, unsigned int nbytes) { unsigned long key; if ((key = PTR2LONG(hash_value_for_key (stream->stream_table, string)))) *************** objc_write_string_atomic (struct objc_ty *** 317,376 **** } static int ! objc_write_register_common (struct objc_typed_stream* stream, unsigned long key) { unsigned char buf[sizeof (unsigned long)+2]; ! int len = __objc_code_unsigned_long (buf+1, key); if (len == 1) { buf[0] = _B_RCOMM|0x01; buf[1] &= _B_VALUE; ! return (*stream->write)(stream->physical, buf, len+1); } else { buf[1] = (buf[1]&_B_VALUE)|_B_RCOMM; ! return (*stream->write)(stream->physical, buf+1, len); } } static int ! objc_write_use_common (struct objc_typed_stream* stream, unsigned long key) { unsigned char buf[sizeof (unsigned long)+2]; ! int len = __objc_code_unsigned_long (buf+1, key); if (len == 1) { buf[0] = _B_UCOMM|0x01; buf[1] &= _B_VALUE; ! return (*stream->write)(stream->physical, buf, 2); } else { buf[1] = (buf[1]&_B_VALUE)|_B_UCOMM; ! return (*stream->write)(stream->physical, buf+1, len); } } static __inline__ int ! __objc_write_extension (struct objc_typed_stream* stream, unsigned char code) { if (code <= _B_VALUE) { unsigned char buf = code|_B_EXT; ! return (*stream->write)(stream->physical, &buf, 1); } else { ! objc_error(nil, OBJC_ERR_BAD_OPCODE, ! "__objc_write_extension: bad opcode %c\n", code); return -1; } } __inline__ int ! __objc_write_object (struct objc_typed_stream* stream, id object) { unsigned char buf = '\0'; SEL write_sel = sel_get_any_uid ("write:"); --- 314,373 ---- } static int ! objc_write_register_common (struct objc_typed_stream *stream, unsigned long key) { unsigned char buf[sizeof (unsigned long)+2]; ! int len = __objc_code_unsigned_long (buf + 1, key); if (len == 1) { buf[0] = _B_RCOMM|0x01; buf[1] &= _B_VALUE; ! return (*stream->write) (stream->physical, buf, len + 1); } else { buf[1] = (buf[1]&_B_VALUE)|_B_RCOMM; ! return (*stream->write) (stream->physical, buf + 1, len); } } static int ! objc_write_use_common (struct objc_typed_stream *stream, unsigned long key) { unsigned char buf[sizeof (unsigned long)+2]; ! int len = __objc_code_unsigned_long (buf + 1, key); if (len == 1) { buf[0] = _B_UCOMM|0x01; buf[1] &= _B_VALUE; ! return (*stream->write) (stream->physical, buf, 2); } else { buf[1] = (buf[1]&_B_VALUE)|_B_UCOMM; ! return (*stream->write) (stream->physical, buf + 1, len); } } static __inline__ int ! __objc_write_extension (struct objc_typed_stream *stream, unsigned char code) { if (code <= _B_VALUE) { unsigned char buf = code|_B_EXT; ! return (*stream->write) (stream->physical, &buf, 1); } else { ! objc_error (nil, OBJC_ERR_BAD_OPCODE, ! "__objc_write_extension: bad opcode %c\n", code); return -1; } } __inline__ int ! __objc_write_object (struct objc_typed_stream *stream, id object) { unsigned char buf = '\0'; SEL write_sel = sel_get_any_uid ("write:"); *************** __objc_write_object (struct objc_typed_s *** 378,392 **** { __objc_write_extension (stream, _BX_OBJECT); objc_write_class (stream, object->class_pointer); ! (*objc_msg_lookup(object, write_sel))(object, write_sel, stream); ! return (*stream->write)(stream->physical, &buf, 1); } else ! return objc_write_use_common(stream, 0); } int ! objc_write_object_reference (struct objc_typed_stream* stream, id object) { unsigned long key; if ((key = PTR2LONG(hash_value_for_key (stream->object_table, object)))) --- 375,389 ---- { __objc_write_extension (stream, _BX_OBJECT); objc_write_class (stream, object->class_pointer); ! (*objc_msg_lookup (object, write_sel)) (object, write_sel, stream); ! return (*stream->write) (stream->physical, &buf, 1); } else ! return objc_write_use_common (stream, 0); } int ! objc_write_object_reference (struct objc_typed_stream *stream, id object) { unsigned long key; if ((key = PTR2LONG(hash_value_for_key (stream->object_table, object)))) *************** objc_write_object_reference (struct objc *** 397,403 **** } int ! objc_write_root_object (struct objc_typed_stream* stream, id object) { int len = 0; if (stream->writing_root_p) --- 394,400 ---- } int ! objc_write_root_object (struct objc_typed_stream *stream, id object) { int len = 0; if (stream->writing_root_p) *************** objc_write_root_object (struct objc_type *** 407,428 **** { stream->writing_root_p = 1; __objc_write_extension (stream, _BX_OBJROOT); ! if((len = objc_write_object (stream, object))) ! __objc_finish_write_root_object(stream); stream->writing_root_p = 0; } return len; } int ! objc_write_object (struct objc_typed_stream* stream, id object) { unsigned long key; if ((key = PTR2LONG(hash_value_for_key (stream->object_table, object)))) return objc_write_use_common (stream, key); else if (object == nil) ! return objc_write_use_common(stream, 0); else { --- 404,425 ---- { stream->writing_root_p = 1; __objc_write_extension (stream, _BX_OBJROOT); ! if ((len = objc_write_object (stream, object))) ! __objc_finish_write_root_object (stream); stream->writing_root_p = 0; } return len; } int ! objc_write_object (struct objc_typed_stream *stream, id object) { unsigned long key; if ((key = PTR2LONG(hash_value_for_key (stream->object_table, object)))) return objc_write_use_common (stream, key); else if (object == nil) ! return objc_write_use_common (stream, 0); else { *************** objc_write_object (struct objc_typed_str *** 435,452 **** } __inline__ int ! __objc_write_class (struct objc_typed_stream* stream, struct objc_class* class) { __objc_write_extension (stream, _BX_CLASS); ! objc_write_string_atomic(stream, (char*)class->name, ! strlen((char*)class->name)); return objc_write_unsigned_long (stream, class->version); } static int ! objc_write_class (struct objc_typed_stream* stream, ! struct objc_class* class) { unsigned long key; if ((key = PTR2LONG(hash_value_for_key (stream->stream_table, class)))) --- 432,449 ---- } __inline__ int ! __objc_write_class (struct objc_typed_stream *stream, struct objc_class *class) { __objc_write_extension (stream, _BX_CLASS); ! objc_write_string_atomic (stream, (char *) class->name, ! strlen ((char *) class->name)); return objc_write_unsigned_long (stream, class->version); } static int ! objc_write_class (struct objc_typed_stream *stream, ! struct objc_class *class) { unsigned long key; if ((key = PTR2LONG(hash_value_for_key (stream->stream_table, class)))) *************** objc_write_class (struct objc_typed_stre *** 454,460 **** else { int length; ! hash_add (&stream->stream_table, LONG2PTR(key=PTR2LONG(class)), class); if ((length = objc_write_register_common (stream, key))) return __objc_write_class (stream, class); return length; --- 451,457 ---- else { int length; ! hash_add (&stream->stream_table, LONG2PTR(key = PTR2LONG(class)), class); if ((length = objc_write_register_common (stream, key))) return __objc_write_class (stream, class); return length; *************** objc_write_class (struct objc_typed_stre *** 463,471 **** __inline__ int ! __objc_write_selector (struct objc_typed_stream* stream, SEL selector) { ! const char* sel_name; __objc_write_extension (stream, _BX_SEL); /* to handle NULL selectors */ if ((SEL)0 == selector) --- 460,468 ---- __inline__ int ! __objc_write_selector (struct objc_typed_stream *stream, SEL selector) { ! const char *sel_name; __objc_write_extension (stream, _BX_SEL); /* to handle NULL selectors */ if ((SEL)0 == selector) *************** __objc_write_selector (struct objc_typed *** 475,483 **** } int ! objc_write_selector (struct objc_typed_stream* stream, SEL selector) { ! const char* sel_name; unsigned long key; /* to handle NULL selectors */ --- 472,480 ---- } int ! objc_write_selector (struct objc_typed_stream *stream, SEL selector) { ! const char *sel_name; unsigned long key; /* to handle NULL selectors */ *************** objc_write_selector (struct objc_typed_s *** 491,497 **** { int length; hash_add (&stream->stream_table, ! LONG2PTR(key=PTR2LONG(sel_name)), (char*)sel_name); if ((length = objc_write_register_common (stream, key))) return __objc_write_selector (stream, selector); return length; --- 488,494 ---- { int length; hash_add (&stream->stream_table, ! LONG2PTR(key = PTR2LONG(sel_name)), (char *) sel_name); if ((length = objc_write_register_common (stream, key))) return __objc_write_selector (stream, selector); return length; *************** objc_write_selector (struct objc_typed_s *** 505,515 **** */ __inline__ int ! objc_read_char (struct objc_typed_stream* stream, char* val) { unsigned char buf; int len; ! len = (*stream->read)(stream->physical, &buf, 1); if (len != 0) { if ((buf & _B_CODE) == _B_SINT) --- 502,512 ---- */ __inline__ int ! objc_read_char (struct objc_typed_stream *stream, char *val) { unsigned char buf; int len; ! len = (*stream->read) (stream->physical, &buf, 1); if (len != 0) { if ((buf & _B_CODE) == _B_SINT) *************** objc_read_char (struct objc_typed_stream *** 517,563 **** else if ((buf & _B_NUMBER) == 1) { ! len = (*stream->read)(stream->physical, val, 1); if (buf&_B_SIGN) ! (*val) = -1*(*val); } else ! objc_error(nil, OBJC_ERR_BAD_DATA, ! "expected 8bit signed int, got %dbit int", ! (int)(buf&_B_NUMBER)*8); } return len; } __inline__ int ! objc_read_unsigned_char (struct objc_typed_stream* stream, unsigned char* val) { unsigned char buf; int len; ! if ((len = (*stream->read)(stream->physical, &buf, 1))) { if ((buf & _B_CODE) == _B_SINT) (*val) = (buf & _B_VALUE); else if ((buf & _B_NUMBER) == 1) ! len = (*stream->read)(stream->physical, val, 1); else ! objc_error(nil, OBJC_ERR_BAD_DATA, ! "expected 8bit unsigned int, got %dbit int", ! (int)(buf&_B_NUMBER)*8); } return len; } __inline__ int ! objc_read_short (struct objc_typed_stream* stream, short* value) { ! unsigned char buf[sizeof(short)+1]; int len; ! if ((len = (*stream->read)(stream->physical, buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); --- 514,560 ---- else if ((buf & _B_NUMBER) == 1) { ! len = (*stream->read) (stream->physical, val, 1); if (buf&_B_SIGN) ! (*val) = -1 * (*val); } else ! objc_error (nil, OBJC_ERR_BAD_DATA, ! "expected 8bit signed int, got %dbit int", ! (int) (buf&_B_NUMBER)*8); } return len; } __inline__ int ! objc_read_unsigned_char (struct objc_typed_stream *stream, unsigned char *val) { unsigned char buf; int len; ! if ((len = (*stream->read) (stream->physical, &buf, 1))) { if ((buf & _B_CODE) == _B_SINT) (*val) = (buf & _B_VALUE); else if ((buf & _B_NUMBER) == 1) ! len = (*stream->read) (stream->physical, val, 1); else ! objc_error (nil, OBJC_ERR_BAD_DATA, ! "expected 8bit unsigned int, got %dbit int", ! (int) (buf&_B_NUMBER)*8); } return len; } __inline__ int ! objc_read_short (struct objc_typed_stream *stream, short *value) { ! unsigned char buf[sizeof (short) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); *************** objc_read_short (struct objc_typed_strea *** 566,575 **** { int pos = 1; int nbytes = buf[0] & _B_NUMBER; ! if (nbytes > sizeof (short)) ! objc_error(nil, OBJC_ERR_BAD_DATA, ! "expected short, got bigger (%dbits)", nbytes*8); ! len = (*stream->read)(stream->physical, buf+1, nbytes); (*value) = 0; while (pos <= nbytes) (*value) = ((*value)*0x100) + buf[pos++]; --- 563,572 ---- { int pos = 1; int nbytes = buf[0] & _B_NUMBER; ! if (nbytes > (int) sizeof (short)) ! objc_error (nil, OBJC_ERR_BAD_DATA, ! "expected short, got bigger (%dbits)", nbytes*8); ! len = (*stream->read) (stream->physical, buf + 1, nbytes); (*value) = 0; while (pos <= nbytes) (*value) = ((*value)*0x100) + buf[pos++]; *************** objc_read_short (struct objc_typed_strea *** 581,592 **** } __inline__ int ! objc_read_unsigned_short (struct objc_typed_stream* stream, ! unsigned short* value) { ! unsigned char buf[sizeof(unsigned short)+1]; int len; ! if ((len = (*stream->read)(stream->physical, buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); --- 578,589 ---- } __inline__ int ! objc_read_unsigned_short (struct objc_typed_stream *stream, ! unsigned short *value) { ! unsigned char buf[sizeof (unsigned short) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); *************** objc_read_unsigned_short (struct objc_ty *** 595,604 **** { int pos = 1; int nbytes = buf[0] & _B_NUMBER; ! if (nbytes > sizeof (short)) ! objc_error(nil, OBJC_ERR_BAD_DATA, ! "expected short, got int or bigger"); ! len = (*stream->read)(stream->physical, buf+1, nbytes); (*value) = 0; while (pos <= nbytes) (*value) = ((*value)*0x100) + buf[pos++]; --- 592,601 ---- { int pos = 1; int nbytes = buf[0] & _B_NUMBER; ! if (nbytes > (int) sizeof (short)) ! objc_error (nil, OBJC_ERR_BAD_DATA, ! "expected short, got int or bigger"); ! len = (*stream->read) (stream->physical, buf + 1, nbytes); (*value) = 0; while (pos <= nbytes) (*value) = ((*value)*0x100) + buf[pos++]; *************** objc_read_unsigned_short (struct objc_ty *** 609,619 **** __inline__ int ! objc_read_int (struct objc_typed_stream* stream, int* value) { ! unsigned char buf[sizeof(int)+1]; int len; ! if ((len = (*stream->read)(stream->physical, buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); --- 606,616 ---- __inline__ int ! objc_read_int (struct objc_typed_stream *stream, int *value) { ! unsigned char buf[sizeof (int) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); *************** objc_read_int (struct objc_typed_stream* *** 622,630 **** { int pos = 1; int nbytes = buf[0] & _B_NUMBER; ! if (nbytes > sizeof (int)) ! objc_error(nil, OBJC_ERR_BAD_DATA, "expected int, got bigger"); ! len = (*stream->read)(stream->physical, buf+1, nbytes); (*value) = 0; while (pos <= nbytes) (*value) = ((*value)*0x100) + buf[pos++]; --- 619,627 ---- { int pos = 1; int nbytes = buf[0] & _B_NUMBER; ! if (nbytes > (int) sizeof (int)) ! objc_error (nil, OBJC_ERR_BAD_DATA, "expected int, got bigger"); ! len = (*stream->read) (stream->physical, buf + 1, nbytes); (*value) = 0; while (pos <= nbytes) (*value) = ((*value)*0x100) + buf[pos++]; *************** objc_read_int (struct objc_typed_stream* *** 636,646 **** } __inline__ int ! objc_read_long (struct objc_typed_stream* stream, long* value) { ! unsigned char buf[sizeof(long)+1]; int len; ! if ((len = (*stream->read)(stream->physical, buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); --- 633,643 ---- } __inline__ int ! objc_read_long (struct objc_typed_stream *stream, long *value) { ! unsigned char buf[sizeof (long) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); *************** objc_read_long (struct objc_typed_stream *** 649,657 **** { int pos = 1; int nbytes = buf[0] & _B_NUMBER; ! if (nbytes > sizeof (long)) ! objc_error(nil, OBJC_ERR_BAD_DATA, "expected long, got bigger"); ! len = (*stream->read)(stream->physical, buf+1, nbytes); (*value) = 0; while (pos <= nbytes) (*value) = ((*value)*0x100) + buf[pos++]; --- 646,654 ---- { int pos = 1; int nbytes = buf[0] & _B_NUMBER; ! if (nbytes > (int) sizeof (long)) ! objc_error (nil, OBJC_ERR_BAD_DATA, "expected long, got bigger"); ! len = (*stream->read) (stream->physical, buf + 1, nbytes); (*value) = 0; while (pos <= nbytes) (*value) = ((*value)*0x100) + buf[pos++]; *************** objc_read_long (struct objc_typed_stream *** 663,678 **** } __inline__ int ! __objc_read_nbyte_uint (struct objc_typed_stream* stream, ! unsigned int nbytes, unsigned int* val) { ! int len, pos = 0; ! unsigned char buf[sizeof(unsigned int)+1]; if (nbytes > sizeof (int)) ! objc_error(nil, OBJC_ERR_BAD_DATA, "expected int, got bigger"); ! len = (*stream->read)(stream->physical, buf, nbytes); (*val) = 0; while (pos < nbytes) (*val) = ((*val)*0x100) + buf[pos++]; --- 660,676 ---- } __inline__ int ! __objc_read_nbyte_uint (struct objc_typed_stream *stream, ! unsigned int nbytes, unsigned int *val) { ! int len; ! unsigned int pos = 0; ! unsigned char buf[sizeof (unsigned int) + 1]; if (nbytes > sizeof (int)) ! objc_error (nil, OBJC_ERR_BAD_DATA, "expected int, got bigger"); ! len = (*stream->read) (stream->physical, buf, nbytes); (*val) = 0; while (pos < nbytes) (*val) = ((*val)*0x100) + buf[pos++]; *************** __objc_read_nbyte_uint (struct objc_type *** 681,692 **** __inline__ int ! objc_read_unsigned_int (struct objc_typed_stream* stream, ! unsigned int* value) { ! unsigned char buf[sizeof(unsigned int)+1]; int len; ! if ((len = (*stream->read)(stream->physical, buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); --- 679,690 ---- __inline__ int ! objc_read_unsigned_int (struct objc_typed_stream *stream, ! unsigned int *value) { ! unsigned char buf[sizeof (unsigned int) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); *************** objc_read_unsigned_int (struct objc_type *** 699,714 **** } int ! __objc_read_nbyte_ulong (struct objc_typed_stream* stream, ! unsigned int nbytes, unsigned long* val) { ! int len, pos = 0; ! unsigned char buf[sizeof(unsigned long)+1]; if (nbytes > sizeof (long)) ! objc_error(nil, OBJC_ERR_BAD_DATA, "expected long, got bigger"); ! len = (*stream->read)(stream->physical, buf, nbytes); (*val) = 0; while (pos < nbytes) (*val) = ((*val)*0x100) + buf[pos++]; --- 697,713 ---- } int ! __objc_read_nbyte_ulong (struct objc_typed_stream *stream, ! unsigned int nbytes, unsigned long *val) { ! int len; ! unsigned int pos = 0; ! unsigned char buf[sizeof (unsigned long) + 1]; if (nbytes > sizeof (long)) ! objc_error (nil, OBJC_ERR_BAD_DATA, "expected long, got bigger"); ! len = (*stream->read) (stream->physical, buf, nbytes); (*val) = 0; while (pos < nbytes) (*val) = ((*val)*0x100) + buf[pos++]; *************** __objc_read_nbyte_ulong (struct objc_typ *** 717,728 **** __inline__ int ! objc_read_unsigned_long (struct objc_typed_stream* stream, ! unsigned long* value) { ! unsigned char buf[sizeof(unsigned long)+1]; int len; ! if ((len = (*stream->read)(stream->physical, buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); --- 716,727 ---- __inline__ int ! objc_read_unsigned_long (struct objc_typed_stream *stream, ! unsigned long *value) { ! unsigned char buf[sizeof (unsigned long) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { if ((buf[0] & _B_CODE) == _B_SINT) (*value) = (buf[0] & _B_VALUE); *************** objc_read_unsigned_long (struct objc_typ *** 735,763 **** } __inline__ int ! objc_read_string (struct objc_typed_stream* stream, ! char** string) { ! unsigned char buf[sizeof(unsigned int)+1]; int len; ! if ((len = (*stream->read)(stream->physical, buf, 1))) { unsigned long key = 0; if ((buf[0]&_B_CODE) == _B_RCOMM) /* register following */ { ! len = __objc_read_nbyte_ulong(stream, (buf[0] & _B_VALUE), &key); ! len = (*stream->read)(stream->physical, buf, 1); } switch (buf[0]&_B_CODE) { case _B_SSTR: { int length = buf[0]&_B_VALUE; ! (*string) = (char*)objc_malloc(length+1); if (key) hash_add (&stream->stream_table, LONG2PTR(key), *string); ! len = (*stream->read)(stream->physical, *string, length); (*string)[length] = '\0'; } break; --- 734,762 ---- } __inline__ int ! objc_read_string (struct objc_typed_stream *stream, ! char **string) { ! unsigned char buf[sizeof (unsigned int) + 1]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { unsigned long key = 0; if ((buf[0]&_B_CODE) == _B_RCOMM) /* register following */ { ! len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! len = (*stream->read) (stream->physical, buf, 1); } switch (buf[0]&_B_CODE) { case _B_SSTR: { int length = buf[0]&_B_VALUE; ! (*string) = (char*)objc_malloc (length + 1); if (key) hash_add (&stream->stream_table, LONG2PTR(key), *string); ! len = (*stream->read) (stream->physical, *string, length); (*string)[length] = '\0'; } break; *************** objc_read_string (struct objc_typed_stre *** 765,773 **** case _B_UCOMM: { char *tmp; ! len = __objc_read_nbyte_ulong(stream, (buf[0] & _B_VALUE), &key); tmp = hash_value_for_key (stream->stream_table, LONG2PTR (key)); ! *string = objc_malloc (strlen(tmp) + 1); strcpy (*string, tmp); } break; --- 764,772 ---- case _B_UCOMM: { char *tmp; ! len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); tmp = hash_value_for_key (stream->stream_table, LONG2PTR (key)); ! *string = objc_malloc (strlen (tmp) + 1); strcpy (*string, tmp); } break; *************** objc_read_string (struct objc_typed_stre *** 775,794 **** case _B_NSTR: { unsigned int nbytes = buf[0]&_B_VALUE; ! len = __objc_read_nbyte_uint(stream, nbytes, &nbytes); if (len) { ! (*string) = (char*)objc_malloc(nbytes+1); if (key) hash_add (&stream->stream_table, LONG2PTR(key), *string); ! len = (*stream->read)(stream->physical, *string, nbytes); (*string)[nbytes] = '\0'; } } break; default: ! objc_error(nil, OBJC_ERR_BAD_DATA, ! "expected string, got opcode %c\n", (buf[0]&_B_CODE)); } } --- 774,793 ---- case _B_NSTR: { unsigned int nbytes = buf[0]&_B_VALUE; ! len = __objc_read_nbyte_uint (stream, nbytes, &nbytes); if (len) { ! (*string) = (char*)objc_malloc (nbytes + 1); if (key) hash_add (&stream->stream_table, LONG2PTR(key), *string); ! len = (*stream->read) (stream->physical, *string, nbytes); (*string)[nbytes] = '\0'; } } break; default: ! objc_error (nil, OBJC_ERR_BAD_DATA, ! "expected string, got opcode %c\n", (buf[0]&_B_CODE)); } } *************** objc_read_string (struct objc_typed_stre *** 797,815 **** int ! objc_read_object (struct objc_typed_stream* stream, id* object) { unsigned char buf[sizeof (unsigned int)]; int len; ! if ((len = (*stream->read)(stream->physical, buf, 1))) { SEL read_sel = sel_get_any_uid ("read:"); unsigned long key = 0; if ((buf[0]&_B_CODE) == _B_RCOMM) /* register common */ { ! len = __objc_read_nbyte_ulong(stream, (buf[0] & _B_VALUE), &key); ! len = (*stream->read)(stream->physical, buf, 1); } if (buf[0] == (_B_EXT | _BX_OBJECT)) --- 796,814 ---- int ! objc_read_object (struct objc_typed_stream *stream, id *object) { unsigned char buf[sizeof (unsigned int)]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { SEL read_sel = sel_get_any_uid ("read:"); unsigned long key = 0; if ((buf[0]&_B_CODE) == _B_RCOMM) /* register common */ { ! len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! len = (*stream->read) (stream->physical, buf, 1); } if (buf[0] == (_B_EXT | _BX_OBJECT)) *************** objc_read_object (struct objc_typed_stre *** 820,826 **** len = objc_read_class (stream, &class); /* create instance */ ! (*object) = class_create_instance(class); /* register? */ if (key) --- 819,825 ---- len = objc_read_class (stream, &class); /* create instance */ ! (*object) = class_create_instance (class); /* register? */ if (key) *************** objc_read_object (struct objc_typed_stre *** 828,975 **** /* send -read: */ if (__objc_responds_to (*object, read_sel)) ! (*get_imp(class, read_sel))(*object, read_sel, stream); /* check null-byte */ ! len = (*stream->read)(stream->physical, buf, 1); if (buf[0] != '\0') ! objc_error(nil, OBJC_ERR_BAD_DATA, ! "expected null-byte, got opcode %c", buf[0]); } else if ((buf[0]&_B_CODE) == _B_UCOMM) { if (key) ! objc_error(nil, OBJC_ERR_BAD_KEY, "cannot register use upcode..."); ! len = __objc_read_nbyte_ulong(stream, (buf[0] & _B_VALUE), &key); (*object) = hash_value_for_key (stream->object_table, LONG2PTR(key)); } else if (buf[0] == (_B_EXT | _BX_OBJREF)) /* a forward reference */ { ! struct objc_list* other; len = objc_read_unsigned_long (stream, &key); ! other = (struct objc_list*)hash_value_for_key (stream->object_refs, ! LONG2PTR(key)); hash_add (&stream->object_refs, LONG2PTR(key), ! (void*)list_cons(object, other)); } else if (buf[0] == (_B_EXT | _BX_OBJROOT)) /* a root object */ { if (key) ! objc_error(nil, OBJC_ERR_BAD_KEY, ! "cannot register root object..."); len = objc_read_object (stream, object); __objc_finish_read_root_object (stream); } else ! objc_error(nil, OBJC_ERR_BAD_DATA, ! "expected object, got opcode %c", buf[0]); } return len; } static int ! objc_read_class (struct objc_typed_stream* stream, Class* class) { unsigned char buf[sizeof (unsigned int)]; int len; ! if ((len = (*stream->read)(stream->physical, buf, 1))) { unsigned long key = 0; if ((buf[0]&_B_CODE) == _B_RCOMM) /* register following */ { ! len = __objc_read_nbyte_ulong(stream, (buf[0] & _B_VALUE), &key); ! len = (*stream->read)(stream->physical, buf, 1); } if (buf[0] == (_B_EXT | _BX_CLASS)) { ! char* class_name; unsigned long version; /* get class */ len = objc_read_string (stream, &class_name); ! (*class) = objc_get_class(class_name); ! objc_free(class_name); /* register */ if (key) hash_add (&stream->stream_table, LONG2PTR(key), *class); ! objc_read_unsigned_long(stream, &version); ! hash_add (&stream->class_table, (*class)->name, (void*)version); } else if ((buf[0]&_B_CODE) == _B_UCOMM) { if (key) ! objc_error(nil, OBJC_ERR_BAD_KEY, "cannot register use upcode..."); ! len = __objc_read_nbyte_ulong(stream, (buf[0] & _B_VALUE), &key); ! (*class) = hash_value_for_key (stream->stream_table, LONG2PTR(key)); ! if (!*class) ! objc_error(nil, OBJC_ERR_BAD_CLASS, ! "cannot find class for key %lu", key); } else ! objc_error(nil, OBJC_ERR_BAD_DATA, ! "expected class, got opcode %c", buf[0]); } return len; } int ! objc_read_selector (struct objc_typed_stream* stream, SEL* selector) { unsigned char buf[sizeof (unsigned int)]; int len; ! if ((len = (*stream->read)(stream->physical, buf, 1))) { unsigned long key = 0; if ((buf[0]&_B_CODE) == _B_RCOMM) /* register following */ { ! len = __objc_read_nbyte_ulong(stream, (buf[0] & _B_VALUE), &key); ! len = (*stream->read)(stream->physical, buf, 1); } if (buf[0] == (_B_EXT|_BX_SEL)) /* selector! */ { ! char* selector_name; /* get selector */ len = objc_read_string (stream, &selector_name); /* To handle NULL selectors */ ! if (0 == strlen(selector_name)) { (*selector) = (SEL)0; return 0; } else ! (*selector) = sel_get_any_uid(selector_name); ! objc_free(selector_name); /* register */ if (key) ! hash_add (&stream->stream_table, LONG2PTR(key), (void*)*selector); } else if ((buf[0]&_B_CODE) == _B_UCOMM) { if (key) ! objc_error(nil, OBJC_ERR_BAD_KEY, "cannot register use upcode..."); ! len = __objc_read_nbyte_ulong(stream, (buf[0] & _B_VALUE), &key); (*selector) = hash_value_for_key (stream->stream_table, LONG2PTR(key)); } else ! objc_error(nil, OBJC_ERR_BAD_DATA, ! "expected selector, got opcode %c", buf[0]); } return len; } --- 827,974 ---- /* send -read: */ if (__objc_responds_to (*object, read_sel)) ! (*get_imp (class, read_sel)) (*object, read_sel, stream); /* check null-byte */ ! len = (*stream->read) (stream->physical, buf, 1); if (buf[0] != '\0') ! objc_error (nil, OBJC_ERR_BAD_DATA, ! "expected null-byte, got opcode %c", buf[0]); } else if ((buf[0]&_B_CODE) == _B_UCOMM) { if (key) ! objc_error (nil, OBJC_ERR_BAD_KEY, "cannot register use upcode..."); ! len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); (*object) = hash_value_for_key (stream->object_table, LONG2PTR(key)); } else if (buf[0] == (_B_EXT | _BX_OBJREF)) /* a forward reference */ { ! struct objc_list *other; len = objc_read_unsigned_long (stream, &key); ! other = (struct objc_list *) hash_value_for_key (stream->object_refs, ! LONG2PTR(key)); hash_add (&stream->object_refs, LONG2PTR(key), ! (void *)list_cons (object, other)); } else if (buf[0] == (_B_EXT | _BX_OBJROOT)) /* a root object */ { if (key) ! objc_error (nil, OBJC_ERR_BAD_KEY, ! "cannot register root object..."); len = objc_read_object (stream, object); __objc_finish_read_root_object (stream); } else ! objc_error (nil, OBJC_ERR_BAD_DATA, ! "expected object, got opcode %c", buf[0]); } return len; } static int ! objc_read_class (struct objc_typed_stream *stream, Class *class) { unsigned char buf[sizeof (unsigned int)]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { unsigned long key = 0; if ((buf[0]&_B_CODE) == _B_RCOMM) /* register following */ { ! len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! len = (*stream->read) (stream->physical, buf, 1); } if (buf[0] == (_B_EXT | _BX_CLASS)) { ! char *class_name; unsigned long version; /* get class */ len = objc_read_string (stream, &class_name); ! (*class) = objc_get_class (class_name); ! objc_free (class_name); /* register */ if (key) hash_add (&stream->stream_table, LONG2PTR(key), *class); ! objc_read_unsigned_long (stream, &version); ! hash_add (&stream->class_table, (*class)->name, (void *)version); } else if ((buf[0]&_B_CODE) == _B_UCOMM) { if (key) ! objc_error (nil, OBJC_ERR_BAD_KEY, "cannot register use upcode..."); ! len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! *class = hash_value_for_key (stream->stream_table, LONG2PTR(key)); ! if (! *class) ! objc_error (nil, OBJC_ERR_BAD_CLASS, ! "cannot find class for key %lu", key); } else ! objc_error (nil, OBJC_ERR_BAD_DATA, ! "expected class, got opcode %c", buf[0]); } return len; } int ! objc_read_selector (struct objc_typed_stream *stream, SEL* selector) { unsigned char buf[sizeof (unsigned int)]; int len; ! if ((len = (*stream->read) (stream->physical, buf, 1))) { unsigned long key = 0; if ((buf[0]&_B_CODE) == _B_RCOMM) /* register following */ { ! len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); ! len = (*stream->read) (stream->physical, buf, 1); } if (buf[0] == (_B_EXT|_BX_SEL)) /* selector! */ { ! char *selector_name; /* get selector */ len = objc_read_string (stream, &selector_name); /* To handle NULL selectors */ ! if (0 == strlen (selector_name)) { (*selector) = (SEL)0; return 0; } else ! (*selector) = sel_get_any_uid (selector_name); ! objc_free (selector_name); /* register */ if (key) ! hash_add (&stream->stream_table, LONG2PTR(key), (void *) *selector); } else if ((buf[0]&_B_CODE) == _B_UCOMM) { if (key) ! objc_error (nil, OBJC_ERR_BAD_KEY, "cannot register use upcode..."); ! len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); (*selector) = hash_value_for_key (stream->stream_table, LONG2PTR(key)); } else ! objc_error (nil, OBJC_ERR_BAD_DATA, ! "expected selector, got opcode %c", buf[0]); } return len; } *************** objc_read_selector (struct objc_typed_st *** 984,1049 **** */ int ! objc_write_type(TypedStream* stream, const char* type, const void* data) { ! switch(*type) { case _C_ID: ! return objc_write_object (stream, *(id*)data); break; case _C_CLASS: ! return objc_write_class (stream, *(Class*)data); break; case _C_SEL: ! return objc_write_selector (stream, *(SEL*)data); break; case _C_CHR: ! return objc_write_char(stream, *(signed char*)data); break; case _C_UCHR: ! return objc_write_unsigned_char(stream, *(unsigned char*)data); break; case _C_SHT: ! return objc_write_short(stream, *(short*)data); break; case _C_USHT: ! return objc_write_unsigned_short(stream, *(unsigned short*)data); break; case _C_INT: ! return objc_write_int(stream, *(int*)data); break; case _C_UINT: ! return objc_write_unsigned_int(stream, *(unsigned int*)data); break; case _C_LNG: ! return objc_write_long(stream, *(long*)data); break; case _C_ULNG: ! return objc_write_unsigned_long(stream, *(unsigned long*)data); break; case _C_CHARPTR: ! return objc_write_string (stream, *(char**)data, strlen(*(char**)data)); break; case _C_ATOM: ! return objc_write_string_atomic (stream, *(char**)data, ! strlen(*(char**)data)); break; case _C_ARY_B: { ! int len = atoi(type+1); ! while (isdigit(*++type)) ; return objc_write_array (stream, type, len, data); } --- 983,1049 ---- */ int ! objc_write_type (TypedStream *stream, const char *type, const void *data) { ! switch (*type) { case _C_ID: ! return objc_write_object (stream, *(id *) data); break; case _C_CLASS: ! return objc_write_class (stream, *(Class *) data); break; case _C_SEL: ! return objc_write_selector (stream, *(SEL *) data); break; case _C_CHR: ! return objc_write_char (stream, *(signed char *) data); break; case _C_UCHR: ! return objc_write_unsigned_char (stream, *(unsigned char *) data); break; case _C_SHT: ! return objc_write_short (stream, *(short *) data); break; case _C_USHT: ! return objc_write_unsigned_short (stream, *(unsigned short *) data); break; case _C_INT: ! return objc_write_int (stream, *(int *) data); break; case _C_UINT: ! return objc_write_unsigned_int (stream, *(unsigned int *) data); break; case _C_LNG: ! return objc_write_long (stream, *(long *) data); break; case _C_ULNG: ! return objc_write_unsigned_long (stream, *(unsigned long *) data); break; case _C_CHARPTR: ! return objc_write_string (stream, ! *(char **) data, strlen (*(char **) data)); break; case _C_ATOM: ! return objc_write_string_atomic (stream, *(char **) data, ! strlen (*(char **) data)); break; case _C_ARY_B: { ! int len = atoi (type + 1); ! while (isdigit ((unsigned char) *++type)) ; return objc_write_array (stream, type, len, data); } *************** objc_write_type(TypedStream* stream, con *** 1059,1065 **** { align = objc_alignof_type (type); /* padd to alignment */ acc_size += ROUND (acc_size, align); ! objc_write_type (stream, type, ((char*)data)+acc_size); acc_size += objc_sizeof_type (type); /* add component size */ type = objc_skip_typespec (type); /* skip component */ } --- 1059,1065 ---- { align = objc_alignof_type (type); /* padd to alignment */ acc_size += ROUND (acc_size, align); ! objc_write_type (stream, type, ((char *) data) + acc_size); acc_size += objc_sizeof_type (type); /* add component size */ type = objc_skip_typespec (type); /* skip component */ } *************** objc_write_type(TypedStream* stream, con *** 1068,1075 **** default: { ! objc_error(nil, OBJC_ERR_BAD_TYPE, ! "objc_write_type: cannot parse typespec: %s\n", type); return 0; } } --- 1068,1075 ---- default: { ! objc_error (nil, OBJC_ERR_BAD_TYPE, ! "objc_write_type: cannot parse typespec: %s\n", type); return 0; } } *************** objc_write_type(TypedStream* stream, con *** 1083,1092 **** */ int ! objc_read_type(TypedStream* stream, const char* type, void* data) { char c; ! switch(c = *type) { case _C_ID: return objc_read_object (stream, (id*)data); break; --- 1083,1092 ---- */ int ! objc_read_type(TypedStream *stream, const char *type, void *data) { char c; ! switch (c = *type) { case _C_ID: return objc_read_object (stream, (id*)data); break; *************** objc_read_type(TypedStream* stream, cons *** 1138,1145 **** case _C_ARY_B: { ! int len = atoi(type+1); ! while (isdigit(*++type)) ; return objc_read_array (stream, type, len, data); } --- 1138,1145 ---- case _C_ARY_B: { ! int len = atoi (type + 1); ! while (isdigit ((unsigned char) *++type)) ; return objc_read_array (stream, type, len, data); } *************** objc_read_type(TypedStream* stream, cons *** 1164,1171 **** default: { ! objc_error(nil, OBJC_ERR_BAD_TYPE, ! "objc_read_type: cannot parse typespec: %s\n", type); return 0; } } --- 1164,1171 ---- default: { ! objc_error (nil, OBJC_ERR_BAD_TYPE, ! "objc_read_type: cannot parse typespec: %s\n", type); return 0; } } *************** objc_read_type(TypedStream* stream, cons *** 1182,1188 **** */ int ! objc_write_types (TypedStream* stream, const char* type, ...) { va_list args; const char *c; --- 1182,1188 ---- */ int ! objc_write_types (TypedStream *stream, const char *type, ...) { va_list args; const char *c; *************** objc_write_types (TypedStream* stream, c *** 1192,1208 **** for (c = type; *c; c = objc_skip_typespec (c)) { ! switch(*c) { case _C_ID: res = objc_write_object (stream, *va_arg (args, id*)); break; case _C_CLASS: ! res = objc_write_class (stream, *va_arg(args, Class*)); break; case _C_SEL: ! res = objc_write_selector (stream, *va_arg(args, SEL*)); break; case _C_CHR: --- 1192,1208 ---- for (c = type; *c; c = objc_skip_typespec (c)) { ! switch (*c) { case _C_ID: res = objc_write_object (stream, *va_arg (args, id*)); break; case _C_CLASS: ! res = objc_write_class (stream, *va_arg (args, Class*)); break; case _C_SEL: ! res = objc_write_selector (stream, *va_arg (args, SEL*)); break; case _C_CHR: *************** objc_write_types (TypedStream* stream, c *** 1215,1274 **** break; case _C_SHT: ! res = objc_write_short (stream, *va_arg(args, short*)); break; case _C_USHT: res = objc_write_unsigned_short (stream, ! *va_arg(args, unsigned short*)); break; case _C_INT: ! res = objc_write_int(stream, *va_arg(args, int*)); break; case _C_UINT: ! res = objc_write_unsigned_int(stream, *va_arg(args, unsigned int*)); break; case _C_LNG: ! res = objc_write_long(stream, *va_arg(args, long*)); break; case _C_ULNG: ! res = objc_write_unsigned_long(stream, *va_arg(args, unsigned long*)); break; case _C_CHARPTR: { ! char** str = va_arg(args, char**); ! res = objc_write_string (stream, *str, strlen(*str)); } break; case _C_ATOM: { ! char** str = va_arg(args, char**); ! res = objc_write_string_atomic (stream, *str, strlen(*str)); } break; case _C_ARY_B: { ! int len = atoi(c+1); ! const char* t = c; ! while (isdigit(*++t)) ; ! res = objc_write_array (stream, t, len, va_arg(args, void*)); t = objc_skip_typespec (t); if (*t != _C_ARY_E) ! objc_error(nil, OBJC_ERR_BAD_TYPE, "expected `]', got: %s", t); } break; default: ! objc_error(nil, OBJC_ERR_BAD_TYPE, ! "objc_write_types: cannot parse typespec: %s\n", type); } } va_end(args); --- 1215,1274 ---- break; case _C_SHT: ! res = objc_write_short (stream, *va_arg (args, short*)); break; case _C_USHT: res = objc_write_unsigned_short (stream, ! *va_arg (args, unsigned short*)); break; case _C_INT: ! res = objc_write_int(stream, *va_arg (args, int*)); break; case _C_UINT: ! res = objc_write_unsigned_int(stream, *va_arg (args, unsigned int*)); break; case _C_LNG: ! res = objc_write_long(stream, *va_arg (args, long*)); break; case _C_ULNG: ! res = objc_write_unsigned_long(stream, *va_arg (args, unsigned long*)); break; case _C_CHARPTR: { ! char **str = va_arg (args, char **); ! res = objc_write_string (stream, *str, strlen (*str)); } break; case _C_ATOM: { ! char **str = va_arg (args, char **); ! res = objc_write_string_atomic (stream, *str, strlen (*str)); } break; case _C_ARY_B: { ! int len = atoi (c + 1); ! const char *t = c; ! while (isdigit ((unsigned char) *++t)) ; ! res = objc_write_array (stream, t, len, va_arg (args, void *)); t = objc_skip_typespec (t); if (*t != _C_ARY_E) ! objc_error (nil, OBJC_ERR_BAD_TYPE, "expected `]', got: %s", t); } break; default: ! objc_error (nil, OBJC_ERR_BAD_TYPE, ! "objc_write_types: cannot parse typespec: %s\n", type); } } va_end(args); *************** objc_write_types (TypedStream* stream, c *** 1282,1369 **** */ int ! objc_read_types(TypedStream* stream, const char* type, ...) { va_list args; const char *c; int res = 0; ! va_start(args, type); for (c = type; *c; c = objc_skip_typespec(c)) { ! switch(*c) { case _C_ID: ! res = objc_read_object(stream, va_arg(args, id*)); break; case _C_CLASS: ! res = objc_read_class(stream, va_arg(args, Class*)); break; case _C_SEL: ! res = objc_read_selector(stream, va_arg(args, SEL*)); break; case _C_CHR: ! res = objc_read_char(stream, va_arg(args, char*)); break; case _C_UCHR: ! res = objc_read_unsigned_char(stream, va_arg(args, unsigned char*)); break; case _C_SHT: ! res = objc_read_short(stream, va_arg(args, short*)); break; case _C_USHT: ! res = objc_read_unsigned_short(stream, va_arg(args, unsigned short*)); break; case _C_INT: ! res = objc_read_int(stream, va_arg(args, int*)); break; case _C_UINT: ! res = objc_read_unsigned_int(stream, va_arg(args, unsigned int*)); break; case _C_LNG: ! res = objc_read_long(stream, va_arg(args, long*)); break; case _C_ULNG: ! res = objc_read_unsigned_long(stream, va_arg(args, unsigned long*)); break; case _C_CHARPTR: case _C_ATOM: { ! char** str = va_arg(args, char**); res = objc_read_string (stream, str); } break; case _C_ARY_B: { ! int len = atoi(c+1); ! const char* t = c; ! while (isdigit(*++t)) ; ! res = objc_read_array (stream, t, len, va_arg(args, void*)); t = objc_skip_typespec (t); if (*t != _C_ARY_E) ! objc_error(nil, OBJC_ERR_BAD_TYPE, "expected `]', got: %s", t); } break; default: ! objc_error(nil, OBJC_ERR_BAD_TYPE, ! "objc_read_types: cannot parse typespec: %s\n", type); } } ! va_end(args); return res; } --- 1282,1369 ---- */ int ! objc_read_types(TypedStream *stream, const char *type, ...) { va_list args; const char *c; int res = 0; ! va_start (args, type); for (c = type; *c; c = objc_skip_typespec(c)) { ! switch (*c) { case _C_ID: ! res = objc_read_object(stream, va_arg (args, id*)); break; case _C_CLASS: ! res = objc_read_class(stream, va_arg (args, Class*)); break; case _C_SEL: ! res = objc_read_selector(stream, va_arg (args, SEL*)); break; case _C_CHR: ! res = objc_read_char(stream, va_arg (args, char*)); break; case _C_UCHR: ! res = objc_read_unsigned_char(stream, va_arg (args, unsigned char*)); break; case _C_SHT: ! res = objc_read_short(stream, va_arg (args, short*)); break; case _C_USHT: ! res = objc_read_unsigned_short(stream, va_arg (args, unsigned short*)); break; case _C_INT: ! res = objc_read_int(stream, va_arg (args, int*)); break; case _C_UINT: ! res = objc_read_unsigned_int(stream, va_arg (args, unsigned int*)); break; case _C_LNG: ! res = objc_read_long(stream, va_arg (args, long*)); break; case _C_ULNG: ! res = objc_read_unsigned_long(stream, va_arg (args, unsigned long*)); break; case _C_CHARPTR: case _C_ATOM: { ! char **str = va_arg (args, char **); res = objc_read_string (stream, str); } break; case _C_ARY_B: { ! int len = atoi (c + 1); ! const char *t = c; ! while (isdigit ((unsigned char) *++t)) ; ! res = objc_read_array (stream, t, len, va_arg (args, void *)); t = objc_skip_typespec (t); if (*t != _C_ARY_E) ! objc_error (nil, OBJC_ERR_BAD_TYPE, "expected `]', got: %s", t); } break; default: ! objc_error (nil, OBJC_ERR_BAD_TYPE, ! "objc_read_types: cannot parse typespec: %s\n", type); } } ! va_end (args); return res; } *************** objc_read_types(TypedStream* stream, con *** 1373,1383 **** */ int ! objc_write_array (TypedStream* stream, const char* type, ! int count, const void* data) { int off = objc_sizeof_type(type); ! const char* where = data; while (count-- > 0) { --- 1373,1383 ---- */ int ! objc_write_array (TypedStream *stream, const char *type, ! int count, const void *data) { int off = objc_sizeof_type(type); ! const char *where = data; while (count-- > 0) { *************** objc_write_array (TypedStream* stream, c *** 1395,1405 **** */ int ! objc_read_array (TypedStream* stream, const char* type, ! int count, void* data) { int off = objc_sizeof_type(type); ! char* where = (char*)data; while (count-- > 0) { --- 1395,1405 ---- */ int ! objc_read_array (TypedStream *stream, const char *type, ! int count, void *data) { int off = objc_sizeof_type(type); ! char *where = (char*)data; while (count-- > 0) { *************** objc_read_array (TypedStream* stream, co *** 1410,1453 **** } static int ! __objc_fread(FILE* file, char* data, int len) { return fread(data, len, 1, file); } static int ! __objc_fwrite(FILE* file, char* data, int len) { return fwrite(data, len, 1, file); } static int ! __objc_feof(FILE* file) { return feof(file); } static int ! __objc_no_write(FILE* file, char* data, int len) { objc_error (nil, OBJC_ERR_NO_WRITE, "TypedStream not open for writing"); return 0; } static int ! __objc_no_read(FILE* file, char* data, int len) { objc_error (nil, OBJC_ERR_NO_READ, "TypedStream not open for reading"); return 0; } static int ! __objc_read_typed_stream_signature (TypedStream* stream) { char buffer[80]; int pos = 0; do ! (*stream->read)(stream->physical, buffer+pos, 1); while (buffer[pos++] != '\0') ; sscanf (buffer, "GNU TypedStream %d", &stream->version); --- 1410,1457 ---- } static int ! __objc_fread (FILE *file, char *data, int len) { return fread(data, len, 1, file); } static int ! __objc_fwrite (FILE *file, char *data, int len) { return fwrite(data, len, 1, file); } static int ! __objc_feof (FILE *file) { return feof(file); } static int ! __objc_no_write (FILE *file __attribute__ ((__unused__)), ! const char *data __attribute__ ((__unused__)), ! int len __attribute__ ((__unused__))) { objc_error (nil, OBJC_ERR_NO_WRITE, "TypedStream not open for writing"); return 0; } static int ! __objc_no_read (FILE *file __attribute__ ((__unused__)), ! const char *data __attribute__ ((__unused__)), ! int len __attribute__ ((__unused__))) { objc_error (nil, OBJC_ERR_NO_READ, "TypedStream not open for reading"); return 0; } static int ! __objc_read_typed_stream_signature (TypedStream *stream) { char buffer[80]; int pos = 0; do ! (*stream->read) (stream->physical, buffer+pos, 1); while (buffer[pos++] != '\0') ; sscanf (buffer, "GNU TypedStream %d", &stream->version); *************** __objc_read_typed_stream_signature (Type *** 1458,1473 **** } static int ! __objc_write_typed_stream_signature (TypedStream* stream) { char buffer[80]; sprintf(buffer, "GNU TypedStream %d", OBJC_TYPED_STREAM_VERSION); stream->version = OBJC_TYPED_STREAM_VERSION; ! (*stream->write)(stream->physical, buffer, strlen(buffer)+1); return 1; } ! static void __objc_finish_write_root_object(struct objc_typed_stream* stream) { hash_delete (stream->object_table); stream->object_table = hash_new(64, --- 1462,1477 ---- } static int ! __objc_write_typed_stream_signature (TypedStream *stream) { char buffer[80]; sprintf(buffer, "GNU TypedStream %d", OBJC_TYPED_STREAM_VERSION); stream->version = OBJC_TYPED_STREAM_VERSION; ! (*stream->write) (stream->physical, buffer, strlen (buffer) + 1); return 1; } ! static void __objc_finish_write_root_object(struct objc_typed_stream *stream) { hash_delete (stream->object_table); stream->object_table = hash_new(64, *************** static void __objc_finish_write_root_obj *** 1475,1481 **** (compare_func_type)compare_ptrs); } ! static void __objc_finish_read_root_object(struct objc_typed_stream* stream) { node_ptr node; SEL awake_sel = sel_get_any_uid ("awake"); --- 1479,1485 ---- (compare_func_type)compare_ptrs); } ! static void __objc_finish_read_root_object(struct objc_typed_stream *stream) { node_ptr node; SEL awake_sel = sel_get_any_uid ("awake"); *************** static void __objc_finish_read_root_obje *** 1487,1498 **** for (node = hash_next (stream->object_refs, NULL); node; node = hash_next (stream->object_refs, node)) { ! struct objc_list* reflist = node->value; ! const void* key = node->key; id object = hash_value_for_key (stream->object_table, key); ! while(reflist) { ! *((id*)reflist->head) = object; if (hash_value_for_key (free_list,reflist) == NULL) hash_add (&free_list,reflist,reflist); --- 1491,1502 ---- for (node = hash_next (stream->object_refs, NULL); node; node = hash_next (stream->object_refs, node)) { ! struct objc_list *reflist = node->value; ! const void *key = node->key; id object = hash_value_for_key (stream->object_table, key); ! while (reflist) { ! *((id*) reflist->head) = object; if (hash_value_for_key (free_list,reflist) == NULL) hash_add (&free_list,reflist,reflist); *************** static void __objc_finish_read_root_obje *** 1520,1526 **** { id object = node->value; if (__objc_responds_to (object, awake_sel)) ! (*objc_msg_lookup(object, awake_sel))(object, awake_sel); } } --- 1524,1530 ---- { id object = node->value; if (__objc_responds_to (object, awake_sel)) ! (*objc_msg_lookup (object, awake_sel)) (object, awake_sel); } } *************** static void __objc_finish_read_root_obje *** 1535,1572 **** ** Open the stream PHYSICAL in MODE */ ! TypedStream* ! objc_open_typed_stream (FILE* physical, int mode) { ! TypedStream* s = (TypedStream*)objc_malloc(sizeof(TypedStream)); s->mode = mode; s->physical = physical; ! s->stream_table = hash_new(64, ! (hash_func_type)hash_ptr, ! (compare_func_type)compare_ptrs); ! s->object_table = hash_new(64, ! (hash_func_type)hash_ptr, ! (compare_func_type)compare_ptrs); ! s->eof = (objc_typed_eof_func)__objc_feof; ! s->flush = (objc_typed_flush_func)fflush; s->writing_root_p = 0; if (mode == OBJC_READONLY) { ! s->class_table = hash_new(8, (hash_func_type)hash_string, ! (compare_func_type)compare_strings); ! s->object_refs = hash_new(8, (hash_func_type)hash_ptr, ! (compare_func_type)compare_ptrs); ! s->read = (objc_typed_read_func)__objc_fread; ! s->write = (objc_typed_write_func)__objc_no_write; __objc_read_typed_stream_signature (s); } else if (mode == OBJC_WRITEONLY) { s->class_table = 0; s->object_refs = 0; ! s->read = (objc_typed_read_func)__objc_no_read; ! s->write = (objc_typed_write_func)__objc_fwrite; __objc_write_typed_stream_signature (s); } else --- 1539,1576 ---- ** Open the stream PHYSICAL in MODE */ ! TypedStream * ! objc_open_typed_stream (FILE *physical, int mode) { ! TypedStream *s = (TypedStream *) objc_malloc (sizeof (TypedStream)); s->mode = mode; s->physical = physical; ! s->stream_table = hash_new (64, ! (hash_func_type) hash_ptr, ! (compare_func_type) compare_ptrs); ! s->object_table = hash_new (64, ! (hash_func_type) hash_ptr, ! (compare_func_type) compare_ptrs); ! s->eof = (objc_typed_eof_func) __objc_feof; ! s->flush = (objc_typed_flush_func) fflush; s->writing_root_p = 0; if (mode == OBJC_READONLY) { ! s->class_table = hash_new (8, (hash_func_type) hash_string, ! (compare_func_type) compare_strings); ! s->object_refs = hash_new (8, (hash_func_type) hash_ptr, ! (compare_func_type) compare_ptrs); ! s->read = (objc_typed_read_func) __objc_fread; ! s->write = (objc_typed_write_func) __objc_no_write; __objc_read_typed_stream_signature (s); } else if (mode == OBJC_WRITEONLY) { s->class_table = 0; s->object_refs = 0; ! s->read = (objc_typed_read_func) __objc_no_read; ! s->write = (objc_typed_write_func) __objc_fwrite; __objc_write_typed_stream_signature (s); } else *************** objc_open_typed_stream (FILE* physical, *** 1583,1592 **** */ TypedStream* ! objc_open_typed_stream_for_file (const char* file_name, int mode) { ! FILE* file = NULL; ! TypedStream* s; if (mode == OBJC_READONLY) file = fopen (file_name, "r"); --- 1587,1596 ---- */ TypedStream* ! objc_open_typed_stream_for_file (const char *file_name, int mode) { ! FILE *file = NULL; ! TypedStream *s; if (mode == OBJC_READONLY) file = fopen (file_name, "r"); *************** objc_open_typed_stream_for_file (const c *** 1610,1616 **** */ void ! objc_close_typed_stream (TypedStream* stream) { if (stream->mode == OBJC_READONLY) { --- 1614,1620 ---- */ void ! objc_close_typed_stream (TypedStream *stream) { if (stream->mode == OBJC_READONLY) { *************** objc_close_typed_stream (TypedStream* st *** 1623,1647 **** hash_delete (stream->object_table); if (stream->type == (OBJC_MANAGED_STREAM | OBJC_FILE_STREAM)) ! fclose ((FILE*)stream->physical); objc_free(stream); } BOOL ! objc_end_of_typed_stream (TypedStream* stream) { ! return (*stream->eof)(stream->physical); } void ! objc_flush_typed_stream (TypedStream* stream) { ! (*stream->flush)(stream->physical); } long ! objc_get_stream_class_version (TypedStream* stream, Class class) { if (stream->class_table) return PTR2LONG(hash_value_for_key (stream->class_table, class->name)); --- 1627,1651 ---- hash_delete (stream->object_table); if (stream->type == (OBJC_MANAGED_STREAM | OBJC_FILE_STREAM)) ! fclose ((FILE *)stream->physical); objc_free(stream); } BOOL ! objc_end_of_typed_stream (TypedStream *stream) { ! return (*stream->eof) (stream->physical); } void ! objc_flush_typed_stream (TypedStream *stream) { ! (*stream->flush) (stream->physical); } long ! objc_get_stream_class_version (TypedStream *stream, Class class) { if (stream->class_table) return PTR2LONG(hash_value_for_key (stream->class_table, class->name)); diff -Nrc3pad gcc-3.2.3/libobjc/ChangeLog gcc-3.3/libobjc/ChangeLog *** gcc-3.2.3/libobjc/ChangeLog 2003-04-22 06:15:46.000000000 +0000 --- gcc-3.3/libobjc/ChangeLog 2003-05-14 00:11:14.000000000 +0000 *************** *** 1,16 **** ! 2003-04-22 Release Manager ! * GCC 3.2.3 Released. ! 2003-02-05 Release Manager ! * GCC 3.2.2 Released. ! 2003-01-28 Christian Cornelssen ! * Makefile.in (FLAGS_TO_PASS): Also pass DESTDIR. ! (install-libs, install-headers): Prepend $(DESTDIR) to ! destination paths in all (un)installation commands. 2003-01-27 Alexandre Oliva --- 1,20 ---- ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! 2003-05-13 Release Manager ! * GCC 3.3 Released. ! ! 2003-02-20 Alexandre Oliva ! ! * configure.in: Propagate ORIGINAL_LD_FOR_MULTILIBS to ! config.status. ! * configure: Rebuilt. 2003-01-27 Alexandre Oliva *************** *** 19,47 **** version_specific_libs is enabled. * configure: Rebuilt. ! 2002-11-19 Release Manager ! ! * GCC 3.2.1 Released. ! ! 2002-11-19 Release Manager ! * GCC 3.2.1 Released. ! 2002-11-18 Release Manager ! * GCC 3.2.1 Released. ! 2002-10-07 Kaveh R. Ghazi ! * Makefile.in (all): Fix multilib parallel build. ! 2002-08-14 Release Manager ! * GCC 3.2 Released. ! 2002-07-25 Release Manager ! * GCC 3.1.1 Released. 2002-06-25 DJ Delorie --- 23,71 ---- version_specific_libs is enabled. * configure: Rebuilt. ! 2003-01-26 Christian Cornelssen ! * Makefile.in (FLAGS_TO_PASS): Also pass DESTDIR. ! (install-libs, install-headers): Prepend $(DESTDIR) to ! destination paths in all (un)installation commands. ! 2002-09-22 Kaveh R. Ghazi ! * Makefile.in (all): Fix multilib parallel build. ! Thu Sep 12 12:44:37 2002 Nicola Pero ! * sendmsg.c (nil_method): Declare not to take a variable number of ! args. ! (objc_msg_lookup): Cast nil_method to IMP before returning it. ! (objc_msg_lookup_super): The same. ! 2002-09-10 Jan Hubicka ! * nil_method.c (nil_method): No longer defined with variable ! arguments. ! 2002-07-02 Rodney Brown ! * objc/encoding.h: Fix formatting. ! * objc/hash.h: Likewise. ! * objc/objc-api.h: Likewise. ! * objc/runtime.h: Likewise. ! * objc/thr.h: Likewise. ! * archive.c: Likewise. ! * class.c: Likewise. ! * encoding.c: Likewise. ! * gc.c: Likewise. ! * hash.c: Likewise. ! * init.c: Likewise. ! * misc.c: Likewise. ! * nil_method.c: Likewise. ! * objects.c: Likewise. ! * sarray.c: Likewise. ! * selector.c: Likewise. ! * sendmsg.c: Likewise. ! * thr-mach.c: Likewise. ! * thr.c: Likewise. 2002-06-25 DJ Delorie *************** *** 50,62 **** * configure.in: Call it before AC_CANONICAL_SYSTEM. * configure: Regenerate. ! 2002-05-14 Release Manager ! * GCC 3.1 Released. ! 2002-05-14 Release Manager ! * GCC 3.1 Released. 2002-05-08 Alexandre Oliva --- 74,141 ---- * configure.in: Call it before AC_CANONICAL_SYSTEM. * configure: Regenerate. ! 2002-06-21 Kaveh R. Ghazi ! * Object.m (forward, read, write): Fix unused parameter warnings. ! * encoding.c: Include . ! (target_flags): Mark with attribute unused. ! (atoi): Delete. ! * runtime.h (__objc_selector_max_index): Change to unsigned int. ! (__objc_generate_gc_type_description): Prototype. ! * selector.c (__objc_selector_max_index): Change to unsigned int. ! Mon Jun 17 18:37:42 2002 Nicola Pero ! * sendmsg.c (__objc_get_forward_imp): Fix warning by making sure ! we always have a return value: if __objc_msg_forward does not ! supply a forwarding implementation, return the default ! __builtin_apply based one. ! ! 2002-06-15 Kaveh R. Ghazi ! ! * Object.m: Fix signed/unsigned warning. ! * Protocol.m: Likewise. ! * archive.c: Always include stdlib.h. ! (objc_read_short, objc_read_unsigned_short, objc_read_int, ! objc_read_long, __objc_read_nbyte_uint, __objc_read_nbyte_ulong): ! Fix signed/unsigned warning. ! (objc_write_type, objc_read_type, objc_write_types, ! objc_read_types): Ensure ctype 8-bit safety. ! (__objc_no_write, __objc_no_read): Mark unused parameters. ! * class.c (class_table_setup): Specify void arg. ! * encoding.c (atoi, objc_sizeof_type, objc_alignof_type, ! objc_skip_typespec, objc_skip_offset, ! objc_layout_structure_next_member): Ensure ctype 8-bit safety. ! (objc_layout_structure_next_member): Ensure variables are ! initialized. ! * gc.c (__objc_generate_gc_type_description, ! class_ivar_set_gcinvisible): Mark unused parameters. ! * init.c (__objc_send_load, __objc_destroy_class_tree_node): Mark ! unused parameters. ! (__objc_init_protocols) Fix signed/unsigned warning. ! * nil_method.c (nil_method): Mark unused parameters. ! * thr.h (objc_thread_callback): Specify void arg. ! * sarray.c (sarray_new, sarray_realloc, sarray_free): Fix ! signed/unsigned warning. ! (sarray_free): Fix formatting. ! * selector.c (sel_types_match): Ensure ctype 8-bit safety. ! * sendmsg.c (__objc_init_install_dtable) Mark unused parameters. ! ! 2002-06-09 Andreas Jaeger ! ! * encoding.c (objc_layout_structure_next_member): Remove unused ! variable. ! ! 2002-05-20 Kaveh R. Ghazi ! ! * Makefile.in (SHELL): Set to @SHELL@. ! (WARN_CFLAGS): New. ! (ALL_CFLAGS): Add $(WARN_CFLAGS). ! ! 2002-05-16 Rainer Orth ! ! * aclocal.m4: Allow for PWDCMD to override hardcoded pwd. ! * configure: Regenerate. 2002-05-08 Alexandre Oliva *************** Wed Jan 3 00:49:10 2001 Ovidiu Predesc *** 230,243 **** function. This can alleviate problems __builtin_apply() and friends have on various platforms. (Solution suggested by Helge Hess.) ! * objc/objc-api.h: Define __objc_msg_forward. * sendmsg.c: Define gen_rtx_REG. 2000-12-06 Ralf Corsepius ! * thr-rtems.c: New file. Stub to compile. 2000-09-06 Alexandre Oliva --- 309,322 ---- function. This can alleviate problems __builtin_apply() and friends have on various platforms. (Solution suggested by Helge Hess.) ! * objc/objc-api.h: Define __objc_msg_forward. * sendmsg.c: Define gen_rtx_REG. 2000-12-06 Ralf Corsepius ! * thr-rtems.c: New file. Stub to compile. 2000-09-06 Alexandre Oliva *************** Sun Aug 6 22:51:16 2000 Ovidiu Predesc *** 279,285 **** Fri Jul 28 08:58:02 2000 Nicola Pero ! * configure.in: Added libtool support; build shared libraries if --enable-shared was passed on command line. * Makefile.in: Modified most compilation commands to use libtool. * aclocal.m4: New symbolic link to the ../libtool.m4, from the --- 358,364 ---- Fri Jul 28 08:58:02 2000 Nicola Pero ! * configure.in: Added libtool support; build shared libraries if --enable-shared was passed on command line. * Makefile.in: Modified most compilation commands to use libtool. * aclocal.m4: New symbolic link to the ../libtool.m4, from the *************** Tue Sep 21 07:47:10 1999 Jeffrey A Law *** 340,346 **** * Makefile.in (gc.o, gc_gc.o): Do not pass -fgnu-runtime to the compiler when building C code. ! Fri Aug 6 23:32:29 1999 Daniel Jacobowitz * Makefile.in (FLAGS_TO_PASS): Include prefix, exec_prefix, --- 419,425 ---- * Makefile.in (gc.o, gc_gc.o): Do not pass -fgnu-runtime to the compiler when building C code. ! Fri Aug 6 23:32:29 1999 Daniel Jacobowitz * Makefile.in (FLAGS_TO_PASS): Include prefix, exec_prefix, *************** Sat Oct 17 05:21:31 1998 Ovidiu Predesc *** 419,425 **** Mon Oct 11 21:25:27 1998 Ovidiu Predescu * encoding.c: Redefine get_inner_array_type to get the first entry ! in the structure. Thu Oct 8 12:21:14 1998 Richard Frith-Macdonald --- 498,504 ---- Mon Oct 11 21:25:27 1998 Ovidiu Predescu * encoding.c: Redefine get_inner_array_type to get the first entry ! in the structure. Thu Oct 8 12:21:14 1998 Richard Frith-Macdonald *************** Mon Sep 21 23:27:10 1998 Ovidiu Predesc *** 484,487 **** 1998-09-21 Ben Elliston * New directory. Moved files from ../gcc/objc. - --- 563,565 ---- diff -Nrc3pad gcc-3.2.3/libobjc/class.c gcc-3.3/libobjc/class.c *** gcc-3.2.3/libobjc/class.c 2001-10-29 21:23:31.000000000 +0000 --- gcc-3.3/libobjc/class.c 2002-07-02 19:42:03.000000000 +0000 *************** *** 1,5 **** /* GNU Objective C Runtime class related functions ! Copyright (C) 1993, 1995, 1996, 1997, 2001 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup and Dennis Glatting. Lock-free class table code designed and written from scratch by --- 1,6 ---- /* GNU Objective C Runtime class related functions ! Copyright (C) 1993, 1995, 1996, 1997, 2001, 2002 ! Free Software Foundation, Inc. Contributed by Kresten Krab Thorup and Dennis Glatting. Lock-free class table code designed and written from scratch by *************** static objc_mutex_t __class_table_lock = *** 163,172 **** /* Setup the table. */ static void ! class_table_setup () { /* Start - nothing in the table. */ ! memset (class_table_array, 0, sizeof(class_node_ptr) * CLASS_TABLE_SIZE); /* The table writing mutex. */ __class_table_lock = objc_mutex_allocate (); --- 164,173 ---- /* Setup the table. */ static void ! class_table_setup (void) { /* Start - nothing in the table. */ ! memset (class_table_array, 0, sizeof (class_node_ptr) * CLASS_TABLE_SIZE); /* The table writing mutex. */ __class_table_lock = objc_mutex_allocate (); *************** class_table_next (struct class_table_enu *** 339,345 **** #if 0 /* DEBUGGING FUNCTIONS */ /* Debugging function - print the class table. */ void ! class_table_print () { int i; --- 340,346 ---- #if 0 /* DEBUGGING FUNCTIONS */ /* Debugging function - print the class table. */ void ! class_table_print (void) { int i; *************** class_table_print () *** 362,368 **** function of hash key values. Useful to evaluate the hash function in real cases. */ void ! class_table_print_histogram () { int i, j; int counter = 0; --- 363,369 ---- function of hash key values. Useful to evaluate the hash function in real cases. */ void ! class_table_print_histogram (void) { int i, j; int counter = 0; *************** class_table_print_histogram () *** 408,471 **** /* This is a hook which is called by objc_get_class and objc_lookup_class if the runtime is not able to find the class. This may e.g. try to load in the class using dynamic loading. */ ! Class (*_objc_lookup_class)(const char* name) = 0; /* !T:SAFE */ /* True when class links has been resolved. */ BOOL __objc_class_links_resolved = NO; /* !T:UNUSED */ ! void __objc_init_class_tables() { /* Allocate the class hash table. */ ! if(__class_table_lock) return; ! objc_mutex_lock(__objc_runtime_mutex); class_table_setup (); ! objc_mutex_unlock(__objc_runtime_mutex); } /* This function adds a class to the class hash table, and assigns the class a number, unless it's already known. */ void ! __objc_add_class_to_hash(Class class) { Class h_class; ! objc_mutex_lock(__objc_runtime_mutex); /* Make sure the table is there. */ ! assert(__class_table_lock); /* Make sure it's not a meta class. */ ! assert(CLS_ISCLASS(class)); /* Check to see if the class is already in the hash table. */ h_class = class_table_get_safe (class->name); ! if (!h_class) { /* The class isn't in the hash table. Add the class and assign a class number. */ static unsigned int class_number = 1; ! CLS_SETNUMBER(class, class_number); ! CLS_SETNUMBER(class->class_pointer, class_number); ++class_number; class_table_insert (class->name, class); } ! objc_mutex_unlock(__objc_runtime_mutex); } /* Get the class object for the class named NAME. If NAME does not identify a known class, the hook _objc_lookup_class is called. If this fails, nil is returned. */ ! Class objc_lookup_class (const char* name) { Class class; --- 409,474 ---- /* This is a hook which is called by objc_get_class and objc_lookup_class if the runtime is not able to find the class. This may e.g. try to load in the class using dynamic loading. */ ! Class (*_objc_lookup_class) (const char *name) = 0; /* !T:SAFE */ /* True when class links has been resolved. */ BOOL __objc_class_links_resolved = NO; /* !T:UNUSED */ ! void ! __objc_init_class_tables (void) { /* Allocate the class hash table. */ ! if (__class_table_lock) return; ! objc_mutex_lock (__objc_runtime_mutex); class_table_setup (); ! objc_mutex_unlock (__objc_runtime_mutex); } /* This function adds a class to the class hash table, and assigns the class a number, unless it's already known. */ void ! __objc_add_class_to_hash (Class class) { Class h_class; ! objc_mutex_lock (__objc_runtime_mutex); /* Make sure the table is there. */ ! assert (__class_table_lock); /* Make sure it's not a meta class. */ ! assert (CLS_ISCLASS (class)); /* Check to see if the class is already in the hash table. */ h_class = class_table_get_safe (class->name); ! if (! h_class) { /* The class isn't in the hash table. Add the class and assign a class number. */ static unsigned int class_number = 1; ! CLS_SETNUMBER (class, class_number); ! CLS_SETNUMBER (class->class_pointer, class_number); ++class_number; class_table_insert (class->name, class); } ! objc_mutex_unlock (__objc_runtime_mutex); } /* Get the class object for the class named NAME. If NAME does not identify a known class, the hook _objc_lookup_class is called. If this fails, nil is returned. */ ! Class ! objc_lookup_class (const char *name) { Class class; *************** Class objc_lookup_class (const char* nam *** 475,481 **** return class; if (_objc_lookup_class) ! return (*_objc_lookup_class)(name); else return 0; } --- 478,484 ---- return class; if (_objc_lookup_class) ! return (*_objc_lookup_class) (name); else return 0; } *************** objc_get_class (const char *name) *** 494,513 **** return class; if (_objc_lookup_class) ! class = (*_objc_lookup_class)(name); ! if(class) return class; ! objc_error(nil, OBJC_ERR_BAD_CLASS, ! "objc runtime: cannot find class %s\n", name); return 0; } MetaClass ! objc_get_meta_class(const char *name) { ! return objc_get_class(name)->class_pointer; } /* This function provides a way to enumerate all the classes in the --- 497,516 ---- return class; if (_objc_lookup_class) ! class = (*_objc_lookup_class) (name); ! if (class) return class; ! objc_error (nil, OBJC_ERR_BAD_CLASS, ! "objc runtime: cannot find class %s\n", name); return 0; } MetaClass ! objc_get_meta_class (const char *name) { ! return objc_get_class (name)->class_pointer; } /* This function provides a way to enumerate all the classes in the *************** objc_get_meta_class(const char *name) *** 516,537 **** For example: id class; void *es = NULL; ! while ((class = objc_next_class(&es))) ... do something with class; */ Class ! objc_next_class(void **enum_state) { Class class; ! objc_mutex_lock(__objc_runtime_mutex); /* Make sure the table is there. */ ! assert(__class_table_lock); ! class = class_table_next ((struct class_table_enumerator **)enum_state); ! objc_mutex_unlock(__objc_runtime_mutex); return class; } --- 519,540 ---- For example: id class; void *es = NULL; ! while ((class = objc_next_class (&es))) ... do something with class; */ Class ! objc_next_class (void **enum_state) { Class class; ! objc_mutex_lock (__objc_runtime_mutex); /* Make sure the table is there. */ ! assert (__class_table_lock); ! class = class_table_next ((struct class_table_enumerator **) enum_state); ! objc_mutex_unlock (__objc_runtime_mutex); return class; } *************** objc_next_class(void **enum_state) *** 539,571 **** /* Resolve super/subclass links for all classes. The only thing we can be sure of is that the class_pointer for class objects point to the right meta class objects. */ ! void __objc_resolve_class_links() { struct class_table_enumerator *es = NULL; Class object_class = objc_get_class ("Object"); Class class1; ! assert(object_class); ! objc_mutex_lock(__objc_runtime_mutex); /* Assign subclass links. */ while ((class1 = class_table_next (&es))) { /* Make sure we have what we think we have. */ ! assert (CLS_ISCLASS(class1)); ! assert (CLS_ISMETA(class1->class_pointer)); /* The class_pointer of all meta classes point to Object's meta class. */ class1->class_pointer->class_pointer = object_class->class_pointer; ! if (!(CLS_ISRESOLV(class1))) { ! CLS_SETRESOLV(class1); ! CLS_SETRESOLV(class1->class_pointer); ! if(class1->super_class) { Class a_super_class = objc_get_class ((char *) class1->super_class); --- 542,575 ---- /* Resolve super/subclass links for all classes. The only thing we can be sure of is that the class_pointer for class objects point to the right meta class objects. */ ! void ! __objc_resolve_class_links (void) { struct class_table_enumerator *es = NULL; Class object_class = objc_get_class ("Object"); Class class1; ! assert (object_class); ! objc_mutex_lock (__objc_runtime_mutex); /* Assign subclass links. */ while ((class1 = class_table_next (&es))) { /* Make sure we have what we think we have. */ ! assert (CLS_ISCLASS (class1)); ! assert (CLS_ISMETA (class1->class_pointer)); /* The class_pointer of all meta classes point to Object's meta class. */ class1->class_pointer->class_pointer = object_class->class_pointer; ! if (! CLS_ISRESOLV (class1)) { ! CLS_SETRESOLV (class1); ! CLS_SETRESOLV (class1->class_pointer); ! if (class1->super_class) { Class a_super_class = objc_get_class ((char *) class1->super_class); *************** void __objc_resolve_class_links() *** 607,618 **** sub_class = sub_class->sibling_class) { sub_class->super_class = class1; ! if(CLS_ISCLASS(sub_class)) sub_class->class_pointer->super_class = class1->class_pointer; } } ! objc_mutex_unlock(__objc_runtime_mutex); } --- 611,622 ---- sub_class = sub_class->sibling_class) { sub_class->super_class = class1; ! if (CLS_ISCLASS (sub_class)) sub_class->class_pointer->super_class = class1->class_pointer; } } ! objc_mutex_unlock (__objc_runtime_mutex); } *************** void __objc_resolve_class_links() *** 622,628 **** Class class_pose_as (Class impostor, Class super_class) { ! if (!CLS_ISRESOLV (impostor)) __objc_resolve_class_links (); /* Preconditions */ --- 626,632 ---- Class class_pose_as (Class impostor, Class super_class) { ! if (! CLS_ISRESOLV (impostor)) __objc_resolve_class_links (); /* Preconditions */ *************** class_pose_as (Class impostor, Class sup *** 685,695 **** keys of the hashtable is, change all values that are superclass into impostor. */ ! objc_mutex_lock(__objc_runtime_mutex); class_table_replace (super_class, impostor); ! objc_mutex_unlock(__objc_runtime_mutex); /* Next, we update the dispatch tables... */ __objc_update_dispatch_table_for_class (CLASSOF (impostor)); --- 689,699 ---- keys of the hashtable is, change all values that are superclass into impostor. */ ! objc_mutex_lock (__objc_runtime_mutex); class_table_replace (super_class, impostor); ! objc_mutex_unlock (__objc_runtime_mutex); /* Next, we update the dispatch tables... */ __objc_update_dispatch_table_for_class (CLASSOF (impostor)); diff -Nrc3pad gcc-3.2.3/libobjc/configure gcc-3.3/libobjc/configure *** gcc-3.2.3/libobjc/configure 2003-01-28 01:44:04.000000000 +0000 --- gcc-3.3/libobjc/configure 2003-02-20 09:12:04.000000000 +0000 *************** test "$ac_cv_mingw32" = yes && MINGW32=y *** 772,778 **** # These need to be absolute paths, yet at the same time need to # canonicalize only relative paths, because then amd will not unmount # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd. ! glibcpp_builddir=`pwd` case $srcdir in \\/$* | ?:\\/*) glibcpp_srcdir=${srcdir} ;; *) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;; --- 772,778 ---- # These need to be absolute paths, yet at the same time need to # canonicalize only relative paths, because then amd will not unmount # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd. ! glibcpp_builddir=`${PWDCMD-pwd}` case $srcdir in \\/$* | ?:\\/*) glibcpp_srcdir=${srcdir} ;; *) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;; *************** gnu*) *** 1604,1612 **** ;; hpux10.20*|hpux11*) ! lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' ! lt_cv_file_magic_cmd=/usr/bin/file ! lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; irix5* | irix6*) --- 1604,1621 ---- ;; hpux10.20*|hpux11*) ! case $host_cpu in ! hppa*) ! lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' ! lt_cv_file_magic_cmd=/usr/bin/file ! lt_cv_file_magic_test_file=/usr/lib/libc.sl ! ;; ! ia64*) ! lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' ! lt_cv_file_magic_cmd=/usr/bin/file ! lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ! ;; ! esac ;; irix5* | irix6*) *************** file_magic_cmd=$lt_cv_file_magic_cmd *** 1696,1708 **** deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 ! echo "configure:1700: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext ! if { (eval echo configure:1706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; --- 1705,1717 ---- deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 ! echo "configure:1709: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext ! if { (eval echo configure:1715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; *************** case $deplibs_check_method in *** 1726,1732 **** file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 ! echo "configure:1730: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1735,1741 ---- file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 ! echo "configure:1739: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1788,1794 **** if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 ! echo "configure:1792: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1797,1803 ---- if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 ! echo "configure:1801: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** esac *** 1859,1865 **** # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1863: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1868,1874 ---- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1872: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 1891,1897 **** # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1895: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1900,1906 ---- # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1904: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 1926,1932 **** # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1930: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1935,1941 ---- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1939: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 1958,1964 **** # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1962: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1967,1973 ---- # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1971: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** test x"$pic_mode" = xno && libtool_flags *** 2025,2032 **** case $host in *-*-irix6*) # Find out which ABI we are using. ! echo '#line 2029 "configure"' > conftest.$ac_ext ! if { (eval echo configure:2030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" --- 2034,2054 ---- case $host in *-*-irix6*) # Find out which ABI we are using. ! echo '#line 2038 "configure"' > conftest.$ac_ext ! if { (eval echo configure:2039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! if test "$lt_cv_prog_gnu_ld" = yes; then ! case `/usr/bin/file conftest.$ac_objext` in ! *32-bit*) ! LD="${LD-ld} -melf32bsmip" ! ;; ! *N32*) ! LD="${LD-ld} -melf32bmipn32" ! ;; ! *64-bit*) ! LD="${LD-ld} -melf64bmip" ! ;; ! esac ! else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" *************** case $host in *** 2038,2043 **** --- 2060,2124 ---- LD="${LD-ld} -64" ;; esac + fi + fi + rm -rf conftest* + ;; + + ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo configure:2072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case "`/usr/bin/file conftest.o`" in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; + + x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo configure:2088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac fi rm -rf conftest* ;; *************** case $host in *** 2047,2053 **** SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 ! echo "configure:2051: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2128,2134 ---- SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 ! echo "configure:2132: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** ac_link='${CC-cc} -o conftest${ac_exeext *** 2060,2073 **** cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else --- 2141,2154 ---- cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else *************** echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 *** 2097,2103 **** # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2101: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2178,2184 ---- # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2182: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 2129,2135 **** # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2133: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2210,2216 ---- # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2214: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 2164,2170 **** # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2168: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2245,2251 ---- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2249: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 2196,2202 **** # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2200: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2277,2283 ---- # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2281: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 2231,2237 **** # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2235: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2312,2318 ---- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2316: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** if test -n "$ac_tool_prefix"; then *** 2263,2269 **** # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2267: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2344,2350 ---- # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2348: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 2299,2310 **** # recent cygwin and mingw systems supply a stub DllMain which the user # can override, but on older systems we have to supply one echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6 ! echo "configure:2303: checking if libtool should supply DllMain function" >&5 if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:2384: checking if libtool should supply DllMain function" >&5 if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_need_dllmain=no else --- 2393,2399 ---- DllMain (0, 0, 0); ; return 0; } EOF ! if { (eval echo configure:2397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_need_dllmain=no else *************** echo "$ac_t""$lt_cv_need_dllmain" 1>&6 *** 2333,2351 **** SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mdll" echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6 ! echo "configure:2337: checking how to link DLLs" >&5 if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_dll_switch=-mdll else --- 2414,2432 ---- SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mdll" echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6 ! echo "configure:2418: checking how to link DLLs" >&5 if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_dll_switch=-mdll else *************** else *** 2463,2469 **** # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2467: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2544,2550 ---- # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2548: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** fi *** 2503,2509 **** # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:2507: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2584,2590 ---- # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:2588: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** test -z "$INSTALL_SCRIPT" && INSTALL_SCR *** 2556,2562 **** test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:2560: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2637,2643 ---- test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:2641: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** fi *** 2585,2591 **** # Sanity check for the cross-compilation case: echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:2589: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= --- 2666,2672 ---- # Sanity check for the cross-compilation case: echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:2670: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= *************** else *** 2600,2612 **** # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : --- 2681,2693 ---- # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : *************** else *** 2617,2629 **** rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : --- 2698,2710 ---- rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : *************** else *** 2634,2646 **** rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : --- 2715,2727 ---- rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : *************** echo "$ac_t""$CPP" 1>&6 *** 2666,2682 **** ac_safe=`echo "stdio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for stdio.h""... $ac_c" 1>&6 ! echo "configure:2670: checking for stdio.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 2747,2763 ---- ac_safe=`echo "stdio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for stdio.h""... $ac_c" 1>&6 ! echo "configure:2751: checking for stdio.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** fi *** 2704,2715 **** echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:2708: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 2785,2796 ---- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:2789: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** else *** 2717,2723 **** #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 2798,2804 ---- #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** rm -f conftest* *** 2734,2740 **** if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF --- 2815,2821 ---- if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF *************** fi *** 2752,2758 **** if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF --- 2833,2839 ---- if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF *************** if test "$cross_compiling" = yes; then *** 2773,2779 **** : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') --- 2854,2860 ---- : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') *************** if (XOR (islower (i), ISLOWER (i)) || to *** 2784,2790 **** exit (0); } EOF ! if { (eval echo configure:2788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else --- 2865,2871 ---- exit (0); } EOF ! if { (eval echo configure:2869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else *************** for ac_hdr in sched.h *** 2812,2828 **** do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:2816: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* --- 2893,2909 ---- do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:2897: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* *************** done *** 2852,2858 **** # Determine CFLAGS for gthread. echo $ac_n "checking for gthread cflags""... $ac_c" 1>&6 ! echo "configure:2856: checking for gthread cflags" >&5 if eval "test \"`echo '$''{'objc_cv_gthread_flags'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2933,2939 ---- # Determine CFLAGS for gthread. echo $ac_n "checking for gthread cflags""... $ac_c" 1>&6 ! echo "configure:2937: checking for gthread cflags" >&5 if eval "test \"`echo '$''{'objc_cv_gthread_flags'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** with_multisubdir=${with_multisubdir} *** 3275,3280 **** --- 3356,3362 ---- ac_configure_args="--enable-multilib ${ac_configure_args}" toplevel_srcdir=${toplevel_srcdir} CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" EOF cat >> $CONFIG_STATUS <<\EOF diff -Nrc3pad gcc-3.2.3/libobjc/configure.in gcc-3.3/libobjc/configure.in *** gcc-3.2.3/libobjc/configure.in 2002-06-26 04:15:30.000000000 +0000 --- gcc-3.3/libobjc/configure.in 2003-02-20 09:12:04.000000000 +0000 *************** *** 1,5 **** # Process this file with autoconf to produce a configure script. ! # Copyright (C) 1995, 1997, 1998, 1999, 2002 Free Software Foundation, Inc. # Contributed by Dave Love (d.love@dl.ac.uk). # #This file is part of GNU Objective C. --- 1,6 ---- # Process this file with autoconf to produce a configure script. ! # Copyright (C) 1995, 1997, 1998, 1999, 2002, 2003 ! # Free Software Foundation, Inc. # Contributed by Dave Love (d.love@dl.ac.uk). # #This file is part of GNU Objective C. *************** with_multisubdir=${with_multisubdir} *** 143,148 **** --- 144,150 ---- ac_configure_args="--enable-multilib ${ac_configure_args}" toplevel_srcdir=${toplevel_srcdir} CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" ) diff -Nrc3pad gcc-3.2.3/libobjc/encoding.c gcc-3.3/libobjc/encoding.c *** gcc-3.2.3/libobjc/encoding.c 2002-04-24 15:05:19.000000000 +0000 --- gcc-3.3/libobjc/encoding.c 2002-07-02 19:42:06.000000000 +0000 *************** *** 1,5 **** /* Encoding of types for Objective C. ! Copyright (C) 1993, 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup Bitfield support by Ovidiu Predescu --- 1,6 ---- /* Encoding of types for Objective C. ! Copyright (C) 1993, 1995, 1996, 1997, 1998, 2000, 2002 ! Free Software Foundation, Inc. Contributed by Kresten Krab Thorup Bitfield support by Ovidiu Predescu *************** Boston, MA 02111-1307, USA. */ *** 29,49 **** #include "tconfig.h" #include "objc-api.h" #include "encoding.h" #undef MAX #define MAX(X, Y) \ ! ({ typeof(X) __x = (X), __y = (Y); \ (__x > __y ? __x : __y); }) #undef MIN #define MIN(X, Y) \ ! ({ typeof(X) __x = (X), __y = (Y); \ (__x < __y ? __x : __y); }) #undef ROUND #define ROUND(V, A) \ ! ({ typeof(V) __v=(V); typeof(A) __a=(A); \ ! __a*((__v+__a-1)/__a); }) /* Various hacks for objc_layout_record. These are used by the target --- 30,51 ---- #include "tconfig.h" #include "objc-api.h" #include "encoding.h" + #include #undef MAX #define MAX(X, Y) \ ! ({ typeof (X) __x = (X), __y = (Y); \ (__x > __y ? __x : __y); }) #undef MIN #define MIN(X, Y) \ ! ({ typeof (X) __x = (X), __y = (Y); \ (__x < __y ? __x : __y); }) #undef ROUND #define ROUND(V, A) \ ! ({ typeof (V) __v = (V); typeof (A) __a = (A); \ ! __a * ((__v+__a - 1)/__a); }) /* Various hacks for objc_layout_record. These are used by the target *************** Boston, MA 02111-1307, USA. */ *** 78,103 **** /* Some ROUND_TYPE_ALIGN macros use TARGET_foo, and consequently target_flags. Define a dummy entry here to so we don't die. */ ! ! static int target_flags = 0; ! ! static inline int ! atoi (const char* str) ! { ! int res = 0; ! ! while (isdigit (*str)) ! res *= 10, res += (*str++ - '0'); ! ! return res; ! } /* ! return the size of an object specified by type */ int ! objc_sizeof_type (const char* type) { /* Skip the variable name if any */ if (*type == '"') --- 80,95 ---- /* Some ROUND_TYPE_ALIGN macros use TARGET_foo, and consequently target_flags. Define a dummy entry here to so we don't die. */ ! /* ??? FIXME: As of 2002-06-21, the attribute `unused' doesn't seem to ! eliminate the warning. */ ! static int __attribute__ ((__unused__)) target_flags = 0; /* ! return the size of an object specified by type */ int ! objc_sizeof_type (const char *type) { /* Skip the variable name if any */ if (*type == '"') *************** objc_sizeof_type (const char* type) *** 106,188 **** /* do nothing */; } ! switch(*type) { case _C_ID: ! return sizeof(id); break; case _C_CLASS: ! return sizeof(Class); break; case _C_SEL: ! return sizeof(SEL); break; case _C_CHR: ! return sizeof(char); break; ! case _C_UCHR: ! return sizeof(unsigned char); break; case _C_SHT: ! return sizeof(short); break; case _C_USHT: ! return sizeof(unsigned short); break; case _C_INT: ! return sizeof(int); break; case _C_UINT: ! return sizeof(unsigned int); break; case _C_LNG: ! return sizeof(long); break; case _C_ULNG: ! return sizeof(unsigned long); break; case _C_LNG_LNG: ! return sizeof(long long); break; case _C_ULNG_LNG: ! return sizeof(unsigned long long); break; case _C_FLT: ! return sizeof(float); break; case _C_DBL: ! return sizeof(double); break; case _C_VOID: ! return sizeof(void); break; case _C_PTR: case _C_ATOM: case _C_CHARPTR: ! return sizeof(char*); break; case _C_ARY_B: { ! int len = atoi(type+1); ! while (isdigit(*++type)); ! return len*objc_aligned_size (type); } ! break; case _C_BFLD: { --- 98,182 ---- /* do nothing */; } ! switch (*type) { case _C_ID: ! return sizeof (id); break; case _C_CLASS: ! return sizeof (Class); break; case _C_SEL: ! return sizeof (SEL); break; case _C_CHR: ! return sizeof (char); break; ! case _C_UCHR: ! return sizeof (unsigned char); break; case _C_SHT: ! return sizeof (short); break; case _C_USHT: ! return sizeof (unsigned short); break; case _C_INT: ! return sizeof (int); break; case _C_UINT: ! return sizeof (unsigned int); break; case _C_LNG: ! return sizeof (long); break; case _C_ULNG: ! return sizeof (unsigned long); break; case _C_LNG_LNG: ! return sizeof (long long); break; case _C_ULNG_LNG: ! return sizeof (unsigned long long); break; case _C_FLT: ! return sizeof (float); break; case _C_DBL: ! return sizeof (double); break; case _C_VOID: ! return sizeof (void); break; + case _C_PTR: case _C_ATOM: case _C_CHARPTR: ! return sizeof (char *); break; case _C_ARY_B: { ! int len = atoi (type + 1); ! while (isdigit ((unsigned char)*++type)) ! ; ! return len * objc_aligned_size (type); } ! break; case _C_BFLD: { *************** objc_sizeof_type (const char* type) *** 191,197 **** int startByte, endByte; position = atoi (type + 1); ! while (isdigit (*++type)); size = atoi (type + 1); startByte = position / BITS_PER_UNIT; --- 185,192 ---- int startByte, endByte; position = atoi (type + 1); ! while (isdigit ((unsigned char)*++type)) ! ; size = atoi (type + 1); startByte = position / BITS_PER_UNIT; *************** objc_sizeof_type (const char* type) *** 215,221 **** case _C_UNION_B: { int max_size = 0; ! while (*type != _C_UNION_E && *type++ != '=') /* do nothing */; while (*type != _C_UNION_E) { /* Skip the variable name if any */ --- 210,217 ---- case _C_UNION_B: { int max_size = 0; ! while (*type != _C_UNION_E && *type++ != '=') ! /* do nothing */; while (*type != _C_UNION_E) { /* Skip the variable name if any */ *************** objc_sizeof_type (const char* type) *** 229,238 **** } return max_size; } ! default: { ! objc_error(nil, OBJC_ERR_BAD_TYPE, "unknown type %s\n", type); return 0; } } --- 225,234 ---- } return max_size; } ! default: { ! objc_error (nil, OBJC_ERR_BAD_TYPE, "unknown type %s\n", type); return 0; } } *************** objc_sizeof_type (const char* type) *** 240,250 **** /* ! Return the alignment of an object specified by type */ int ! objc_alignof_type(const char* type) { /* Skip the variable name if any */ if (*type == '"') --- 236,246 ---- /* ! Return the alignment of an object specified by type */ int ! objc_alignof_type (const char *type) { /* Skip the variable name if any */ if (*type == '"') *************** objc_alignof_type(const char* type) *** 252,326 **** for (type++; *type++ != '"';) /* do nothing */; } ! switch(*type) { case _C_ID: ! return __alignof__(id); break; case _C_CLASS: ! return __alignof__(Class); break; ! case _C_SEL: ! return __alignof__(SEL); break; case _C_CHR: ! return __alignof__(char); break; ! case _C_UCHR: ! return __alignof__(unsigned char); break; case _C_SHT: ! return __alignof__(short); break; case _C_USHT: ! return __alignof__(unsigned short); break; case _C_INT: ! return __alignof__(int); break; case _C_UINT: ! return __alignof__(unsigned int); break; case _C_LNG: ! return __alignof__(long); break; case _C_ULNG: ! return __alignof__(unsigned long); break; case _C_LNG_LNG: ! return __alignof__(long long); break; case _C_ULNG_LNG: ! return __alignof__(unsigned long long); break; case _C_FLT: ! return __alignof__(float); break; case _C_DBL: ! return __alignof__(double); break; case _C_PTR: case _C_ATOM: case _C_CHARPTR: ! return __alignof__(char*); break; case _C_ARY_B: ! while (isdigit(*++type)) /* do nothing */; return objc_alignof_type (type); case _C_STRUCT_B: --- 248,323 ---- for (type++; *type++ != '"';) /* do nothing */; } ! switch (*type) { case _C_ID: ! return __alignof__ (id); break; case _C_CLASS: ! return __alignof__ (Class); break; ! case _C_SEL: ! return __alignof__ (SEL); break; case _C_CHR: ! return __alignof__ (char); break; ! case _C_UCHR: ! return __alignof__ (unsigned char); break; case _C_SHT: ! return __alignof__ (short); break; case _C_USHT: ! return __alignof__ (unsigned short); break; case _C_INT: ! return __alignof__ (int); break; case _C_UINT: ! return __alignof__ (unsigned int); break; case _C_LNG: ! return __alignof__ (long); break; case _C_ULNG: ! return __alignof__ (unsigned long); break; case _C_LNG_LNG: ! return __alignof__ (long long); break; case _C_ULNG_LNG: ! return __alignof__ (unsigned long long); break; case _C_FLT: ! return __alignof__ (float); break; case _C_DBL: ! return __alignof__ (double); break; case _C_PTR: case _C_ATOM: case _C_CHARPTR: ! return __alignof__ (char *); break; case _C_ARY_B: ! while (isdigit ((unsigned char)*++type)) ! /* do nothing */; return objc_alignof_type (type); case _C_STRUCT_B: *************** objc_alignof_type(const char* type) *** 339,345 **** case _C_UNION_B: { int maxalign = 0; ! while (*type != _C_UNION_E && *type++ != '=') /* do nothing */; while (*type != _C_UNION_E) { /* Skip the variable name if any */ --- 336,343 ---- case _C_UNION_B: { int maxalign = 0; ! while (*type != _C_UNION_E && *type++ != '=') ! /* do nothing */; while (*type != _C_UNION_E) { /* Skip the variable name if any */ *************** objc_alignof_type(const char* type) *** 356,362 **** default: { ! objc_error(nil, OBJC_ERR_BAD_TYPE, "unknown type %s\n", type); return 0; } } --- 354,360 ---- default: { ! objc_error (nil, OBJC_ERR_BAD_TYPE, "unknown type %s\n", type); return 0; } } *************** objc_alignof_type(const char* type) *** 367,373 **** */ int ! objc_aligned_size (const char* type) { int size, align; --- 365,371 ---- */ int ! objc_aligned_size (const char *type) { int size, align; *************** objc_aligned_size (const char* type) *** 386,396 **** /* The size rounded up to the nearest integral of the wordsize, taken ! to be the size of a void*. */ ! int ! objc_promoted_size (const char* type) { int size, wordsize; --- 384,394 ---- /* The size rounded up to the nearest integral of the wordsize, taken ! to be the size of a void *. */ ! int ! objc_promoted_size (const char *type) { int size, wordsize; *************** objc_promoted_size (const char* type) *** 402,408 **** } size = objc_sizeof_type (type); ! wordsize = sizeof (void*); return ROUND (size, wordsize); } --- 400,406 ---- } size = objc_sizeof_type (type); ! wordsize = sizeof (void *); return ROUND (size, wordsize); } *************** objc_promoted_size (const char* type) *** 412,424 **** occurring in method prototype encodings. */ ! inline const char* ! objc_skip_type_qualifiers (const char* type) { while (*type == _C_CONST ! || *type == _C_IN || *type == _C_INOUT ! || *type == _C_OUT || *type == _C_BYCOPY || *type == _C_BYREF || *type == _C_ONEWAY --- 410,422 ---- occurring in method prototype encodings. */ ! inline const char * ! objc_skip_type_qualifiers (const char *type) { while (*type == _C_CONST ! || *type == _C_IN || *type == _C_INOUT ! || *type == _C_OUT || *type == _C_BYCOPY || *type == _C_BYREF || *type == _C_ONEWAY *************** objc_skip_type_qualifiers (const char* t *** 429,442 **** return type; } ! /* Skip one typespec element. If the typespec is prepended by type qualifiers, these are skipped as well. */ ! const char* ! objc_skip_typespec (const char* type) { /* Skip the variable name if any */ if (*type == '"') --- 427,440 ---- return type; } ! /* Skip one typespec element. If the typespec is prepended by type qualifiers, these are skipped as well. */ ! const char * ! objc_skip_typespec (const char *type) { /* Skip the variable name if any */ if (*type == '"') *************** objc_skip_typespec (const char* type) *** 446,452 **** } type = objc_skip_type_qualifiers (type); ! switch (*type) { case _C_ID: --- 444,450 ---- } type = objc_skip_type_qualifiers (type); ! switch (*type) { case _C_ID: *************** objc_skip_typespec (const char* type) *** 457,463 **** return type; else { ! while (*++type != '"') /* do nothing */; return type + 1; } --- 455,462 ---- return type; else { ! while (*++type != '"') ! /* do nothing */; return type + 1; } *************** objc_skip_typespec (const char* type) *** 485,529 **** case _C_ARY_B: /* skip digits, typespec and closing ']' */ ! ! while(isdigit(*++type)); ! type = objc_skip_typespec(type); if (*type == _C_ARY_E) return ++type; else { ! objc_error(nil, OBJC_ERR_BAD_TYPE, "bad array type %s\n", type); return 0; } case _C_BFLD: /* The new encoding of bitfields is: b 'position' 'type' 'size' */ ! while (isdigit (*++type)); /* skip position */ ! while (isdigit (*++type)); /* skip type and size */ return type; case _C_STRUCT_B: /* skip name, and elements until closing '}' */ ! ! while (*type != _C_STRUCT_E && *type++ != '='); ! while (*type != _C_STRUCT_E) { type = objc_skip_typespec (type); } return ++type; case _C_UNION_B: /* skip name, and elements until closing ')' */ ! ! while (*type != _C_UNION_E && *type++ != '='); ! while (*type != _C_UNION_E) { type = objc_skip_typespec (type); } return ++type; case _C_PTR: /* Just skip the following typespec */ ! return objc_skip_typespec (++type); ! default: { ! objc_error(nil, OBJC_ERR_BAD_TYPE, "unknown type %s\n", type); return 0; } } --- 484,539 ---- case _C_ARY_B: /* skip digits, typespec and closing ']' */ ! ! while (isdigit ((unsigned char)*++type)) ! ; ! type = objc_skip_typespec (type); if (*type == _C_ARY_E) return ++type; else { ! objc_error (nil, OBJC_ERR_BAD_TYPE, "bad array type %s\n", type); return 0; } case _C_BFLD: /* The new encoding of bitfields is: b 'position' 'type' 'size' */ ! while (isdigit ((unsigned char)*++type)) ! ; /* skip position */ ! while (isdigit ((unsigned char)*++type)) ! ; /* skip type and size */ return type; case _C_STRUCT_B: /* skip name, and elements until closing '}' */ ! ! while (*type != _C_STRUCT_E && *type++ != '=') ! ; ! while (*type != _C_STRUCT_E) ! { ! type = objc_skip_typespec (type); ! } return ++type; case _C_UNION_B: /* skip name, and elements until closing ')' */ ! ! while (*type != _C_UNION_E && *type++ != '=') ! ; ! while (*type != _C_UNION_E) ! { ! type = objc_skip_typespec (type); ! } return ++type; case _C_PTR: /* Just skip the following typespec */ ! return objc_skip_typespec (++type); ! default: { ! objc_error (nil, OBJC_ERR_BAD_TYPE, "unknown type %s\n", type); return 0; } } *************** objc_skip_typespec (const char* type) *** 533,551 **** Skip an offset as part of a method encoding. This is prepended by a '+' if the argument is passed in registers. */ ! inline const char* ! objc_skip_offset (const char* type) { ! if (*type == '+') type++; ! while(isdigit(*++type)); return type; } /* Skip an argument specification of a method encoding. */ ! const char* ! objc_skip_argspec (const char* type) { type = objc_skip_typespec (type); type = objc_skip_offset (type); --- 543,563 ---- Skip an offset as part of a method encoding. This is prepended by a '+' if the argument is passed in registers. */ ! inline const char * ! objc_skip_offset (const char *type) { ! if (*type == '+') ! type++; ! while (isdigit ((unsigned char) *++type)) ! ; return type; } /* Skip an argument specification of a method encoding. */ ! const char * ! objc_skip_argspec (const char *type) { type = objc_skip_typespec (type); type = objc_skip_offset (type); *************** objc_skip_argspec (const char* type) *** 555,567 **** /* Return the number of arguments that the method MTH expects. Note that all methods need two implicit arguments `self' and ! `_cmd'. */ int ! method_get_number_of_arguments (struct objc_method* mth) { int i = 0; ! const char* type = mth->method_types; while (*type) { type = objc_skip_argspec (type); --- 567,579 ---- /* Return the number of arguments that the method MTH expects. Note that all methods need two implicit arguments `self' and ! `_cmd'. */ int ! method_get_number_of_arguments (struct objc_method *mth) { int i = 0; ! const char *type = mth->method_types; while (*type) { type = objc_skip_argspec (type); *************** method_get_number_of_arguments (struct o *** 577,585 **** */ int ! method_get_sizeof_arguments (struct objc_method* mth) { ! const char* type = objc_skip_typespec (mth->method_types); return atoi (type); } --- 589,597 ---- */ int ! method_get_sizeof_arguments (struct objc_method *mth) { ! const char *type = objc_skip_typespec (mth->method_types); return atoi (type); } *************** method_get_sizeof_arguments (struct objc *** 588,594 **** the last argument. Typical use of this look like: { ! char *datum, *type; for (datum = method_get_first_argument (method, argframe, &type); datum; datum = method_get_next_argument (argframe, &type)) { --- 600,606 ---- the last argument. Typical use of this look like: { ! char *datum, *type; for (datum = method_get_first_argument (method, argframe, &type); datum; datum = method_get_next_argument (argframe, &type)) { *************** method_get_sizeof_arguments (struct objc *** 599,613 **** else { if ((flags & _F_IN) == _F_IN) ! [portal encodeData: *(char**)datum ofType: ++type]; } } } ! */ ! char* ! method_get_next_argument (arglist_t argframe, ! const char **type) { const char *t = objc_skip_argspec (*type); --- 611,624 ---- else { if ((flags & _F_IN) == _F_IN) ! [portal encodeData: *(char **) datum ofType: ++type]; } } } ! */ ! char * ! method_get_next_argument (arglist_t argframe, const char **type) { const char *t = objc_skip_argspec (*type); *************** method_get_next_argument (arglist_t argf *** 624,638 **** } /* ! Return a pointer to the value of the first argument of the method described in M with the given argumentframe ARGFRAME. The type ! is returned in TYPE. type must be passed to successive calls of method_get_next_argument. */ ! char* ! method_get_first_argument (struct objc_method* m, ! arglist_t argframe, ! const char** type) { *type = m->method_types; return method_get_next_argument (argframe, type); --- 635,649 ---- } /* ! Return a pointer to the value of the first argument of the method described in M with the given argumentframe ARGFRAME. The type ! is returned in TYPE. type must be passed to successive calls of method_get_next_argument. */ ! char * ! method_get_first_argument (struct objc_method *m, ! arglist_t argframe, ! const char **type) { *type = m->method_types; return method_get_next_argument (argframe, type); *************** method_get_first_argument (struct objc_m *** 641,662 **** /* Return a pointer to the ARGth argument of the method M from the frame ARGFRAME. The type of the argument ! is returned in the value-result argument TYPE */ ! char* ! method_get_nth_argument (struct objc_method* m, ! arglist_t argframe, int arg, const char **type) { ! const char* t = objc_skip_argspec (m->method_types); if (arg > method_get_number_of_arguments (m)) return 0; while (arg--) t = objc_skip_argspec (t); ! *type = t; t = objc_skip_typespec (t); --- 652,673 ---- /* Return a pointer to the ARGth argument of the method M from the frame ARGFRAME. The type of the argument ! is returned in the value-result argument TYPE */ ! char * ! method_get_nth_argument (struct objc_method *m, ! arglist_t argframe, int arg, const char **type) { ! const char *t = objc_skip_argspec (m->method_types); if (arg > method_get_number_of_arguments (m)) return 0; while (arg--) t = objc_skip_argspec (t); ! *type = t; t = objc_skip_typespec (t); *************** method_get_nth_argument (struct objc_met *** 667,673 **** } unsigned ! objc_get_type_qualifiers (const char* type) { unsigned res = 0; BOOL flag = YES; --- 678,684 ---- } unsigned ! objc_get_type_qualifiers (const char *type) { unsigned res = 0; BOOL flag = YES; *************** objc_layout_structure (const char *type, *** 720,726 **** if (*type++ != _C_STRUCT_B) { ! objc_error(nil, OBJC_ERR_BAD_TYPE, "record type expected in objc_layout_structure, got %s\n", type); } --- 731,737 ---- if (*type++ != _C_STRUCT_B) { ! objc_error (nil, OBJC_ERR_BAD_TYPE, "record type expected in objc_layout_structure, got %s\n", type); } *************** objc_layout_structure (const char *type, *** 749,760 **** BOOL objc_layout_structure_next_member (struct objc_struct_layout *layout) { - register int known_align = layout->record_size; register int desired_align = 0; /* The following are used only if the field is a bitfield */ ! register const char *bfld_type; ! register int bfld_type_size, bfld_type_align, bfld_field_size; /* The current type without the type qualifiers */ const char *type; --- 760,770 ---- BOOL objc_layout_structure_next_member (struct objc_struct_layout *layout) { register int desired_align = 0; /* The following are used only if the field is a bitfield */ ! register const char *bfld_type = 0; ! register int bfld_type_size, bfld_type_align = 0, bfld_field_size = 0; /* The current type without the type qualifiers */ const char *type; *************** objc_layout_structure_next_member (struc *** 769,775 **** else { /* Get the bitfield's type */ for (bfld_type = type + 1; ! isdigit(*bfld_type); bfld_type++) /* do nothing */; --- 779,785 ---- else { /* Get the bitfield's type */ for (bfld_type = type + 1; ! isdigit ((unsigned char)*bfld_type); bfld_type++) /* do nothing */; *************** objc_layout_structure_next_member (struc *** 793,804 **** type = objc_skip_type_qualifiers (layout->type); if (*type != _C_BFLD) ! desired_align = objc_alignof_type(type) * BITS_PER_UNIT; else { desired_align = 1; /* Skip the bitfield's offset */ ! for (bfld_type = type + 1; isdigit(*bfld_type); bfld_type++) /* do nothing */; bfld_type_size = objc_sizeof_type (bfld_type) * BITS_PER_UNIT; --- 803,816 ---- type = objc_skip_type_qualifiers (layout->type); if (*type != _C_BFLD) ! desired_align = objc_alignof_type (type) * BITS_PER_UNIT; else { desired_align = 1; /* Skip the bitfield's offset */ ! for (bfld_type = type + 1; ! isdigit ((unsigned char) *bfld_type); ! bfld_type++) /* do nothing */; bfld_type_size = objc_sizeof_type (bfld_type) * BITS_PER_UNIT; *************** objc_layout_structure_next_member (struc *** 818,824 **** is meaningless. */ #ifndef PCC_BITFIELD_TYPE_MATTERS layout->record_align = MAX (layout->record_align, desired_align); ! #else if (*type == _C_BFLD) { /* For these machines, a zero-length field does not --- 830,836 ---- is meaningless. */ #ifndef PCC_BITFIELD_TYPE_MATTERS layout->record_align = MAX (layout->record_align, desired_align); ! #else /* PCC_BITFIELD_TYPE_MATTERS */ if (*type == _C_BFLD) { /* For these machines, a zero-length field does not *************** objc_layout_structure_next_member (struc *** 850,856 **** } else layout->record_align = MAX (layout->record_align, desired_align); ! #endif /* Does this field automatically have alignment it needs by virtue of the fields that precede it and the record's --- 862,868 ---- } else layout->record_align = MAX (layout->record_align, desired_align); ! #endif /* PCC_BITFIELD_TYPE_MATTERS */ /* Does this field automatically have alignment it needs by virtue of the fields that precede it and the record's *************** objc_layout_structure_next_member (struc *** 864,870 **** Bump the cumulative size to multiple of field alignment. */ layout->record_size = ROUND (layout->record_size, desired_align); } ! /* Jump to the next field in record. */ layout->prev_type = layout->type; --- 876,882 ---- Bump the cumulative size to multiple of field alignment. */ layout->record_size = ROUND (layout->record_size, desired_align); } ! /* Jump to the next field in record. */ layout->prev_type = layout->type; *************** void objc_layout_finish_structure (struc *** 884,890 **** in the record type. Round it up to a multiple of the record's alignment. */ ! #if defined(ROUND_TYPE_ALIGN) && !defined(__sparc__) layout->record_align = ROUND_TYPE_ALIGN (layout->original_type, 1, layout->record_align); --- 896,902 ---- in the record type. Round it up to a multiple of the record's alignment. */ ! #if defined (ROUND_TYPE_ALIGN) && ! defined (__sparc__) layout->record_align = ROUND_TYPE_ALIGN (layout->original_type, 1, layout->record_align); diff -Nrc3pad gcc-3.2.3/libobjc/gc.c gcc-3.3/libobjc/gc.c *** gcc-3.2.3/libobjc/gc.c 2001-09-10 16:22:42.000000000 +0000 --- gcc-3.3/libobjc/gc.c 2002-07-02 19:42:23.000000000 +0000 *************** *** 1,5 **** /* Basic data types for Objective C. ! Copyright (C) 1998 Free Software Foundation, Inc. Contributed by Ovidiu Predescu. This file is part of GNU CC. --- 1,5 ---- /* Basic data types for Objective C. ! Copyright (C) 1998, 2002 Free Software Foundation, Inc. Contributed by Ovidiu Predescu. This file is part of GNU CC. *************** typedef GC_signed_word signed_word; *** 58,68 **** The offset is incremented with the size of the type. */ #define ROUND(V, A) \ ! ({ typeof(V) __v=(V); typeof(A) __a=(A); \ ! __a*((__v+__a-1)/__a); }) #define SET_BIT_FOR_OFFSET(mask, offset) \ ! GC_set_bit(mask, offset / sizeof (void*)) /* Some prototypes */ static void --- 58,68 ---- The offset is incremented with the size of the type. */ #define ROUND(V, A) \ ! ({ typeof (V) __v = (V); typeof (A) __a = (A); \ ! __a * ((__v+__a - 1)/__a); }) #define SET_BIT_FOR_OFFSET(mask, offset) \ ! GC_set_bit (mask, offset / sizeof (void *)) /* Some prototypes */ static void *************** __objc_gc_setup_union (GC_bitmap mask, c *** 74,82 **** static void __objc_gc_setup_array (GC_bitmap mask, const char *type, int offset) { ! int i, len = atoi(type + 1); ! while (isdigit(*++type)) /* do nothing */; /* skip the size of the array */ switch (*type) { --- 74,82 ---- static void __objc_gc_setup_array (GC_bitmap mask, const char *type, int offset) { ! int i, len = atoi (type + 1); ! while (isdigit (*++type)) /* do nothing */; /* skip the size of the array */ switch (*type) { *************** __objc_gc_setup_struct (GC_bitmap mask, *** 138,145 **** case _C_PTR: case _C_CHARPTR: case _C_ATOM: ! if (!gc_invisible) ! SET_BIT_FOR_OFFSET(mask, position); break; case _C_ARY_B: --- 138,145 ---- case _C_PTR: case _C_CHARPTR: case _C_ATOM: ! if (! gc_invisible) ! SET_BIT_FOR_OFFSET (mask, position); break; case _C_ARY_B: *************** __objc_gc_setup_union (GC_bitmap mask, c *** 178,188 **** size = objc_sizeof_type (type); align = objc_alignof_type (type); ! offset = ROUND(offset, align); ! for (i = 0; i < size; i += sizeof (void*)) { ! SET_BIT_FOR_OFFSET(mask, offset); ! offset += sizeof (void*); } } --- 178,188 ---- size = objc_sizeof_type (type); align = objc_alignof_type (type); ! offset = ROUND (offset, align); ! for (i = 0; i < size; i += sizeof (void *)) { ! SET_BIT_FOR_OFFSET (mask, offset); ! offset += sizeof (void *); } } *************** __objc_gc_type_description_from_type (GC *** 223,230 **** case _C_SEL: case _C_PTR: case _C_CHARPTR: ! if (!gc_invisible) ! SET_BIT_FOR_OFFSET(mask, offset); break; case _C_ARY_B: --- 223,230 ---- case _C_SEL: case _C_PTR: case _C_CHARPTR: ! if (! gc_invisible) ! SET_BIT_FOR_OFFSET (mask, offset); break; case _C_ARY_B: *************** __objc_class_structure_encoding (Class c *** 254,262 **** int *current) { int i, ivar_count; ! struct objc_ivar_list* ivars; ! if (!class) { strcat (*type, "{"); *current++; --- 254,262 ---- int *current) { int i, ivar_count; ! struct objc_ivar_list *ivars; ! if (! class) { strcat (*type, "{"); *current++; *************** __objc_class_structure_encoding (Class c *** 267,273 **** __objc_class_structure_encoding (class->super_class, type, size, current); ivars = class->ivars; ! if (!ivars) return; ivar_count = ivars->ivar_count; --- 267,273 ---- __objc_class_structure_encoding (class->super_class, type, size, current); ivars = class->ivars; ! if (! ivars) return; ivar_count = ivars->ivar_count; *************** __objc_class_structure_encoding (Class c *** 282,288 **** { /* Increase the size of the encoding string so that it contains this ivar's type. */ ! *size = ROUND(*current + len + 1, 10); *type = objc_realloc (*type, *size); } strcat (*type + *current, ivar_type); --- 282,288 ---- { /* Increase the size of the encoding string so that it contains this ivar's type. */ ! *size = ROUND (*current + len + 1, 10); *type = objc_realloc (*type, *size); } strcat (*type + *current, ivar_type); *************** __objc_generate_gc_type_description (Cla *** 302,308 **** int type_size = 10, current; char *class_structure_type; ! if (!CLS_ISCLASS(class)) return; /* We have to create a mask in which each bit counts for a pointer member. --- 302,308 ---- int type_size = 10, current; char *class_structure_type; ! if (! CLS_ISCLASS (class)) return; /* We have to create a mask in which each bit counts for a pointer member. *************** __objc_generate_gc_type_description (Cla *** 311,319 **** /* The number of bits in the mask is the size of an instance in bytes divided by the size of a pointer. */ ! bits_no = (ROUND(class_get_instance_size (class), sizeof(void*)) ! / sizeof (void*)); ! size = ROUND(bits_no, BITS_PER_WORD) / BITS_PER_WORD; mask = objc_atomic_malloc (size * sizeof (int)); memset (mask, 0, size * sizeof (int)); --- 311,319 ---- /* The number of bits in the mask is the size of an instance in bytes divided by the size of a pointer. */ ! bits_no = (ROUND (class_get_instance_size (class), sizeof (void *)) ! / sizeof (void *)); ! size = ROUND (bits_no, BITS_PER_WORD) / BITS_PER_WORD; mask = objc_atomic_malloc (size * sizeof (int)); memset (mask, 0, size * sizeof (int)); *************** __objc_generate_gc_type_description (Cla *** 342,348 **** puts (""); #endif ! class->gc_object_type = (void*)GC_make_descriptor (mask, bits_no); } --- 342,348 ---- puts (""); #endif ! class->gc_object_type = (void *) GC_make_descriptor (mask, bits_no); } *************** __objc_ivar_pointer (const char *type) *** 370,386 **** This operation only makes sense on instance variables that are pointers. */ void ! class_ivar_set_gcinvisible (Class class, const char* ivarname, BOOL gc_invisible) { int i, ivar_count; ! struct objc_ivar_list* ivars; ! if (!class || !ivarname) return; ivars = class->ivars; ! if (!ivars) return; ivar_count = ivars->ivar_count; --- 370,386 ---- This operation only makes sense on instance variables that are pointers. */ void ! class_ivar_set_gcinvisible (Class class, const char *ivarname, BOOL gc_invisible) { int i, ivar_count; ! struct objc_ivar_list *ivars; ! if (! class || ! ivarname) return; ivars = class->ivars; ! if (! ivars) return; ivar_count = ivars->ivar_count; *************** class_ivar_set_gcinvisible (Class class, *** 390,396 **** struct objc_ivar *ivar = &(ivars->ivar_list[i]); const char *type; ! if (!ivar->ivar_name || strcmp (ivar->ivar_name, ivarname)) continue; assert (ivar->ivar_type); --- 390,396 ---- struct objc_ivar *ivar = &(ivars->ivar_list[i]); const char *type; ! if (! ivar->ivar_name || strcmp (ivar->ivar_name, ivarname)) continue; assert (ivar->ivar_type); *************** class_ivar_set_gcinvisible (Class class, *** 407,413 **** { char *new_type; ! if (gc_invisible || !__objc_ivar_pointer (type)) return; /* The type of the variable already matches the requested gc_invisible type */ --- 407,413 ---- { char *new_type; ! if (gc_invisible || ! __objc_ivar_pointer (type)) return; /* The type of the variable already matches the requested gc_invisible type */ *************** class_ivar_set_gcinvisible (Class class, *** 422,428 **** { char *new_type; ! if (!gc_invisible || !__objc_ivar_pointer (type)) return; /* The type of the variable already matches the requested gc_invisible type */ --- 422,428 ---- { char *new_type; ! if (! gc_invisible || ! __objc_ivar_pointer (type)) return; /* The type of the variable already matches the requested gc_invisible type */ *************** class_ivar_set_gcinvisible (Class class, *** 446,458 **** #else /* !OBJC_WITH_GC */ void ! __objc_generate_gc_type_description (Class class) { } ! void class_ivar_set_gcinvisible (Class class, ! const char* ivarname, ! BOOL gc_invisible) { } --- 446,458 ---- #else /* !OBJC_WITH_GC */ void ! __objc_generate_gc_type_description (Class class __attribute__ ((__unused__))) { } ! void class_ivar_set_gcinvisible (Class class __attribute__ ((__unused__)), ! const char *ivarname __attribute__ ((__unused__)), ! BOOL gc_invisible __attribute__ ((__unused__))) { } diff -Nrc3pad gcc-3.2.3/libobjc/hash.c gcc-3.3/libobjc/hash.c *** gcc-3.2.3/libobjc/hash.c 1998-09-30 02:13:10.000000000 +0000 --- gcc-3.3/libobjc/hash.c 2002-07-02 19:42:26.000000000 +0000 *************** hash_new (unsigned int size, hash_func_t *** 47,53 **** /* Pass me a value greater than 0 and a power of 2. */ assert (size); ! assert (!(size & (size - 1))); /* Allocate the cache structure. calloc insures its initialization for default values. */ --- 47,53 ---- /* Pass me a value greater than 0 and a power of 2. */ assert (size); ! assert (! (size & (size - 1))); /* Allocate the cache structure. calloc insures its initialization for default values. */ *************** hash_remove (cache_ptr cache, const void *** 196,202 **** objc_free(node); } else prev = node, node = node->next; ! } while (!removed && node); assert (removed); } --- 196,202 ---- objc_free(node); } else prev = node, node = node->next; ! } while (! removed && node); assert (removed); } *************** hash_next (cache_ptr cache, node_ptr nod *** 210,216 **** { /* If the scan is being started then reset the last node visitied pointer and bucket index. */ ! if (!node) cache->last_bucket = 0; /* If there is a node visited last then check for another --- 210,216 ---- { /* If the scan is being started then reset the last node visitied pointer and bucket index. */ ! if (! node) cache->last_bucket = 0; /* If there is a node visited last then check for another *************** hash_value_for_key (cache_ptr cache, con *** 258,264 **** break; } else node = node->next; ! } while (!retval && node); return retval; } --- 258,264 ---- break; } else node = node->next; ! } while (! retval && node); return retval; } diff -Nrc3pad gcc-3.2.3/libobjc/init.c gcc-3.3/libobjc/init.c *** gcc-3.2.3/libobjc/init.c 2001-12-17 17:23:09.000000000 +0000 --- gcc-3.3/libobjc/init.c 2002-07-02 19:42:27.000000000 +0000 *************** *** 1,5 **** /* GNU Objective C Runtime initialization ! Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup +load support contributed by Ovidiu Predescu --- 1,5 ---- /* GNU Objective C Runtime initialization ! Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup +load support contributed by Ovidiu Predescu *************** Foundation, 59 Temple Place - Suite 330, *** 27,88 **** #include "runtime.h" /* The version number of this runtime. This must match the number ! defined in gcc (objc-act.c) */ #define OBJC_VERSION 8 #define PROTOCOL_VERSION 2 ! /* This list contains all modules currently loaded into the runtime */ ! static struct objc_list* __objc_module_list = 0; /* !T:MUTEX */ ! /* This list contains all proto_list's not yet assigned class links */ ! static struct objc_list* unclaimed_proto_list = 0; /* !T:MUTEX */ /* List of unresolved static instances. */ static struct objc_list *uninitialized_statics = 0; /* !T:MUTEX */ ! /* Global runtime "write" mutex. */ objc_mutex_t __objc_runtime_mutex = 0; ! /* Number of threads that are alive. */ int __objc_runtime_threads_alive = 1; /* !T:MUTEX */ ! /* Check compiler vs runtime version */ static void init_check_module_version (Module_t); ! /* Assign isa links to protos */ ! static void __objc_init_protocols (struct objc_protocol_list* protos); ! /* Add protocol to class */ ! static void __objc_class_add_protocols (Class, struct objc_protocol_list*); ! /* This is a hook which is called by __objc_exec_class every time a class ! or a category is loaded into the runtime. This may e.g. help a ! dynamic loader determine the classes that have been loaded when ! an object file is dynamically linked in */ ! void (*_objc_load_callback)(Class class, Category* category); /* !T:SAFE */ ! /* Is all categories/classes resolved? */ BOOL __objc_dangling_categories = NO; /* !T:UNUSED */ extern SEL __sel_register_typed_name (const char *name, const char *types, struct objc_selector *orig, BOOL is_const); ! /* Sends +load to all classes and categories in certain situations. */ static void objc_send_load (void); /* Inserts all the classes defined in module in a tree of classes that ! resembles the class hierarchy. This tree is traversed in preorder and the ! classes in its nodes receive the +load message if these methods were not ! executed before. The algorithm ensures that when the +load method of a class ! is executed all the superclasses have been already received the +load ! message. */ static void __objc_create_classes_tree (Module_t module); static void __objc_call_callback (Module_t module); /* A special version that works only before the classes are completely ! installed in the runtime. */ static BOOL class_is_subclass_of_class (Class class, Class superclass); typedef struct objc_class_tree { --- 27,88 ---- #include "runtime.h" /* The version number of this runtime. This must match the number ! defined in gcc (objc-act.c). */ #define OBJC_VERSION 8 #define PROTOCOL_VERSION 2 ! /* This list contains all modules currently loaded into the runtime. */ ! static struct objc_list *__objc_module_list = 0; /* !T:MUTEX */ ! /* This list contains all proto_list's not yet assigned class links. */ ! static struct objc_list *unclaimed_proto_list = 0; /* !T:MUTEX */ /* List of unresolved static instances. */ static struct objc_list *uninitialized_statics = 0; /* !T:MUTEX */ ! /* Global runtime "write" mutex. */ objc_mutex_t __objc_runtime_mutex = 0; ! /* Number of threads that are alive. */ int __objc_runtime_threads_alive = 1; /* !T:MUTEX */ ! /* Check compiler vs runtime version. */ static void init_check_module_version (Module_t); ! /* Assign isa links to protos. */ ! static void __objc_init_protocols (struct objc_protocol_list *protos); ! /* Add protocol to class. */ ! static void __objc_class_add_protocols (Class, struct objc_protocol_list *); ! /* This is a hook which is called by __objc_exec_class every time a ! class or a category is loaded into the runtime. This may e.g. help ! a dynamic loader determine the classes that have been loaded when ! an object file is dynamically linked in. */ ! void (*_objc_load_callback) (Class class, Category *category); /* !T:SAFE */ ! /* Is all categories/classes resolved? */ BOOL __objc_dangling_categories = NO; /* !T:UNUSED */ extern SEL __sel_register_typed_name (const char *name, const char *types, struct objc_selector *orig, BOOL is_const); ! /* Sends +load to all classes and categories in certain situations. */ static void objc_send_load (void); /* Inserts all the classes defined in module in a tree of classes that ! resembles the class hierarchy. This tree is traversed in preorder ! and the classes in its nodes receive the +load message if these ! methods were not executed before. The algorithm ensures that when ! the +load method of a class is executed all the superclasses have ! been already received the +load message. */ static void __objc_create_classes_tree (Module_t module); static void __objc_call_callback (Module_t module); /* A special version that works only before the classes are completely ! installed in the runtime. */ static BOOL class_is_subclass_of_class (Class class, Class superclass); typedef struct objc_class_tree { *************** typedef struct objc_class_tree { *** 90,113 **** struct objc_list *subclasses; /* `head' is pointer to an objc_class_tree */ } objc_class_tree; ! /* This is a linked list of objc_class_tree trees. The head of these trees ! are root classes (their super class is Nil). These different trees ! represent different class hierarchies. */ static struct objc_list *__objc_class_tree_list = NULL; ! /* Keeps the +load methods who have been already executed. This hash should ! not be destroyed during the execution of the program. */ static cache_ptr __objc_load_methods = NULL; ! /* Creates a tree of classes whose topmost class is directly inherited from ! `upper' and the bottom class in this tree is `bottom_class'. The classes ! in this tree are super classes of `bottom_class'. `subclasses' member ! of each tree node point to the next subclass tree node. */ static objc_class_tree * create_tree_of_subclasses_inherited_from (Class bottom_class, Class upper) { Class superclass = bottom_class->super_class ? ! objc_lookup_class ((char*)bottom_class->super_class) : Nil; objc_class_tree *tree, *prev; --- 90,115 ---- struct objc_list *subclasses; /* `head' is pointer to an objc_class_tree */ } objc_class_tree; ! /* This is a linked list of objc_class_tree trees. The head of these ! trees are root classes (their super class is Nil). These different ! trees represent different class hierarchies. */ static struct objc_list *__objc_class_tree_list = NULL; ! /* Keeps the +load methods who have been already executed. This hash ! should not be destroyed during the execution of the program. */ static cache_ptr __objc_load_methods = NULL; ! /* Creates a tree of classes whose topmost class is directly inherited ! from `upper' and the bottom class in this tree is ! `bottom_class'. The classes in this tree are super classes of ! `bottom_class'. `subclasses' member of each tree node point to the ! next subclass tree node. */ ! static objc_class_tree * create_tree_of_subclasses_inherited_from (Class bottom_class, Class upper) { Class superclass = bottom_class->super_class ? ! objc_lookup_class ((char *) bottom_class->super_class) : Nil; objc_class_tree *tree, *prev; *************** create_tree_of_subclasses_inherited_from *** 126,132 **** tree->class = superclass; tree->subclasses = list_cons (prev, tree->subclasses); superclass = (superclass->super_class ? ! objc_lookup_class ((char*)superclass->super_class) : Nil); prev = tree; } --- 128,134 ---- tree->class = superclass; tree->subclasses = list_cons (prev, tree->subclasses); superclass = (superclass->super_class ? ! objc_lookup_class ((char *) superclass->super_class) : Nil); prev = tree; } *************** create_tree_of_subclasses_inherited_from *** 134,144 **** return tree; } ! /* Insert the `class' into the proper place in the `tree' class hierarchy. This ! function returns a new tree if the class has been successfully inserted into ! the tree or NULL if the class is not part of the classes hierarchy described ! by `tree'. This function is private to objc_tree_insert_class(), you should ! not call it directly. */ static objc_class_tree * __objc_tree_insert_class (objc_class_tree *tree, Class class) { --- 136,148 ---- return tree; } ! /* Insert the `class' into the proper place in the `tree' class ! hierarchy. This function returns a new tree if the class has been ! successfully inserted into the tree or NULL if the class is not ! part of the classes hierarchy described by `tree'. This function is ! private to objc_tree_insert_class (), you should not call it ! directly. */ ! static objc_class_tree * __objc_tree_insert_class (objc_class_tree *tree, Class class) { *************** __objc_tree_insert_class (objc_class_tre *** 154,174 **** return tree; } else if ((class->super_class ? ! objc_lookup_class ((char*)class->super_class) : Nil) == tree->class) { /* If class is a direct subclass of tree->class then add class to the list of subclasses. First check to see if it wasn't already ! inserted. */ struct objc_list *list = tree->subclasses; objc_class_tree *node; while (list) { /* Class has been already inserted; do nothing just return ! the tree. */ ! if (((objc_class_tree*)list->head)->class == class) { DEBUG_PRINTF ("2. class %s was previously inserted\n", class->name); --- 158,178 ---- return tree; } else if ((class->super_class ? ! objc_lookup_class ((char *) class->super_class) : Nil) == tree->class) { /* If class is a direct subclass of tree->class then add class to the list of subclasses. First check to see if it wasn't already ! inserted. */ struct objc_list *list = tree->subclasses; objc_class_tree *node; while (list) { /* Class has been already inserted; do nothing just return ! the tree. */ ! if (((objc_class_tree *) list->head)->class == class) { DEBUG_PRINTF ("2. class %s was previously inserted\n", class->name); *************** __objc_tree_insert_class (objc_class_tre *** 186,209 **** } else { ! /* The class is not a direct subclass of tree->class. Search for class's ! superclasses in the list of subclasses. */ struct objc_list *subclasses = tree->subclasses; ! /* Precondition: the class must be a subclass of tree->class; otherwise ! return NULL to indicate our caller that it must take the next tree. */ ! if (!class_is_subclass_of_class (class, tree->class)) return NULL; for (; subclasses != NULL; subclasses = subclasses->tail) { ! Class aClass = ((objc_class_tree*)(subclasses->head))->class; if (class_is_subclass_of_class (class, aClass)) { ! /* If we found one of class's superclasses we insert the class ! into its subtree and return the original tree since nothing ! has been changed. */ subclasses->head = __objc_tree_insert_class (subclasses->head, class); DEBUG_PRINTF ("4. class %s inserted\n", class->name); --- 190,214 ---- } else { ! /* The class is not a direct subclass of tree->class. Search for ! class's superclasses in the list of subclasses. */ struct objc_list *subclasses = tree->subclasses; ! /* Precondition: the class must be a subclass of tree->class; ! otherwise return NULL to indicate our caller that it must ! take the next tree. */ ! if (! class_is_subclass_of_class (class, tree->class)) return NULL; for (; subclasses != NULL; subclasses = subclasses->tail) { ! Class aClass = ((objc_class_tree *) (subclasses->head))->class; if (class_is_subclass_of_class (class, aClass)) { ! /* If we found one of class's superclasses we insert the ! class into its subtree and return the original tree ! since nothing has been changed. */ subclasses->head = __objc_tree_insert_class (subclasses->head, class); DEBUG_PRINTF ("4. class %s inserted\n", class->name); *************** __objc_tree_insert_class (objc_class_tre *** 211,222 **** } } ! /* We haven't found a subclass of `class' in the `subclasses' list. ! Create a new tree of classes whose topmost class is a direct subclass ! of tree->class. */ { objc_class_tree *new_tree ! = create_tree_of_subclasses_inherited_from (class, tree->class); tree->subclasses = list_cons (new_tree, tree->subclasses); DEBUG_PRINTF ("5. class %s inserted\n", class->name); return tree; --- 216,227 ---- } } ! /* We haven't found a subclass of `class' in the `subclasses' ! list. Create a new tree of classes whose topmost class is a ! direct subclass of tree->class. */ { objc_class_tree *new_tree ! = create_tree_of_subclasses_inherited_from (class, tree->class); tree->subclasses = list_cons (new_tree, tree->subclasses); DEBUG_PRINTF ("5. class %s inserted\n", class->name); return tree; *************** __objc_tree_insert_class (objc_class_tre *** 224,230 **** } } ! /* This function inserts `class' in the right tree hierarchy classes. */ static void objc_tree_insert_class (Class class) { --- 229,236 ---- } } ! /* This function inserts `class' in the right tree hierarchy classes. */ ! static void objc_tree_insert_class (Class class) { *************** objc_tree_insert_class (Class class) *** 244,263 **** list_node = list_node->tail; } ! /* If the list was finished but the class hasn't been inserted, insert it ! here. */ ! if (!list_node) { __objc_class_tree_list = list_cons (NULL, __objc_class_tree_list); __objc_class_tree_list->head = __objc_tree_insert_class (NULL, class); } } ! /* Traverse tree in preorder. Used to send +load. */ static void objc_preorder_traverse (objc_class_tree *tree, int level, ! void (*function)(objc_class_tree*, int)) { struct objc_list *node; --- 250,270 ---- list_node = list_node->tail; } ! /* If the list was finished but the class hasn't been inserted, ! insert it here. */ ! if (! list_node) { __objc_class_tree_list = list_cons (NULL, __objc_class_tree_list); __objc_class_tree_list->head = __objc_tree_insert_class (NULL, class); } } ! /* Traverse tree in preorder. Used to send +load. */ ! static void objc_preorder_traverse (objc_class_tree *tree, int level, ! void (*function) (objc_class_tree *, int)) { struct objc_list *node; *************** objc_preorder_traverse (objc_class_tree *** 266,276 **** objc_preorder_traverse (node->head, level + 1, function); } ! /* Traverse tree in postorder. Used to destroy a tree. */ static void objc_postorder_traverse (objc_class_tree *tree, ! int level, ! void (*function)(objc_class_tree*, int)) { struct objc_list *node; --- 273,284 ---- objc_preorder_traverse (node->head, level + 1, function); } ! /* Traverse tree in postorder. Used to destroy a tree. */ ! static void objc_postorder_traverse (objc_class_tree *tree, ! int level, ! void (*function) (objc_class_tree *, int)) { struct objc_list *node; *************** objc_postorder_traverse (objc_class_tree *** 279,285 **** (*function) (tree, level); } ! /* Used to print a tree class hierarchy. */ #ifdef DEBUG static void __objc_tree_print (objc_class_tree *tree, int level) --- 287,294 ---- (*function) (tree, level); } ! /* Used to print a tree class hierarchy. */ ! #ifdef DEBUG static void __objc_tree_print (objc_class_tree *tree, int level) *************** __objc_tree_print (objc_class_tree *tree *** 292,326 **** } #endif ! /* Walks on a linked list of methods in the reverse order and executes all ! the methods corresponding to `op' selector. Walking in the reverse order ! assures the +load of class is executed first and then +load of categories ! because of the way in which categories are added to the class methods. */ static void __objc_send_message_in_list (MethodList_t method_list, Class class, SEL op) { int i; ! if (!method_list) return; /* First execute the `op' message in the following method lists */ __objc_send_message_in_list (method_list->method_next, class, op); ! /* Search the method list. */ for (i = 0; i < method_list->method_count; i++) { Method_t mth = &method_list->method_list[i]; if (mth->method_name && sel_eq (mth->method_name, op) ! && !hash_is_key_in_hash (__objc_load_methods, mth->method_imp)) { /* Add this method into the +load hash table */ hash_add (&__objc_load_methods, mth->method_imp, mth->method_imp); DEBUG_PRINTF ("sending +load in class: %s\n", class->name); ! /* The method was found and wasn't previously executed. */ (*mth->method_imp) ((id)class, mth->method_name); break; --- 301,337 ---- } #endif ! /* Walks on a linked list of methods in the reverse order and executes ! all the methods corresponding to `op' selector. Walking in the ! reverse order assures the +load of class is executed first and then ! +load of categories because of the way in which categories are ! added to the class methods. */ ! static void __objc_send_message_in_list (MethodList_t method_list, Class class, SEL op) { int i; ! if (! method_list) return; /* First execute the `op' message in the following method lists */ __objc_send_message_in_list (method_list->method_next, class, op); ! /* Search the method list. */ for (i = 0; i < method_list->method_count; i++) { Method_t mth = &method_list->method_list[i]; if (mth->method_name && sel_eq (mth->method_name, op) ! && ! hash_is_key_in_hash (__objc_load_methods, mth->method_imp)) { /* Add this method into the +load hash table */ hash_add (&__objc_load_methods, mth->method_imp, mth->method_imp); DEBUG_PRINTF ("sending +load in class: %s\n", class->name); ! /* The method was found and wasn't previously executed. */ (*mth->method_imp) ((id)class, mth->method_name); break; *************** __objc_send_message_in_list (MethodList_ *** 329,354 **** } static void ! __objc_send_load (objc_class_tree *tree, int level) { static SEL load_sel = 0; Class class = tree->class; MethodList_t method_list = class->class_pointer->methods; ! if (!load_sel) load_sel = sel_register_name ("load"); __objc_send_message_in_list (method_list, class, load_sel); } static void ! __objc_destroy_class_tree_node (objc_class_tree *tree, int level) { objc_free (tree); } ! /* This is used to check if the relationship between two classes before the ! runtime completely installs the classes. */ static BOOL class_is_subclass_of_class (Class class, Class superclass) { --- 340,368 ---- } static void ! __objc_send_load (objc_class_tree *tree, ! int level __attribute__ ((__unused__))) { static SEL load_sel = 0; Class class = tree->class; MethodList_t method_list = class->class_pointer->methods; ! if (! load_sel) load_sel = sel_register_name ("load"); __objc_send_message_in_list (method_list, class, load_sel); } static void ! __objc_destroy_class_tree_node (objc_class_tree *tree, ! int level __attribute__ ((__unused__))) { objc_free (tree); } ! /* This is used to check if the relationship between two classes ! before the runtime completely installs the classes. */ ! static BOOL class_is_subclass_of_class (Class class, Class superclass) { *************** class_is_subclass_of_class (Class class, *** 357,375 **** if (class == superclass) return YES; class = (class->super_class ? ! objc_lookup_class ((char*)class->super_class) : Nil); } return NO; } ! /* This list contains all the classes in the runtime system for whom their ! superclasses are not yet know to the runtime. */ ! static struct objc_list* unresolved_classes = 0; ! /* Extern function used to reference the Object and NXConstantString classes. ! */ extern void __objc_force_linking (void); --- 371,389 ---- if (class == superclass) return YES; class = (class->super_class ? ! objc_lookup_class ((char *) class->super_class) : Nil); } return NO; } ! /* This list contains all the classes in the runtime system for whom ! their superclasses are not yet known to the runtime. */ ! static struct objc_list *unresolved_classes = 0; ! /* Extern function used to reference the Object and NXConstantString ! classes. */ extern void __objc_force_linking (void); *************** __objc_force_linking (void) *** 380,394 **** __objc_linking (); } ! /* Run through the statics list, removing modules as soon as all its statics ! have been initialized. */ static void objc_init_statics (void) { struct objc_list **cell = &uninitialized_statics; struct objc_static_instances **statics_in_module; ! objc_mutex_lock(__objc_runtime_mutex); while (*cell) { --- 394,409 ---- __objc_linking (); } ! /* Run through the statics list, removing modules as soon as all its ! statics have been initialized. */ ! static void objc_init_statics (void) { struct objc_list **cell = &uninitialized_statics; struct objc_static_instances **statics_in_module; ! objc_mutex_lock (__objc_runtime_mutex); while (*cell) { *************** objc_init_statics (void) *** 400,406 **** struct objc_static_instances *statics = *statics_in_module; Class class = objc_lookup_class (statics->class_name); ! if (!class) module_initialized = 0; /* Actually, the static's class_pointer will be NULL when we haven't been here before. However, the comparison is to be --- 415,421 ---- struct objc_static_instances *statics = *statics_in_module; Class class = objc_lookup_class (statics->class_name); ! if (! class) module_initialized = 0; /* Actually, the static's class_pointer will be NULL when we haven't been here before. However, the comparison is to be *************** objc_init_statics (void) *** 430,448 **** /* Remove this module from the uninitialized list. */ struct objc_list *this = *cell; *cell = this->tail; ! objc_free(this); } else cell = &(*cell)->tail; } ! objc_mutex_unlock(__objc_runtime_mutex); } /* objc_init_statics */ /* This function is called by constructor functions generated for each ! module compiled. (_GLOBAL_$I$...) The purpose of this function is to ! gather the module pointers so that they may be processed by the ! initialization routines as soon as possible */ void __objc_exec_class (Module_t module) --- 445,463 ---- /* Remove this module from the uninitialized list. */ struct objc_list *this = *cell; *cell = this->tail; ! objc_free (this); } else cell = &(*cell)->tail; } ! objc_mutex_unlock (__objc_runtime_mutex); } /* objc_init_statics */ /* This function is called by constructor functions generated for each ! module compiled. (_GLOBAL_$I$...) The purpose of this function is ! to gather the module pointers so that they may be processed by the ! initialization routines as soon as possible. */ void __objc_exec_class (Module_t module) *************** __objc_exec_class (Module_t module) *** 451,457 **** indicate that some global data structures need to be built. */ static BOOL previous_constructors = 0; ! static struct objc_list* unclaimed_categories = 0; /* The symbol table (defined in objc-api.h) generated by gcc */ Symtab_t symtab = module->symtab; --- 466,472 ---- indicate that some global data structures need to be built. */ static BOOL previous_constructors = 0; ! static struct objc_list *unclaimed_categories = 0; /* The symbol table (defined in objc-api.h) generated by gcc */ Symtab_t symtab = module->symtab; *************** __objc_exec_class (Module_t module) *** 461,467 **** = symtab->defs[symtab->cls_def_cnt + symtab->cat_def_cnt]; /* Entry used to traverse hash lists */ ! struct objc_list** cell; /* The table of selector references for this module */ SEL selectors = symtab->refs; --- 476,482 ---- = symtab->defs[symtab->cls_def_cnt + symtab->cat_def_cnt]; /* Entry used to traverse hash lists */ ! struct objc_list **cell; /* The table of selector references for this module */ SEL selectors = symtab->refs; *************** __objc_exec_class (Module_t module) *** 472,490 **** DEBUG_PRINTF ("received module: %s\n", module->name); /* check gcc version */ ! init_check_module_version(module); /* On the first call of this routine, initialize some data structures. */ ! if (!previous_constructors) { /* Initialize thread-safe system */ ! __objc_init_thread_system(); __objc_runtime_threads_alive = 1; ! __objc_runtime_mutex = objc_mutex_allocate(); ! __objc_init_selector_tables(); ! __objc_init_class_tables(); ! __objc_init_dispatch_tables(); __objc_class_tree_list = list_cons (NULL, __objc_class_tree_list); __objc_load_methods = hash_new (128, (hash_func_type)hash_ptr, compare_ptrs); --- 487,505 ---- DEBUG_PRINTF ("received module: %s\n", module->name); /* check gcc version */ ! init_check_module_version (module); /* On the first call of this routine, initialize some data structures. */ ! if (! previous_constructors) { /* Initialize thread-safe system */ ! __objc_init_thread_system (); __objc_runtime_threads_alive = 1; ! __objc_runtime_mutex = objc_mutex_allocate (); ! __objc_init_selector_tables (); ! __objc_init_class_tables (); ! __objc_init_dispatch_tables (); __objc_class_tree_list = list_cons (NULL, __objc_class_tree_list); __objc_load_methods = hash_new (128, (hash_func_type)hash_ptr, compare_ptrs); *************** __objc_exec_class (Module_t module) *** 492,499 **** } /* Save the module pointer for later processing. (not currently used) */ ! objc_mutex_lock(__objc_runtime_mutex); ! __objc_module_list = list_cons(module, __objc_module_list); /* Replace referenced selectors from names to SEL's. */ if (selectors) --- 507,514 ---- } /* Save the module pointer for later processing. (not currently used) */ ! objc_mutex_lock (__objc_runtime_mutex); ! __objc_module_list = list_cons (module, __objc_module_list); /* Replace referenced selectors from names to SEL's. */ if (selectors) *************** __objc_exec_class (Module_t module) *** 501,512 **** for (i = 0; selectors[i].sel_id; ++i) { const char *name, *type; ! name = (char*)selectors[i].sel_id; ! type = (char*)selectors[i].sel_types; /* Constructors are constant static data so we can safely store pointers to them in the runtime structures. is_const == YES */ __sel_register_typed_name (name, type, ! (struct objc_selector*)&(selectors[i]), YES); } } --- 516,527 ---- for (i = 0; selectors[i].sel_id; ++i) { const char *name, *type; ! name = (char *) selectors[i].sel_id; ! type = (char *) selectors[i].sel_types; /* Constructors are constant static data so we can safely store pointers to them in the runtime structures. is_const == YES */ __sel_register_typed_name (name, type, ! (struct objc_selector *) &(selectors[i]), YES); } } *************** __objc_exec_class (Module_t module) *** 516,530 **** for (i = 0; i < symtab->cls_def_cnt; ++i) { Class class = (Class) symtab->defs[i]; ! const char* superclass = (char*)class->super_class; /* Make sure we have what we think. */ ! assert (CLS_ISCLASS(class)); ! assert (CLS_ISMETA(class->class_pointer)); DEBUG_PRINTF ("phase 1, processing class: %s\n", class->name); /* Initialize the subclass list to be NULL. ! In some cases it isn't and this crashes the program. */ class->subclass_list = NULL; /* Store the class in the class table and assign class numbers. */ --- 531,545 ---- for (i = 0; i < symtab->cls_def_cnt; ++i) { Class class = (Class) symtab->defs[i]; ! const char *superclass = (char *) class->super_class; /* Make sure we have what we think. */ ! assert (CLS_ISCLASS (class)); ! assert (CLS_ISMETA (class->class_pointer)); DEBUG_PRINTF ("phase 1, processing class: %s\n", class->name); /* Initialize the subclass list to be NULL. ! In some cases it isn't and this crashes the program. */ class->subclass_list = NULL; /* Store the class in the class table and assign class numbers. */ *************** __objc_exec_class (Module_t module) *** 535,553 **** __objc_register_selectors_from_class ((Class) class->class_pointer); /* Install the fake dispatch tables */ ! __objc_install_premature_dtable(class); ! __objc_install_premature_dtable(class->class_pointer); /* Register the instance methods as class methods, this is ! only done for root classes. */ ! __objc_register_instance_methods_to_class(class); if (class->protocols) __objc_init_protocols (class->protocols); /* Check to see if the superclass is known in this point. If it's not ! add the class to the unresolved_classes list. */ ! if (superclass && !objc_lookup_class (superclass)) unresolved_classes = list_cons (class, unresolved_classes); } --- 550,568 ---- __objc_register_selectors_from_class ((Class) class->class_pointer); /* Install the fake dispatch tables */ ! __objc_install_premature_dtable (class); ! __objc_install_premature_dtable (class->class_pointer); /* Register the instance methods as class methods, this is ! only done for root classes. */ ! __objc_register_instance_methods_to_class (class); if (class->protocols) __objc_init_protocols (class->protocols); /* Check to see if the superclass is known in this point. If it's not ! add the class to the unresolved_classes list. */ ! if (superclass && ! objc_lookup_class (superclass)) unresolved_classes = list_cons (class, unresolved_classes); } *************** __objc_exec_class (Module_t module) *** 581,594 **** } /* Register the instance methods as class methods, this is ! only done for root classes. */ ! __objc_register_instance_methods_to_class(class); } else { /* The object to which the category methods belong can't be found. Save the information. */ ! unclaimed_categories = list_cons(category, unclaimed_categories); } } --- 596,609 ---- } /* Register the instance methods as class methods, this is ! only done for root classes. */ ! __objc_register_instance_methods_to_class (class); } else { /* The object to which the category methods belong can't be found. Save the information. */ ! unclaimed_categories = list_cons (category, unclaimed_categories); } } *************** __objc_exec_class (Module_t module) *** 625,632 **** } /* Register the instance methods as class methods, this is ! only done for root classes. */ ! __objc_register_instance_methods_to_class(class); } else cell = &(*cell)->tail; --- 640,647 ---- } /* Register the instance methods as class methods, this is ! only done for root classes. */ ! __objc_register_instance_methods_to_class (class); } else cell = &(*cell)->tail; *************** __objc_exec_class (Module_t module) *** 634,663 **** if (unclaimed_proto_list && objc_lookup_class ("Protocol")) { ! list_mapcar (unclaimed_proto_list,(void(*)(void*))__objc_init_protocols); list_free (unclaimed_proto_list); unclaimed_proto_list = 0; } objc_send_load (); ! objc_mutex_unlock(__objc_runtime_mutex); } ! static void objc_send_load (void) { ! if (!__objc_module_list) return; /* Try to find out if all the classes loaded so far also have their ! superclasses known to the runtime. We suppose that the objects that are ! allocated in the +load method are in general of a class declared in the ! same module. */ if (unresolved_classes) { Class class = unresolved_classes->head; ! while (objc_lookup_class ((char*)class->super_class)) { list_remove_head (&unresolved_classes); if (unresolved_classes) --- 649,680 ---- if (unclaimed_proto_list && objc_lookup_class ("Protocol")) { ! list_mapcar (unclaimed_proto_list, ! (void (*) (void *))__objc_init_protocols); list_free (unclaimed_proto_list); unclaimed_proto_list = 0; } objc_send_load (); ! objc_mutex_unlock (__objc_runtime_mutex); } ! static void ! objc_send_load (void) { ! if (! __objc_module_list) return; /* Try to find out if all the classes loaded so far also have their ! superclasses known to the runtime. We suppose that the objects ! that are allocated in the +load method are in general of a class ! declared in the same module. */ if (unresolved_classes) { Class class = unresolved_classes->head; ! while (objc_lookup_class ((char *) class->super_class)) { list_remove_head (&unresolved_classes); if (unresolved_classes) *************** static void objc_send_load (void) *** 666,690 **** break; } ! /* ! * If we still have classes for whom we don't have yet their super ! * classes known to the runtime we don't send the +load messages. ! */ if (unresolved_classes) return; } ! /* Special check to allow creating and sending messages to constant strings ! in +load methods. If these classes are not yet known, even if all the ! other classes are known, delay sending of +load. */ ! if (!objc_lookup_class ("NXConstantString") || ! !objc_lookup_class ("Object")) return; ! /* Iterate over all modules in the __objc_module_list and call on them the ! __objc_create_classes_tree function. This function creates a tree of ! classes that resembles the class hierarchy. */ ! list_mapcar (__objc_module_list, (void(*)(void*))__objc_create_classes_tree); while (__objc_class_tree_list) { --- 683,707 ---- break; } ! /* If we still have classes for whom we don't have yet their ! super classes known to the runtime we don't send the +load ! messages. */ if (unresolved_classes) return; } ! /* Special check to allow creating and sending messages to constant ! strings in +load methods. If these classes are not yet known, ! even if all the other classes are known, delay sending of +load. */ ! if (! objc_lookup_class ("NXConstantString") || ! ! objc_lookup_class ("Object")) return; ! /* Iterate over all modules in the __objc_module_list and call on ! them the __objc_create_classes_tree function. This function ! creates a tree of classes that resembles the class hierarchy. */ ! list_mapcar (__objc_module_list, ! (void (*) (void *)) __objc_create_classes_tree); while (__objc_class_tree_list) { *************** static void objc_send_load (void) *** 699,705 **** list_remove_head (&__objc_class_tree_list); } ! list_mapcar (__objc_module_list, (void(*)(void*))__objc_call_callback); list_free (__objc_module_list); __objc_module_list = NULL; } --- 716,722 ---- list_remove_head (&__objc_class_tree_list); } ! list_mapcar (__objc_module_list, (void (*) (void *)) __objc_call_callback); list_free (__objc_module_list); __objc_module_list = NULL; } *************** __objc_create_classes_tree (Module_t mod *** 712,719 **** Symtab_t symtab = module->symtab; int i; ! /* Iterate thru classes defined in this module and insert them in the classes ! tree hierarchy. */ for (i = 0; i < symtab->cls_def_cnt; i++) { Class class = (Class) symtab->defs[i]; --- 729,736 ---- Symtab_t symtab = module->symtab; int i; ! /* Iterate thru classes defined in this module and insert them in ! the classes tree hierarchy. */ for (i = 0; i < symtab->cls_def_cnt; i++) { Class class = (Class) symtab->defs[i]; *************** __objc_create_classes_tree (Module_t mod *** 725,796 **** static void __objc_call_callback (Module_t module) { ! /* The runtime mutex is locked in this point */ Symtab_t symtab = module->symtab; int i; ! /* Iterate thru classes defined in this module and call the callback for ! each one. */ for (i = 0; i < symtab->cls_def_cnt; i++) { Class class = (Class) symtab->defs[i]; ! /* Call the _objc_load_callback for this class. */ if (_objc_load_callback) ! _objc_load_callback(class, 0); } ! /* Call the _objc_load_callback for categories. Don't register the instance ! methods as class methods for categories to root classes since they were ! already added in the class. */ for (i = 0; i < symtab->cat_def_cnt; i++) { Category_t category = symtab->defs[i + symtab->cls_def_cnt]; Class class = objc_lookup_class (category->class_name); if (_objc_load_callback) ! _objc_load_callback(class, category); } } ! /* Sanity check the version of gcc used to compile `module'*/ ! static void init_check_module_version(Module_t module) { if ((module->version != OBJC_VERSION) || (module->size != sizeof (Module))) { int code; ! if(module->version > OBJC_VERSION) code = OBJC_ERR_OBJC_VERSION; else if (module->version < OBJC_VERSION) code = OBJC_ERR_GCC_VERSION; else code = OBJC_ERR_MODULE_SIZE; ! objc_error(nil, code, "Module %s version %d doesn't match runtime %d\n", ! module->name, (int)module->version, OBJC_VERSION); } } static void ! __objc_init_protocols (struct objc_protocol_list* protos) { ! int i; static Class proto_class = 0; if (! protos) return; ! objc_mutex_lock(__objc_runtime_mutex); ! if (!proto_class) ! proto_class = objc_lookup_class("Protocol"); ! if (!proto_class) { unclaimed_proto_list = list_cons (protos, unclaimed_proto_list); ! objc_mutex_unlock(__objc_runtime_mutex); return; } --- 742,815 ---- static void __objc_call_callback (Module_t module) { ! /* The runtime mutex is locked in this point. */ Symtab_t symtab = module->symtab; int i; ! /* Iterate thru classes defined in this module and call the callback ! for each one. */ for (i = 0; i < symtab->cls_def_cnt; i++) { Class class = (Class) symtab->defs[i]; ! /* Call the _objc_load_callback for this class. */ if (_objc_load_callback) ! _objc_load_callback (class, 0); } ! /* Call the _objc_load_callback for categories. Don't register the ! instance methods as class methods for categories to root classes ! since they were already added in the class. */ for (i = 0; i < symtab->cat_def_cnt; i++) { Category_t category = symtab->defs[i + symtab->cls_def_cnt]; Class class = objc_lookup_class (category->class_name); if (_objc_load_callback) ! _objc_load_callback (class, category); } } ! /* Sanity check the version of gcc used to compile `module'. */ ! ! static void ! init_check_module_version (Module_t module) { if ((module->version != OBJC_VERSION) || (module->size != sizeof (Module))) { int code; ! if (module->version > OBJC_VERSION) code = OBJC_ERR_OBJC_VERSION; else if (module->version < OBJC_VERSION) code = OBJC_ERR_GCC_VERSION; else code = OBJC_ERR_MODULE_SIZE; ! objc_error (nil, code, "Module %s version %d doesn't match runtime %d\n", ! module->name, (int)module->version, OBJC_VERSION); } } static void ! __objc_init_protocols (struct objc_protocol_list *protos) { ! size_t i; static Class proto_class = 0; if (! protos) return; ! objc_mutex_lock (__objc_runtime_mutex); ! if (! proto_class) ! proto_class = objc_lookup_class ("Protocol"); ! if (! proto_class) { unclaimed_proto_list = list_cons (protos, unclaimed_proto_list); ! objc_mutex_unlock (__objc_runtime_mutex); return; } *************** __objc_init_protocols (struct objc_proto *** 798,806 **** assert (protos->next == 0); /* only single ones allowed */ #endif ! for(i = 0; i < protos->count; i++) { ! struct objc_protocol* aProto = protos->list[i]; if (((size_t)aProto->class_pointer) == PROTOCOL_VERSION) { /* assign class pointer */ --- 817,825 ---- assert (protos->next == 0); /* only single ones allowed */ #endif ! for (i = 0; i < protos->count; i++) { ! struct objc_protocol *aProto = protos->list[i]; if (((size_t)aProto->class_pointer) == PROTOCOL_VERSION) { /* assign class pointer */ *************** __objc_init_protocols (struct objc_proto *** 811,834 **** } else if (protos->list[i]->class_pointer != proto_class) { ! objc_error(nil, OBJC_ERR_PROTOCOL_VERSION, "Version %d doesn't match runtime protocol version %d\n", ! (int)((char*)protos->list[i]->class_pointer-(char*)0), PROTOCOL_VERSION); } } ! objc_mutex_unlock(__objc_runtime_mutex); } ! static void __objc_class_add_protocols (Class class, ! struct objc_protocol_list* protos) { ! /* Well... */ if (! protos) return; ! /* Add it... */ protos->next = class->protocols; class->protocols = protos; } --- 830,854 ---- } else if (protos->list[i]->class_pointer != proto_class) { ! objc_error (nil, OBJC_ERR_PROTOCOL_VERSION, "Version %d doesn't match runtime protocol version %d\n", ! (int) ((char *) protos->list[i]->class_pointer ! - (char *) 0), PROTOCOL_VERSION); } } ! objc_mutex_unlock (__objc_runtime_mutex); } ! static void ! __objc_class_add_protocols (Class class, struct objc_protocol_list *protos) { ! /* Well... */ if (! protos) return; ! /* Add it... */ protos->next = class->protocols; class->protocols = protos; } diff -Nrc3pad gcc-3.2.3/libobjc/Makefile.in gcc-3.3/libobjc/Makefile.in *** gcc-3.2.3/libobjc/Makefile.in 2003-01-28 21:51:33.000000000 +0000 --- gcc-3.3/libobjc/Makefile.in 2003-01-26 11:29:56.000000000 +0000 *************** *** 22,28 **** #Makefile.in files. Some of this stuff may be unnecessary and #worthless. ! SHELL = /bin/sh MAKEOVERRIDES= #### Start of system configuration section. #### --- 22,28 ---- #Makefile.in files. Some of this stuff may be unnecessary and #worthless. ! SHELL = @SHELL@ MAKEOVERRIDES= #### Start of system configuration section. #### *************** RANLIB = @RANLIB@ *** 67,74 **** CC = @CC@ CFLAGS = @CFLAGS@ GTHREAD_FLAGS=@GTHREAD_FLAGS@ ! ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) \ $(GTHREAD_FLAGS) -DIN_GCC -DIN_TARGET_LIBS # Libtool --- 67,75 ---- CC = @CC@ CFLAGS = @CFLAGS@ + WARN_CFLAGS = -W -Wall -Wwrite-strings -Wstrict-prototypes GTHREAD_FLAGS=@GTHREAD_FLAGS@ ! ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(WARN_CFLAGS) \ $(GTHREAD_FLAGS) -DIN_GCC -DIN_TARGET_LIBS # Libtool diff -Nrc3pad gcc-3.2.3/libobjc/misc.c gcc-3.3/libobjc/misc.c *** gcc-3.2.3/libobjc/misc.c 1999-09-04 15:09:19.000000000 +0000 --- gcc-3.3/libobjc/misc.c 2002-07-02 19:42:34.000000000 +0000 *************** *** 1,5 **** /* GNU Objective C Runtime Miscellaneous ! Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GNU CC. --- 1,6 ---- /* GNU Objective C Runtime Miscellaneous ! Copyright (C) 1993, 1994, 1995, 1996, 1997, 2002 ! Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GNU CC. *************** static objc_error_handler _objc_error_ha *** 37,61 **** /* Trigger an objc error */ void ! objc_error(id object, int code, const char* fmt, ...) { va_list ap; ! va_start(ap, fmt); ! objc_verror(object, code, fmt, ap); ! va_end(ap); } /* Trigger an objc error */ void ! objc_verror(id object, int code, const char* fmt, va_list ap) { BOOL result = NO; /* Call the error handler if its there Otherwise print to stderr */ if (_objc_error_handler) ! result = (*_objc_error_handler)(object, code, fmt, ap); else vfprintf (stderr, fmt, ap); --- 38,62 ---- /* Trigger an objc error */ void ! objc_error (id object, int code, const char *fmt, ...) { va_list ap; ! va_start (ap, fmt); ! objc_verror (object, code, fmt, ap); ! va_end (ap); } /* Trigger an objc error */ void ! objc_verror (id object, int code, const char *fmt, va_list ap) { BOOL result = NO; /* Call the error handler if its there Otherwise print to stderr */ if (_objc_error_handler) ! result = (*_objc_error_handler) (object, code, fmt, ap); else vfprintf (stderr, fmt, ap); *************** objc_verror(id object, int code, const c *** 64,75 **** if (result) return; else ! abort(); } /* Set the error handler */ objc_error_handler ! objc_set_error_handler(objc_error_handler func) { objc_error_handler temp = _objc_error_handler; _objc_error_handler = func; --- 65,76 ---- if (result) return; else ! abort (); } /* Set the error handler */ objc_error_handler ! objc_set_error_handler (objc_error_handler func) { objc_error_handler temp = _objc_error_handler; _objc_error_handler = func; *************** objc_set_error_handler(objc_error_handle *** 84,137 **** */ void * ! objc_malloc(size_t size) { ! void* res = (void*) (*_objc_malloc)(size); ! if(!res) ! objc_error(nil, OBJC_ERR_MEMORY, "Virtual memory exhausted\n"); return res; } void * ! objc_atomic_malloc(size_t size) { ! void* res = (void*) (*_objc_atomic_malloc)(size); ! if(!res) ! objc_error(nil, OBJC_ERR_MEMORY, "Virtual memory exhausted\n"); return res; } void * ! objc_valloc(size_t size) { ! void* res = (void*) (*_objc_valloc)(size); ! if(!res) ! objc_error(nil, OBJC_ERR_MEMORY, "Virtual memory exhausted\n"); return res; } void * ! objc_realloc(void *mem, size_t size) { ! void* res = (void*) (*_objc_realloc)(mem, size); ! if(!res) ! objc_error(nil, OBJC_ERR_MEMORY, "Virtual memory exhausted\n"); return res; } void * ! objc_calloc(size_t nelem, size_t size) { ! void* res = (void*) (*_objc_calloc)(nelem, size); ! if(!res) ! objc_error(nil, OBJC_ERR_MEMORY, "Virtual memory exhausted\n"); return res; } void ! objc_free(void *mem) { ! (*_objc_free)(mem); } /* --- 85,138 ---- */ void * ! objc_malloc (size_t size) { ! void *res = (void *) (*_objc_malloc) (size); ! if (! res) ! objc_error (nil, OBJC_ERR_MEMORY, "Virtual memory exhausted\n"); return res; } void * ! objc_atomic_malloc (size_t size) { ! void *res = (void *) (*_objc_atomic_malloc) (size); ! if (! res) ! objc_error (nil, OBJC_ERR_MEMORY, "Virtual memory exhausted\n"); return res; } void * ! objc_valloc (size_t size) { ! void *res = (void *) (*_objc_valloc) (size); ! if (! res) ! objc_error (nil, OBJC_ERR_MEMORY, "Virtual memory exhausted\n"); return res; } void * ! objc_realloc (void *mem, size_t size) { ! void *res = (void *) (*_objc_realloc) (mem, size); ! if (! res) ! objc_error (nil, OBJC_ERR_MEMORY, "Virtual memory exhausted\n"); return res; } void * ! objc_calloc (size_t nelem, size_t size) { ! void *res = (void *) (*_objc_calloc) (nelem, size); ! if (! res) ! objc_error (nil, OBJC_ERR_MEMORY, "Virtual memory exhausted\n"); return res; } void ! objc_free (void *mem) { ! (*_objc_free) (mem); } /* *************** objc_free(void *mem) *** 148,180 **** #if OBJC_WITH_GC #include ! static void *GC_calloc (size_t nelem, size_t size) { ! void* p = GC_malloc (nelem * size); ! if (!p) objc_error (nil, OBJC_ERR_MEMORY, "Virtual memory exhausted!\n"); memset (p, 0, nelem * size); return p; } ! static void noFree (void* p) {} ! void *(*_objc_malloc)(size_t) = GC_malloc; ! void *(*_objc_atomic_malloc)(size_t) = GC_malloc_atomic; ! void *(*_objc_valloc)(size_t) = GC_malloc; ! void *(*_objc_realloc)(void *, size_t) = GC_realloc; ! void *(*_objc_calloc)(size_t, size_t) = GC_calloc; ! void (*_objc_free)(void *) = noFree; ! #else ! void *(*_objc_malloc)(size_t) = malloc; ! void *(*_objc_atomic_malloc)(size_t) = malloc; ! void *(*_objc_valloc)(size_t) = malloc; ! void *(*_objc_realloc)(void *, size_t) = realloc; ! void *(*_objc_calloc)(size_t, size_t) = calloc; ! void (*_objc_free)(void *) = free; ! #endif --- 149,185 ---- #if OBJC_WITH_GC #include ! static void * ! GC_calloc (size_t nelem, size_t size) { ! void *p = GC_malloc (nelem * size); ! if (! p) objc_error (nil, OBJC_ERR_MEMORY, "Virtual memory exhausted!\n"); memset (p, 0, nelem * size); return p; } ! static void ! noFree (void *p) ! { ! } ! void *(*_objc_malloc) (size_t) = GC_malloc; ! void *(*_objc_atomic_malloc) (size_t) = GC_malloc_atomic; ! void *(*_objc_valloc) (size_t) = GC_malloc; ! void *(*_objc_realloc) (void *, size_t) = GC_realloc; ! void *(*_objc_calloc) (size_t, size_t) = GC_calloc; ! void (*_objc_free) (void *) = noFree; ! #else /* !OBJC_WITH_GC */ ! void *(*_objc_malloc) (size_t) = malloc; ! void *(*_objc_atomic_malloc) (size_t) = malloc; ! void *(*_objc_valloc) (size_t) = malloc; ! void *(*_objc_realloc) (void *, size_t) = realloc; ! void *(*_objc_calloc) (size_t, size_t) = calloc; ! void (*_objc_free) (void *) = free; ! #endif /* !OBJC_WITH_GC */ diff -Nrc3pad gcc-3.2.3/libobjc/nil_method.c gcc-3.3/libobjc/nil_method.c *** gcc-3.2.3/libobjc/nil_method.c 1999-09-04 15:09:19.000000000 +0000 --- gcc-3.3/libobjc/nil_method.c 2002-09-12 17:29:26.000000000 +0000 *************** *** 1,5 **** /* GNU Objective C Runtime nil receiver function ! Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GNU CC. --- 1,5 ---- /* GNU Objective C Runtime nil receiver function ! Copyright (C) 1993, 1995, 1996, 2002 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 29,40 **** #include "runtime.h" id ! nil_method(id receiver, SEL op, ...) { return receiver; } - - - - --- 29,55 ---- #include "runtime.h" + /* When the receiver of a method invocation is nil, the runtime + returns nil_method() as the method implementation. This function + will be casted to whatever function was supposed to be executed to + execute that method (that function will take an id, followed by a + SEL, followed by who knows what arguments, depends on the method), + and executed. + + For this reason, nil_method() should be a function which can be + called in place of any function taking an 'id' argument followed by + a 'SEL' argument, followed by zero, or one, or any number of + arguments (both a fixed number, or a variable number !). + + There is no "proper" implementation of such a nil_method function + in C, however in all existing implementations it does not matter + when extra arguments are present, so we can simply create a function + taking a receiver and a selector, and all other arguments will be + ignored. :-) + */ + id ! nil_method (id receiver, SEL op __attribute__ ((__unused__))) { return receiver; } diff -Nrc3pad gcc-3.2.3/libobjc/objc/encoding.h gcc-3.3/libobjc/objc/encoding.h *** gcc-3.2.3/libobjc/objc/encoding.h 1998-10-08 11:23:35.000000000 +0000 --- gcc-3.3/libobjc/objc/encoding.h 2002-07-02 19:43:00.000000000 +0000 *************** *** 1,5 **** /* Encoding of types for Objective C. ! Copyright (C) 1993, 1997 Free Software Foundation, Inc. Author: Kresten Krab Thorup --- 1,5 ---- /* Encoding of types for Objective C. ! Copyright (C) 1993, 1997, 2002 Free Software Foundation, Inc. Author: Kresten Krab Thorup *************** Boston, MA 02111-1307, USA. */ *** 50,79 **** #define _F_ONEWAY 0x10 #define _F_GCINVISIBLE 0x20 ! int objc_aligned_size (const char* type); ! int objc_sizeof_type (const char* type); ! int objc_alignof_type (const char* type); ! int objc_aligned_size (const char* type); ! int objc_promoted_size (const char* type); ! const char* objc_skip_type_qualifiers (const char* type); ! const char* objc_skip_typespec (const char* type); ! const char* objc_skip_offset (const char* type); ! const char* objc_skip_argspec (const char* type); ! int method_get_number_of_arguments (struct objc_method*); ! int method_get_sizeof_arguments (struct objc_method*); ! char* method_get_first_argument (struct objc_method*, arglist_t argframe, ! const char** type); ! char* method_get_next_argument (arglist_t argframe, const char **type); ! char* method_get_nth_argument (struct objc_method* m, arglist_t argframe, int arg, const char **type); ! unsigned objc_get_type_qualifiers (const char* type); struct objc_struct_layout --- 50,79 ---- #define _F_ONEWAY 0x10 #define _F_GCINVISIBLE 0x20 ! int objc_aligned_size (const char *type); ! int objc_sizeof_type (const char *type); ! int objc_alignof_type (const char *type); ! int objc_aligned_size (const char *type); ! int objc_promoted_size (const char *type); ! const char *objc_skip_type_qualifiers (const char *type); ! const char *objc_skip_typespec (const char *type); ! const char *objc_skip_offset (const char *type); ! const char *objc_skip_argspec (const char *type); ! int method_get_number_of_arguments (struct objc_method *); ! int method_get_sizeof_arguments (struct objc_method *); ! char *method_get_first_argument (struct objc_method *, arglist_t argframe, ! const char **type); ! char *method_get_next_argument (arglist_t argframe, const char **type); ! char *method_get_nth_argument (struct objc_method *m, arglist_t argframe, int arg, const char **type); ! unsigned objc_get_type_qualifiers (const char *type); struct objc_struct_layout diff -Nrc3pad gcc-3.2.3/libobjc/objc/hash.h gcc-3.3/libobjc/objc/hash.h *** gcc-3.2.3/libobjc/objc/hash.h 2000-07-13 18:56:49.000000000 +0000 --- gcc-3.3/libobjc/objc/hash.h 2002-07-02 19:43:02.000000000 +0000 *************** typedef struct cache_node *** 60,66 **** * typedef. Therefore, to remove compiler warnings the functions passed to * hash_new will have to be casted to this type. */ ! typedef unsigned int (*hash_func_type)(void *, const void *); /* * This data type is the function that compares two hash keys and returns an --- 60,66 ---- * typedef. Therefore, to remove compiler warnings the functions passed to * hash_new will have to be casted to this type. */ ! typedef unsigned int (*hash_func_type) (void *, const void *); /* * This data type is the function that compares two hash keys and returns an *************** typedef unsigned int (*hash_func_type)(v *** 69,75 **** * second. */ ! typedef int (*compare_func_type)(const void *, const void *); /* --- 69,75 ---- * second. */ ! typedef int (*compare_func_type) (const void *, const void *); /* *************** hash_string (cache_ptr cache, const void *** 174,181 **** unsigned int ctr = 0; ! while (*(char*)key) { ! ret ^= *(char*)key++ << ctr; ctr = (ctr + 1) % sizeof (void *); } --- 174,181 ---- unsigned int ctr = 0; ! while (*(char *) key) { ! ret ^= *(char *) key++ << ctr; ctr = (ctr + 1) % sizeof (void *); } *************** hash_string (cache_ptr cache, const void *** 187,193 **** static inline int compare_ptrs (const void *k1, const void *k2) { ! return !(k1 - k2); } --- 187,193 ---- static inline int compare_ptrs (const void *k1, const void *k2) { ! return ! (k1 - k2); } *************** compare_strings (const void *k1, const v *** 200,206 **** else if (k1 == 0 || k2 == 0) return 0; else ! return !strcmp (k1, k2); } --- 200,206 ---- else if (k1 == 0 || k2 == 0) return 0; else ! return ! strcmp (k1, k2); } diff -Nrc3pad gcc-3.2.3/libobjc/objc/objc.h gcc-3.3/libobjc/objc/objc.h *** gcc-3.2.3/libobjc/objc/objc.h 1999-09-04 15:09:20.000000000 +0000 --- gcc-3.3/libobjc/objc/objc.h 2002-09-12 17:28:47.000000000 +0000 *************** typedef struct objc_object { *** 73,79 **** /* ** Definition of method type. When retrieving the implementation of a ! ** method, this is type of the pointer returned */ typedef id (*IMP)(id, SEL, ...); --- 73,86 ---- /* ** Definition of method type. When retrieving the implementation of a ! ** method, this is type of the pointer returned. The idea of the ! ** definition of IMP is to represent a 'pointer to a general function ! ** taking an id, a SEL, followed by other unspecified arguments'. You ! ** must always cast an IMP to a pointer to a function taking the ! ** appropriate, specific types for that function, before calling it - ! ** to make sure the appropriate arguments are passed to it. The code ! ** generated by the compiler to perform method calls automatically ! ** does this cast inside method calls. */ typedef id (*IMP)(id, SEL, ...); diff -Nrc3pad gcc-3.2.3/libobjc/objc/runtime.h gcc-3.3/libobjc/objc/runtime.h *** gcc-3.2.3/libobjc/objc/runtime.h 1999-09-04 15:09:20.000000000 +0000 --- gcc-3.3/libobjc/objc/runtime.h 2002-06-21 14:36:37.000000000 +0000 *************** *** 1,5 **** /* GNU Objective C Runtime internal declarations ! Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GNU CC. --- 1,5 ---- /* GNU Objective C Runtime internal declarations ! Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GNU CC. *************** extern Method_t search_for_method_in_lis *** 65,71 **** extern BOOL __objc_class_links_resolved; /* Number of selectors stored in each of the selector tables */ ! extern int __objc_selector_max_index; /* Mutex locking __objc_selector_max_index and its arrays. */ extern objc_mutex_t __objc_runtime_mutex; --- 65,71 ---- extern BOOL __objc_class_links_resolved; /* Number of selectors stored in each of the selector tables */ ! extern unsigned int __objc_selector_max_index; /* Mutex locking __objc_selector_max_index and its arrays. */ extern objc_mutex_t __objc_runtime_mutex; *************** extern int __objc_runtime_threads_alive; *** 82,87 **** --- 82,88 ---- BOOL __objc_responds_to (id object, SEL sel); /* for internal use only! */ SEL __sel_register_typed_name (const char*, const char*, struct objc_selector*, BOOL is_const); + extern void __objc_generate_gc_type_description (Class); #endif /* not __objc_runtime_INCLUDE_GNU */ diff -Nrc3pad gcc-3.2.3/libobjc/objc/thr.h gcc-3.3/libobjc/objc/thr.h *** gcc-3.2.3/libobjc/objc/thr.h 2001-03-15 02:18:09.000000000 +0000 --- gcc-3.3/libobjc/objc/thr.h 2002-07-02 19:43:03.000000000 +0000 *************** *** 1,5 **** /* Thread and mutex controls for Objective C. ! Copyright (C) 1996, 1997 Free Software Foundation, Inc. Contributed by Galen C. Hunt (gchunt@cs.rochester.edu) This file is part of GNU CC. --- 1,5 ---- /* Thread and mutex controls for Objective C. ! Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc. Contributed by Galen C. Hunt (gchunt@cs.rochester.edu) This file is part of GNU CC. *************** struct objc_condition *** 74,103 **** typedef struct objc_condition *objc_condition_t; /* Frontend mutex functions */ ! objc_mutex_t objc_mutex_allocate(void); ! int objc_mutex_deallocate(objc_mutex_t mutex); ! int objc_mutex_lock(objc_mutex_t mutex); ! int objc_mutex_unlock(objc_mutex_t mutex); ! int objc_mutex_trylock(objc_mutex_t mutex); /* Frontend condition mutex functions */ ! objc_condition_t objc_condition_allocate(void); ! int objc_condition_deallocate(objc_condition_t condition); ! int objc_condition_wait(objc_condition_t condition, objc_mutex_t mutex); ! int objc_condition_signal(objc_condition_t condition); ! int objc_condition_broadcast(objc_condition_t condition); /* Frontend thread functions */ ! objc_thread_t objc_thread_detach(SEL selector, id object, id argument); ! void objc_thread_yield(void); ! int objc_thread_exit(void); ! int objc_thread_set_priority(int priority); ! int objc_thread_get_priority(void); ! void * objc_thread_get_data(void); ! int objc_thread_set_data(void *value); ! objc_thread_t objc_thread_id(void); ! void objc_thread_add(void); ! void objc_thread_remove(void); /* Use this to set the hook function that will be called when the --- 74,103 ---- typedef struct objc_condition *objc_condition_t; /* Frontend mutex functions */ ! objc_mutex_t objc_mutex_allocate (void); ! int objc_mutex_deallocate (objc_mutex_t mutex); ! int objc_mutex_lock (objc_mutex_t mutex); ! int objc_mutex_unlock (objc_mutex_t mutex); ! int objc_mutex_trylock (objc_mutex_t mutex); /* Frontend condition mutex functions */ ! objc_condition_t objc_condition_allocate (void); ! int objc_condition_deallocate (objc_condition_t condition); ! int objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex); ! int objc_condition_signal (objc_condition_t condition); ! int objc_condition_broadcast (objc_condition_t condition); /* Frontend thread functions */ ! objc_thread_t objc_thread_detach (SEL selector, id object, id argument); ! void objc_thread_yield (void); ! int objc_thread_exit (void); ! int objc_thread_set_priority (int priority); ! int objc_thread_get_priority (void); ! void * objc_thread_get_data (void); ! int objc_thread_set_data (void *value); ! objc_thread_t objc_thread_id (void); ! void objc_thread_add (void); ! void objc_thread_remove (void); /* Use this to set the hook function that will be called when the *************** void objc_thread_remove(void); *** 111,145 **** it can be informed; for example, the GNUstep Base Library sets it so it can implement the NSBecomingMultiThreaded notification. */ ! typedef void (*objc_thread_callback)(); ! objc_thread_callback objc_set_thread_callback(objc_thread_callback func); /* Backend initialization functions */ ! int __objc_init_thread_system(void); ! int __objc_fini_thread_system(void); /* Backend mutex functions */ ! int __objc_mutex_allocate(objc_mutex_t mutex); ! int __objc_mutex_deallocate(objc_mutex_t mutex); ! int __objc_mutex_lock(objc_mutex_t mutex); ! int __objc_mutex_trylock(objc_mutex_t mutex); ! int __objc_mutex_unlock(objc_mutex_t mutex); /* Backend condition mutex functions */ ! int __objc_condition_allocate(objc_condition_t condition); ! int __objc_condition_deallocate(objc_condition_t condition); ! int __objc_condition_wait(objc_condition_t condition, objc_mutex_t mutex); ! int __objc_condition_broadcast(objc_condition_t condition); ! int __objc_condition_signal(objc_condition_t condition); /* Backend thread functions */ ! objc_thread_t __objc_thread_detach(void (*func)(void *arg), void *arg); ! int __objc_thread_set_priority(int priority); ! int __objc_thread_get_priority(void); ! void __objc_thread_yield(void); ! int __objc_thread_exit(void); ! objc_thread_t __objc_thread_id(void); ! int __objc_thread_set_data(void *value); ! void * __objc_thread_get_data(void); #endif /* not __thread_INCLUDE_GNU */ --- 111,145 ---- it can be informed; for example, the GNUstep Base Library sets it so it can implement the NSBecomingMultiThreaded notification. */ ! typedef void (*objc_thread_callback) (void); ! objc_thread_callback objc_set_thread_callback (objc_thread_callback func); /* Backend initialization functions */ ! int __objc_init_thread_system (void); ! int __objc_fini_thread_system (void); /* Backend mutex functions */ ! int __objc_mutex_allocate (objc_mutex_t mutex); ! int __objc_mutex_deallocate (objc_mutex_t mutex); ! int __objc_mutex_lock (objc_mutex_t mutex); ! int __objc_mutex_trylock (objc_mutex_t mutex); ! int __objc_mutex_unlock (objc_mutex_t mutex); /* Backend condition mutex functions */ ! int __objc_condition_allocate (objc_condition_t condition); ! int __objc_condition_deallocate (objc_condition_t condition); ! int __objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex); ! int __objc_condition_broadcast (objc_condition_t condition); ! int __objc_condition_signal (objc_condition_t condition); /* Backend thread functions */ ! objc_thread_t __objc_thread_detach (void (*func) (void *arg), void *arg); ! int __objc_thread_set_priority (int priority); ! int __objc_thread_get_priority (void); ! void __objc_thread_yield (void); ! int __objc_thread_exit (void); ! objc_thread_t __objc_thread_id (void); ! int __objc_thread_set_data (void *value); ! void * __objc_thread_get_data (void); #endif /* not __thread_INCLUDE_GNU */ diff -Nrc3pad gcc-3.2.3/libobjc/Object.m gcc-3.3/libobjc/Object.m *** gcc-3.2.3/libobjc/Object.m 2000-07-29 07:09:34.000000000 +0000 --- gcc-3.3/libobjc/Object.m 2002-06-21 14:36:36.000000000 +0000 *************** *** 1,5 **** /* The implementation of class Object for Objective-C. ! Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* The implementation of class Object for Objective-C. ! Copyright (C) 1993, 1994, 1995, 1997, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** extern int errno; *** 199,205 **** + (BOOL) conformsTo: (Protocol*)aProtocol { ! int i; struct objc_protocol_list* proto_list; id parent; --- 199,205 ---- + (BOOL) conformsTo: (Protocol*)aProtocol { ! size_t i; struct objc_protocol_list* proto_list; id parent; *************** extern int errno; *** 271,276 **** --- 271,277 ---- - (retval_t)forward:(SEL)aSel :(arglist_t)argFrame { + (void) argFrame; /* UNUSED */ return (retval_t)[self doesNotRecognize: aSel]; } *************** extern int errno; *** 364,375 **** --- 365,378 ---- - read: (TypedStream*)aStream { + (void) aStream; /* UNUSED */ // [super read: aStream]; return self; } - write: (TypedStream*)aStream { + (void) aStream; /* UNUSED */ // [super write: aStream]; return self; } diff -Nrc3pad gcc-3.2.3/libobjc/objects.c gcc-3.3/libobjc/objects.c *** gcc-3.2.3/libobjc/objects.c 1998-09-30 02:13:11.000000000 +0000 --- gcc-3.3/libobjc/objects.c 2002-07-02 19:42:43.000000000 +0000 *************** Boston, MA 02111-1307, USA. */ *** 32,60 **** # include #endif ! id __objc_object_alloc(Class); ! id __objc_object_dispose(id); ! id __objc_object_copy(id); ! id (*_objc_object_alloc)(Class) = __objc_object_alloc; /* !T:SINGLE */ ! id (*_objc_object_dispose)(id) = __objc_object_dispose; /* !T:SINGLE */ ! id (*_objc_object_copy)(id) = __objc_object_copy; /* !T:SINGLE */ id ! class_create_instance(Class class) { id new = nil; #if OBJC_WITH_GC ! if (CLS_ISCLASS(class)) ! new = (id)GC_malloc_explicitly_typed (class->instance_size, ! class->gc_object_type); #else ! if (CLS_ISCLASS(class)) ! new = (*_objc_object_alloc)(class); #endif ! if (new!=nil) { memset (new, 0, class->instance_size); new->class_pointer = class; --- 32,60 ---- # include #endif ! id __objc_object_alloc (Class); ! id __objc_object_dispose (id); ! id __objc_object_copy (id); ! id (*_objc_object_alloc) (Class) = __objc_object_alloc; /* !T:SINGLE */ ! id (*_objc_object_dispose) (id) = __objc_object_dispose; /* !T:SINGLE */ ! id (*_objc_object_copy) (id) = __objc_object_copy; /* !T:SINGLE */ id ! class_create_instance (Class class) { id new = nil; #if OBJC_WITH_GC ! if (CLS_ISCLASS (class)) ! new = (id) GC_malloc_explicitly_typed (class->instance_size, ! class->gc_object_type); #else ! if (CLS_ISCLASS (class)) ! new = (*_objc_object_alloc) (class); #endif ! if (new != nil) { memset (new, 0, class->instance_size); new->class_pointer = class; *************** class_create_instance(Class class) *** 63,105 **** } id ! object_copy(id object) { ! if ((object!=nil)&&CLS_ISCLASS(object->class_pointer)) ! return (*_objc_object_copy)(object); else return nil; } id ! object_dispose(id object) { ! if ((object!=nil)&&CLS_ISCLASS(object->class_pointer)) { if (_objc_object_dispose) ! (*_objc_object_dispose)(object); else ! objc_free(object); } return nil; } ! id __objc_object_alloc(Class class) { ! return (id)objc_malloc(class->instance_size); } ! id __objc_object_dispose(id object) { ! objc_free(object); return 0; } ! id __objc_object_copy(id object) { ! id copy = class_create_instance(object->class_pointer); ! memcpy(copy, object, object->class_pointer->instance_size); return copy; } - - --- 63,103 ---- } id ! object_copy (id object) { ! if ((object != nil) && CLS_ISCLASS (object->class_pointer)) ! return (*_objc_object_copy) (object); else return nil; } id ! object_dispose (id object) { ! if ((object != nil) && CLS_ISCLASS (object->class_pointer)) { if (_objc_object_dispose) ! (*_objc_object_dispose) (object); else ! objc_free (object); } return nil; } ! id __objc_object_alloc (Class class) { ! return (id) objc_malloc (class->instance_size); } ! id __objc_object_dispose (id object) { ! objc_free (object); return 0; } ! id __objc_object_copy (id object) { ! id copy = class_create_instance (object->class_pointer); ! memcpy (copy, object, object->class_pointer->instance_size); return copy; } diff -Nrc3pad gcc-3.2.3/libobjc/Protocol.m gcc-3.3/libobjc/Protocol.m *** gcc-3.2.3/libobjc/Protocol.m 1999-09-04 15:09:19.000000000 +0000 --- gcc-3.3/libobjc/Protocol.m 2002-06-15 17:50:13.000000000 +0000 *************** struct objc_method_description_list { *** 53,59 **** - (BOOL) conformsTo: (Protocol *)aProtocolObject { ! int i; struct objc_protocol_list* proto_list; if (!strcmp(aProtocolObject->protocol_name, self->protocol_name)) --- 53,59 ---- - (BOOL) conformsTo: (Protocol *)aProtocolObject { ! size_t i; struct objc_protocol_list* proto_list; if (!strcmp(aProtocolObject->protocol_name, self->protocol_name)) *************** struct objc_method_description_list { *** 88,96 **** for (proto_list = protocol_list; proto_list; proto_list = proto_list->next) { ! for (i=0; i < proto_list->count; i++) { ! if ((result = [proto_list->list[i] descriptionForInstanceMethod: aSel])) return result; } --- 88,97 ---- for (proto_list = protocol_list; proto_list; proto_list = proto_list->next) { ! size_t j; ! for (j=0; j < proto_list->count; j++) { ! if ((result = [proto_list->list[j] descriptionForInstanceMethod: aSel])) return result; } *************** struct objc_method_description_list { *** 114,122 **** for (proto_list = protocol_list; proto_list; proto_list = proto_list->next) { ! for (i=0; i < proto_list->count; i++) { ! if ((result = [proto_list->list[i] descriptionForClassMethod: aSel])) return result; } --- 115,124 ---- for (proto_list = protocol_list; proto_list; proto_list = proto_list->next) { ! size_t j; ! for (j=0; j < proto_list->count; j++) { ! if ((result = [proto_list->list[j] descriptionForClassMethod: aSel])) return result; } diff -Nrc3pad gcc-3.2.3/libobjc/sarray.c gcc-3.3/libobjc/sarray.c *** gcc-3.2.3/libobjc/sarray.c 2000-07-29 07:10:20.000000000 +0000 --- gcc-3.3/libobjc/sarray.c 2002-07-02 19:42:44.000000000 +0000 *************** *** 1,5 **** /* Sparse Arrays for Objective C dispatch tables ! Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. This file is part of GNU CC. --- 1,5 ---- /* Sparse Arrays for Objective C dispatch tables ! Copyright (C) 1993, 1995, 1996, 2002 Free Software Foundation, Inc. This file is part of GNU CC. *************** int nindices = 0; /* !T:MUTEX */ *** 34,69 **** int narrays = 0; /* !T:MUTEX */ int idxsize = 0; /* !T:MUTEX */ ! static void * first_free_data = NULL; /* !T:MUTEX */ #ifdef OBJC_SPARSE2 ! const char* __objc_sparse2_id = "2 level sparse indices"; #endif #ifdef OBJC_SPARSE3 ! const char* __objc_sparse3_id = "3 level sparse indices"; #endif /* This function removes any structures left over from free operations that were not safe in a multi-threaded environment. */ void ! sarray_remove_garbage(void) { void **vp; void *np; ! objc_mutex_lock(__objc_runtime_mutex); vp = first_free_data; first_free_data = NULL; while (vp) { np = *vp; ! objc_free(vp); vp = np; } ! objc_mutex_unlock(__objc_runtime_mutex); } /* Free a block of dynamically allocated memory. If we are in multi-threaded --- 34,69 ---- int narrays = 0; /* !T:MUTEX */ int idxsize = 0; /* !T:MUTEX */ ! static void *first_free_data = NULL; /* !T:MUTEX */ #ifdef OBJC_SPARSE2 ! const char *__objc_sparse2_id = "2 level sparse indices"; #endif #ifdef OBJC_SPARSE3 ! const char *__objc_sparse3_id = "3 level sparse indices"; #endif /* This function removes any structures left over from free operations that were not safe in a multi-threaded environment. */ void ! sarray_remove_garbage (void) { void **vp; void *np; ! objc_mutex_lock (__objc_runtime_mutex); vp = first_free_data; first_free_data = NULL; while (vp) { np = *vp; ! objc_free (vp); vp = np; } ! objc_mutex_unlock (__objc_runtime_mutex); } /* Free a block of dynamically allocated memory. If we are in multi-threaded *************** sarray_remove_garbage(void) *** 71,103 **** freed later. */ static void ! sarray_free_garbage(void *vp) { ! objc_mutex_lock(__objc_runtime_mutex); if (__objc_runtime_threads_alive == 1) { ! objc_free(vp); if (first_free_data) ! sarray_remove_garbage(); } else { *(void **)vp = first_free_data; first_free_data = vp; } ! objc_mutex_unlock(__objc_runtime_mutex); } /* sarray_at_put : copies data in such a way as to be thread reader safe. */ void ! sarray_at_put(struct sarray* array, sidx index, void* element) { #ifdef OBJC_SPARSE3 ! struct sindex** the_index; ! struct sindex* new_index; #endif ! struct sbucket** the_bucket; ! struct sbucket* new_bucket; #ifdef OBJC_SPARSE3 size_t ioffset; #endif --- 71,103 ---- freed later. */ static void ! sarray_free_garbage (void *vp) { ! objc_mutex_lock (__objc_runtime_mutex); if (__objc_runtime_threads_alive == 1) { ! objc_free (vp); if (first_free_data) ! sarray_remove_garbage (); } else { *(void **)vp = first_free_data; first_free_data = vp; } ! objc_mutex_unlock (__objc_runtime_mutex); } /* sarray_at_put : copies data in such a way as to be thread reader safe. */ void ! sarray_at_put (struct sarray *array, sidx index, void *element) { #ifdef OBJC_SPARSE3 ! struct sindex **the_index; ! struct sindex *new_index; #endif ! struct sbucket **the_bucket; ! struct sbucket *new_bucket; #ifdef OBJC_SPARSE3 size_t ioffset; #endif *************** sarray_at_put(struct sarray* array, sidx *** 122,128 **** #endif #endif /* not PRECOMPUTE_SELECTORS */ ! assert(soffset_decode(index) < array->capacity); /* Range check */ #ifdef OBJC_SPARSE3 the_index = &(array->indices[ioffset]); --- 122,128 ---- #endif #endif /* not PRECOMPUTE_SELECTORS */ ! assert (soffset_decode (index) < array->capacity); /* Range check */ #ifdef OBJC_SPARSE3 the_index = &(array->indices[ioffset]); *************** sarray_at_put(struct sarray* array, sidx *** 141,148 **** if ((*the_index) == array->empty_index) { /* The index was previously empty, allocate a new */ ! new_index = (struct sindex*)objc_malloc(sizeof(struct sindex)); ! memcpy(new_index, array->empty_index, sizeof(struct sindex)); new_index->version.version = array->version.version; *the_index = new_index; /* Prepared for install. */ the_bucket = &((*the_index)->buckets[boffset]); --- 141,148 ---- if ((*the_index) == array->empty_index) { /* The index was previously empty, allocate a new */ ! new_index = (struct sindex *) objc_malloc (sizeof (struct sindex)); ! memcpy (new_index, array->empty_index, sizeof (struct sindex)); new_index->version.version = array->version.version; *the_index = new_index; /* Prepared for install. */ the_bucket = &((*the_index)->buckets[boffset]); *************** sarray_at_put(struct sarray* array, sidx *** 151,159 **** } else if ((*the_index)->version.version != array->version.version) { /* This index must be lazy copied */ ! struct sindex* old_index = *the_index; ! new_index = (struct sindex*)objc_malloc(sizeof(struct sindex)); ! memcpy( new_index, old_index, sizeof(struct sindex)); new_index->version.version = array->version.version; *the_index = new_index; /* Prepared for install. */ the_bucket = &((*the_index)->buckets[boffset]); --- 151,159 ---- } else if ((*the_index)->version.version != array->version.version) { /* This index must be lazy copied */ ! struct sindex *old_index = *the_index; ! new_index = (struct sindex *) objc_malloc (sizeof (struct sindex)); ! memcpy (new_index, old_index, sizeof (struct sindex)); new_index->version.version = array->version.version; *the_index = new_index; /* Prepared for install. */ the_bucket = &((*the_index)->buckets[boffset]); *************** sarray_at_put(struct sarray* array, sidx *** 169,177 **** /* The bucket was previously empty (or something like that), */ /* allocate a new. This is the effect of `lazy' allocation */ ! new_bucket = (struct sbucket*)objc_malloc(sizeof(struct sbucket)); ! memcpy((void *) new_bucket, (const void*)array->empty_bucket, ! sizeof(struct sbucket)); new_bucket->version.version = array->version.version; *the_bucket = new_bucket; /* Prepared for install. */ --- 169,177 ---- /* The bucket was previously empty (or something like that), */ /* allocate a new. This is the effect of `lazy' allocation */ ! new_bucket = (struct sbucket *) objc_malloc (sizeof (struct sbucket)); ! memcpy ((void *) new_bucket, (const void *) array->empty_bucket, ! sizeof (struct sbucket)); new_bucket->version.version = array->version.version; *the_bucket = new_bucket; /* Prepared for install. */ *************** sarray_at_put(struct sarray* array, sidx *** 180,188 **** } else if ((*the_bucket)->version.version != array->version.version) { /* Perform lazy copy. */ ! struct sbucket* old_bucket = *the_bucket; ! new_bucket = (struct sbucket*)objc_malloc(sizeof(struct sbucket)); ! memcpy( new_bucket, old_bucket, sizeof(struct sbucket)); new_bucket->version.version = array->version.version; *the_bucket = new_bucket; /* Prepared for install. */ --- 180,188 ---- } else if ((*the_bucket)->version.version != array->version.version) { /* Perform lazy copy. */ ! struct sbucket *old_bucket = *the_bucket; ! new_bucket = (struct sbucket *) objc_malloc (sizeof (struct sbucket)); ! memcpy (new_bucket, old_bucket, sizeof (struct sbucket)); new_bucket->version.version = array->version.version; *the_bucket = new_bucket; /* Prepared for install. */ *************** sarray_at_put(struct sarray* array, sidx *** 193,231 **** } void ! sarray_at_put_safe(struct sarray* array, sidx index, void* element) { ! if(soffset_decode(index) >= array->capacity) ! sarray_realloc(array, soffset_decode(index)+1); ! sarray_at_put(array, index, element); } ! struct sarray* ! sarray_new (int size, void* default_element) { ! struct sarray* arr; #ifdef OBJC_SPARSE3 ! size_t num_indices = ((size-1)/(INDEX_CAPACITY))+1; ! struct sindex ** new_indices; #else /* OBJC_SPARSE2 */ ! size_t num_indices = ((size-1)/BUCKET_SIZE)+1; ! struct sbucket ** new_buckets; #endif ! int counter; ! assert(size > 0); /* Allocate core array */ ! arr = (struct sarray*) objc_malloc(sizeof(struct sarray)); arr->version.version = 0; /* Initialize members */ #ifdef OBJC_SPARSE3 arr->capacity = num_indices*INDEX_CAPACITY; ! new_indices = (struct sindex**) ! objc_malloc(sizeof(struct sindex*)*num_indices); ! arr->empty_index = (struct sindex*) objc_malloc(sizeof(struct sindex)); arr->empty_index->version.version = 0; narrays += 1; --- 193,231 ---- } void ! sarray_at_put_safe (struct sarray *array, sidx index, void *element) { ! if (soffset_decode (index) >= array->capacity) ! sarray_realloc (array, soffset_decode (index) + 1); ! sarray_at_put (array, index, element); } ! struct sarray * ! sarray_new (int size, void *default_element) { ! struct sarray *arr; #ifdef OBJC_SPARSE3 ! size_t num_indices = ((size - 1)/(INDEX_CAPACITY)) + 1; ! struct sindex **new_indices; #else /* OBJC_SPARSE2 */ ! size_t num_indices = ((size - 1)/BUCKET_SIZE) + 1; ! struct sbucket **new_buckets; #endif ! size_t counter; ! assert (size > 0); /* Allocate core array */ ! arr = (struct sarray *) objc_malloc (sizeof (struct sarray)); arr->version.version = 0; /* Initialize members */ #ifdef OBJC_SPARSE3 arr->capacity = num_indices*INDEX_CAPACITY; ! new_indices = (struct sindex **) ! objc_malloc (sizeof (struct sindex *) * num_indices); ! arr->empty_index = (struct sindex *) objc_malloc (sizeof (struct sindex)); arr->empty_index->version.version = 0; narrays += 1; *************** sarray_new (int size, void* default_elem *** 234,268 **** #else /* OBJC_SPARSE2 */ arr->capacity = num_indices*BUCKET_SIZE; ! new_buckets = (struct sbucket**) ! objc_malloc(sizeof(struct sbucket*)*num_indices); narrays += 1; idxsize += num_indices; #endif ! arr->empty_bucket = (struct sbucket*) objc_malloc(sizeof(struct sbucket)); arr->empty_bucket->version.version = 0; nbuckets += 1; arr->ref_count = 1; ! arr->is_copy_of = (struct sarray*)0; ! for (counter=0; counterempty_bucket->elems[counter] = default_element; #ifdef OBJC_SPARSE3 ! for (counter=0; counterempty_index->buckets[counter] = arr->empty_bucket; ! for (counter=0; counterempty_index; #else /* OBJC_SPARSE2 */ ! for (counter=0; counterempty_bucket; #endif --- 234,268 ---- #else /* OBJC_SPARSE2 */ arr->capacity = num_indices*BUCKET_SIZE; ! new_buckets = (struct sbucket **) ! objc_malloc (sizeof (struct sbucket *) * num_indices); narrays += 1; idxsize += num_indices; #endif ! arr->empty_bucket = (struct sbucket *) objc_malloc (sizeof (struct sbucket)); arr->empty_bucket->version.version = 0; nbuckets += 1; arr->ref_count = 1; ! arr->is_copy_of = (struct sarray *) 0; ! for (counter = 0; counter < BUCKET_SIZE; counter++) arr->empty_bucket->elems[counter] = default_element; #ifdef OBJC_SPARSE3 ! for (counter = 0; counter < INDEX_SIZE; counter++) arr->empty_index->buckets[counter] = arr->empty_bucket; ! for (counter = 0; counter < num_indices; counter++) new_indices[counter] = arr->empty_index; #else /* OBJC_SPARSE2 */ ! for (counter = 0; counter < num_indices; counter++) new_buckets[counter] = arr->empty_bucket; #endif *************** sarray_new (int size, void* default_elem *** 282,329 **** any concurrent readers notice the update. */ void ! sarray_realloc(struct sarray* array, int newsize) { #ifdef OBJC_SPARSE3 ! size_t old_max_index = (array->capacity-1)/INDEX_CAPACITY; ! size_t new_max_index = ((newsize-1)/INDEX_CAPACITY); ! size_t rounded_size = (new_max_index+1)*INDEX_CAPACITY; ! struct sindex ** new_indices; ! struct sindex ** old_indices; #else /* OBJC_SPARSE2 */ ! size_t old_max_index = (array->capacity-1)/BUCKET_SIZE; ! size_t new_max_index = ((newsize-1)/BUCKET_SIZE); ! size_t rounded_size = (new_max_index+1)*BUCKET_SIZE; ! struct sbucket ** new_buckets; ! struct sbucket ** old_buckets; #endif ! int counter; ! assert(newsize > 0); /* The size is the same, just ignore the request */ ! if(rounded_size <= array->capacity) return; ! assert(array->ref_count == 1); /* stop if lazy copied... */ /* We are asked to extend the array -- allocate new bucket table, */ /* and insert empty_bucket in newly allocated places. */ ! if(rounded_size > array->capacity) { #ifdef OBJC_SPARSE3 new_max_index += 4; ! rounded_size = (new_max_index+1)*INDEX_CAPACITY; #else /* OBJC_SPARSE2 */ new_max_index += 4; ! rounded_size = (new_max_index+1)*BUCKET_SIZE; #endif /* update capacity */ --- 282,329 ---- any concurrent readers notice the update. */ void ! sarray_realloc (struct sarray *array, int newsize) { #ifdef OBJC_SPARSE3 ! size_t old_max_index = (array->capacity - 1)/INDEX_CAPACITY; ! size_t new_max_index = ((newsize - 1)/INDEX_CAPACITY); ! size_t rounded_size = (new_max_index + 1) * INDEX_CAPACITY; ! struct sindex **new_indices; ! struct sindex **old_indices; #else /* OBJC_SPARSE2 */ ! size_t old_max_index = (array->capacity - 1)/BUCKET_SIZE; ! size_t new_max_index = ((newsize - 1)/BUCKET_SIZE); ! size_t rounded_size = (new_max_index + 1) * BUCKET_SIZE; ! struct sbucket **new_buckets; ! struct sbucket **old_buckets; #endif ! size_t counter; ! assert (newsize > 0); /* The size is the same, just ignore the request */ ! if (rounded_size <= array->capacity) return; ! assert (array->ref_count == 1); /* stop if lazy copied... */ /* We are asked to extend the array -- allocate new bucket table, */ /* and insert empty_bucket in newly allocated places. */ ! if (rounded_size > array->capacity) { #ifdef OBJC_SPARSE3 new_max_index += 4; ! rounded_size = (new_max_index + 1) * INDEX_CAPACITY; #else /* OBJC_SPARSE2 */ new_max_index += 4; ! rounded_size = (new_max_index + 1) * BUCKET_SIZE; #endif /* update capacity */ *************** sarray_realloc(struct sarray* array, int *** 332,347 **** #ifdef OBJC_SPARSE3 /* alloc to force re-read by any concurrent readers. */ old_indices = array->indices; ! new_indices = (struct sindex**) ! objc_malloc((new_max_index+1)*sizeof(struct sindex*)); #else /* OBJC_SPARSE2 */ old_buckets = array->buckets; ! new_buckets = (struct sbucket**) ! objc_malloc((new_max_index+1)*sizeof(struct sbucket*)); #endif /* copy buckets below old_max_index (they are still valid) */ ! for(counter = 0; counter <= old_max_index; counter++ ) { #ifdef OBJC_SPARSE3 new_indices[counter] = old_indices[counter]; #else /* OBJC_SPARSE2 */ --- 332,347 ---- #ifdef OBJC_SPARSE3 /* alloc to force re-read by any concurrent readers. */ old_indices = array->indices; ! new_indices = (struct sindex **) ! objc_malloc ((new_max_index + 1) * sizeof (struct sindex *)); #else /* OBJC_SPARSE2 */ old_buckets = array->buckets; ! new_buckets = (struct sbucket **) ! objc_malloc ((new_max_index + 1) * sizeof (struct sbucket *)); #endif /* copy buckets below old_max_index (they are still valid) */ ! for (counter = 0; counter <= old_max_index; counter++ ) { #ifdef OBJC_SPARSE3 new_indices[counter] = old_indices[counter]; #else /* OBJC_SPARSE2 */ *************** sarray_realloc(struct sarray* array, int *** 351,361 **** #ifdef OBJC_SPARSE3 /* reset entries above old_max_index to empty_bucket */ ! for(counter = old_max_index+1; counter <= new_max_index; counter++) new_indices[counter] = array->empty_index; #else /* OBJC_SPARSE2 */ /* reset entries above old_max_index to empty_bucket */ ! for(counter = old_max_index+1; counter <= new_max_index; counter++) new_buckets[counter] = array->empty_bucket; #endif --- 351,361 ---- #ifdef OBJC_SPARSE3 /* reset entries above old_max_index to empty_bucket */ ! for (counter = old_max_index + 1; counter <= new_max_index; counter++) new_indices[counter] = array->empty_index; #else /* OBJC_SPARSE2 */ /* reset entries above old_max_index to empty_bucket */ ! for (counter = old_max_index + 1; counter <= new_max_index; counter++) new_buckets[counter] = array->empty_bucket; #endif *************** sarray_realloc(struct sarray* array, int *** 368,376 **** #ifdef OBJC_SPARSE3 /* free the old indices */ ! sarray_free_garbage(old_indices); #else /* OBJC_SPARSE2 */ ! sarray_free_garbage(old_buckets); #endif idxsize += (new_max_index-old_max_index); --- 368,376 ---- #ifdef OBJC_SPARSE3 /* free the old indices */ ! sarray_free_garbage (old_indices); #else /* OBJC_SPARSE2 */ ! sarray_free_garbage (old_buckets); #endif idxsize += (new_max_index-old_max_index); *************** sarray_realloc(struct sarray* array, int *** 382,401 **** /* Free a sparse array allocated with sarray_new */ void ! sarray_free(struct sarray* array) { ! #ifdef OBJC_SPARSE3 ! size_t old_max_index = (array->capacity-1)/INDEX_CAPACITY; ! struct sindex ** old_indices; #else ! size_t old_max_index = (array->capacity-1)/BUCKET_SIZE; ! struct sbucket ** old_buckets; #endif ! int counter = 0; ! assert(array->ref_count != 0); /* Freed multiple times!!! */ ! if(--(array->ref_count) != 0) /* There exists copies of me */ return; #ifdef OBJC_SPARSE3 --- 382,400 ---- /* Free a sparse array allocated with sarray_new */ void ! sarray_free (struct sarray *array) { #ifdef OBJC_SPARSE3 ! size_t old_max_index = (array->capacity - 1)/INDEX_CAPACITY; ! struct sindex **old_indices; #else ! size_t old_max_index = (array->capacity - 1)/BUCKET_SIZE; ! struct sbucket **old_buckets; #endif ! size_t counter = 0; ! assert (array->ref_count != 0); /* Freed multiple times!!! */ ! if (--(array->ref_count) != 0) /* There exists copies of me */ return; #ifdef OBJC_SPARSE3 *************** sarray_free(struct sarray* array) { *** 404,437 **** old_buckets = array->buckets; #endif ! if((array->is_copy_of) && ((array->is_copy_of->ref_count - 1) == 0)) ! sarray_free(array->is_copy_of); /* Free all entries that do not point to empty_bucket */ ! for(counter = 0; counter <= old_max_index; counter++ ) { #ifdef OBJC_SPARSE3 ! struct sindex* idx = old_indices[counter]; ! if((idx != array->empty_index) && (idx->version.version == array->version.version)) { int c2; ! for(c2=0; c2buckets[c2]; ! if((bkt != array->empty_bucket) && (bkt->version.version == array->version.version)) { ! sarray_free_garbage(bkt); nbuckets -= 1; } } ! sarray_free_garbage(idx); nindices -= 1; } #else /* OBJC_SPARSE2 */ ! struct sbucket* bkt = array->buckets[counter]; if ((bkt != array->empty_bucket) && (bkt->version.version == array->version.version)) { ! sarray_free_garbage(bkt); nbuckets -= 1; } #endif --- 403,436 ---- old_buckets = array->buckets; #endif ! if ((array->is_copy_of) && ((array->is_copy_of->ref_count - 1) == 0)) ! sarray_free (array->is_copy_of); /* Free all entries that do not point to empty_bucket */ ! for (counter = 0; counter <= old_max_index; counter++ ) { #ifdef OBJC_SPARSE3 ! struct sindex *idx = old_indices[counter]; ! if ((idx != array->empty_index) && (idx->version.version == array->version.version)) { int c2; ! for (c2 = 0; c2 < INDEX_SIZE; c2++) { ! struct sbucket *bkt = idx->buckets[c2]; ! if ((bkt != array->empty_bucket) && (bkt->version.version == array->version.version)) { ! sarray_free_garbage (bkt); nbuckets -= 1; } } ! sarray_free_garbage (idx); nindices -= 1; } #else /* OBJC_SPARSE2 */ ! struct sbucket *bkt = array->buckets[counter]; if ((bkt != array->empty_bucket) && (bkt->version.version == array->version.version)) { ! sarray_free_garbage (bkt); nbuckets -= 1; } #endif *************** sarray_free(struct sarray* array) { *** 439,490 **** #ifdef OBJC_SPARSE3 /* free empty_index */ ! if(array->empty_index->version.version == array->version.version) { ! sarray_free_garbage(array->empty_index); nindices -= 1; } #endif /* free empty_bucket */ ! if(array->empty_bucket->version.version == array->version.version) { ! sarray_free_garbage(array->empty_bucket); nbuckets -= 1; } ! idxsize -= (old_max_index+1); narrays -= 1; #ifdef OBJC_SPARSE3 /* free bucket table */ ! sarray_free_garbage(array->indices); #else /* free bucket table */ ! sarray_free_garbage(array->buckets); #endif /* free array */ ! sarray_free_garbage(array); } /* This is a lazy copy. Only the core of the structure is actually */ /* copied. */ ! struct sarray* ! sarray_lazy_copy(struct sarray* oarr) { ! struct sarray* arr; #ifdef OBJC_SPARSE3 ! size_t num_indices = ((oarr->capacity-1)/INDEX_CAPACITY)+1; ! struct sindex ** new_indices; #else /* OBJC_SPARSE2 */ ! size_t num_indices = ((oarr->capacity-1)/BUCKET_SIZE)+1; ! struct sbucket ** new_buckets; #endif /* Allocate core array */ ! arr = (struct sarray*) objc_malloc(sizeof(struct sarray)); /* !!! */ arr->version.version = oarr->version.version + 1; #ifdef OBJC_SPARSE3 arr->empty_index = oarr->empty_index; --- 438,489 ---- #ifdef OBJC_SPARSE3 /* free empty_index */ ! if (array->empty_index->version.version == array->version.version) { ! sarray_free_garbage (array->empty_index); nindices -= 1; } #endif /* free empty_bucket */ ! if (array->empty_bucket->version.version == array->version.version) { ! sarray_free_garbage (array->empty_bucket); nbuckets -= 1; } ! idxsize -= (old_max_index + 1); narrays -= 1; #ifdef OBJC_SPARSE3 /* free bucket table */ ! sarray_free_garbage (array->indices); #else /* free bucket table */ ! sarray_free_garbage (array->buckets); #endif /* free array */ ! sarray_free_garbage (array); } /* This is a lazy copy. Only the core of the structure is actually */ /* copied. */ ! struct sarray * ! sarray_lazy_copy (struct sarray *oarr) { ! struct sarray *arr; #ifdef OBJC_SPARSE3 ! size_t num_indices = ((oarr->capacity - 1)/INDEX_CAPACITY) + 1; ! struct sindex **new_indices; #else /* OBJC_SPARSE2 */ ! size_t num_indices = ((oarr->capacity - 1)/BUCKET_SIZE) + 1; ! struct sbucket **new_buckets; #endif /* Allocate core array */ ! arr = (struct sarray *) objc_malloc (sizeof (struct sarray)); /* !!! */ arr->version.version = oarr->version.version + 1; #ifdef OBJC_SPARSE3 arr->empty_index = oarr->empty_index; *************** sarray_lazy_copy(struct sarray* oarr) *** 497,513 **** #ifdef OBJC_SPARSE3 /* Copy bucket table */ ! new_indices = (struct sindex**) ! objc_malloc(sizeof(struct sindex*)*num_indices); ! memcpy( new_indices,oarr->indices, ! sizeof(struct sindex*)*num_indices); arr->indices = new_indices; #else /* Copy bucket table */ ! new_buckets = (struct sbucket**) ! objc_malloc(sizeof(struct sbucket*)*num_indices); ! memcpy( new_buckets,oarr->buckets, ! sizeof(struct sbucket*)*num_indices); arr->buckets = new_buckets; #endif --- 496,510 ---- #ifdef OBJC_SPARSE3 /* Copy bucket table */ ! new_indices = (struct sindex **) ! objc_malloc (sizeof (struct sindex *) * num_indices); ! memcpy (new_indices, oarr->indices, sizeof (struct sindex *) * num_indices); arr->indices = new_indices; #else /* Copy bucket table */ ! new_buckets = (struct sbucket **) ! objc_malloc (sizeof (struct sbucket *) * num_indices); ! memcpy (new_buckets, oarr->buckets, sizeof (struct sbucket *) * num_indices); arr->buckets = new_buckets; #endif diff -Nrc3pad gcc-3.2.3/libobjc/selector.c gcc-3.3/libobjc/selector.c *** gcc-3.2.3/libobjc/selector.c 1998-09-30 02:13:13.000000000 +0000 --- gcc-3.3/libobjc/selector.c 2002-07-02 19:42:44.000000000 +0000 *************** *** 1,5 **** /* GNU Objective C Runtime selector related functions ! Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GNU CC. --- 1,5 ---- /* GNU Objective C Runtime selector related functions ! Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GNU CC. *************** Foundation, 59 Temple Place - Suite 330, *** 31,46 **** #define SELECTOR_HASH_SIZE 128 /* Tables mapping selector names to uid and opposite */ ! static struct sarray* __objc_selector_array = 0; /* uid -> sel !T:MUTEX */ ! static struct sarray* __objc_selector_names = 0; /* uid -> name !T:MUTEX */ static cache_ptr __objc_selector_hash = 0; /* name -> uid !T:MUTEX */ ! static void register_selectors_from_list(MethodList_t); /* Number of selectors stored in each of the above tables */ ! int __objc_selector_max_index = 0; /* !T:MUTEX */ ! void __objc_init_selector_tables() { __objc_selector_array = sarray_new (SELECTOR_HASH_SIZE, 0); __objc_selector_names = sarray_new (SELECTOR_HASH_SIZE, 0); --- 31,46 ---- #define SELECTOR_HASH_SIZE 128 /* Tables mapping selector names to uid and opposite */ ! static struct sarray *__objc_selector_array = 0; /* uid -> sel !T:MUTEX */ ! static struct sarray *__objc_selector_names = 0; /* uid -> name !T:MUTEX */ static cache_ptr __objc_selector_hash = 0; /* name -> uid !T:MUTEX */ ! static void register_selectors_from_list (MethodList_t); /* Number of selectors stored in each of the above tables */ ! unsigned int __objc_selector_max_index = 0; /* !T:MUTEX */ ! void __objc_init_selector_tables () { __objc_selector_array = sarray_new (SELECTOR_HASH_SIZE, 0); __objc_selector_names = sarray_new (SELECTOR_HASH_SIZE, 0); *************** register_selectors_from_list (MethodList *** 81,95 **** { Method_t method = &method_list->method_list[i]; method->method_name ! = sel_register_typed_name ((const char*)method->method_name, ! method->method_types); i += 1; } } /* Register instance methods as class methods for root classes */ ! void __objc_register_instance_methods_to_class(Class class) { MethodList_t method_list; MethodList_t class_method_list; --- 81,95 ---- { Method_t method = &method_list->method_list[i]; method->method_name ! = sel_register_typed_name ((const char *) method->method_name, ! method->method_types); i += 1; } } /* Register instance methods as class methods for root classes */ ! void __objc_register_instance_methods_to_class (Class class) { MethodList_t method_list; MethodList_t class_method_list; *************** void __objc_register_instance_methods_to *** 98,109 **** Method_t curr_method; /* Only if a root class. */ ! if(class->super_class) return; /* Allocate a method list to hold the new class methods */ ! new_list = objc_calloc(sizeof(struct objc_method_list) ! + sizeof(struct objc_method[max_methods_no]), 1); method_list = class->methods; class_method_list = class->class_pointer->methods; curr_method = &new_list->method_list[0]; --- 98,109 ---- Method_t curr_method; /* Only if a root class. */ ! if (class->super_class) return; /* Allocate a method list to hold the new class methods */ ! new_list = objc_calloc (sizeof (struct objc_method_list) ! + sizeof (struct objc_method[max_methods_no]), 1); method_list = class->methods; class_method_list = class->class_pointer->methods; curr_method = &new_list->method_list[0]; *************** void __objc_register_instance_methods_to *** 118,124 **** { Method_t mth = &method_list->method_list[i]; if (mth->method_name ! && !search_for_method_in_list (class_method_list, mth->method_name)) { /* This instance method isn't a class method. --- 118,124 ---- { Method_t mth = &method_list->method_list[i]; if (mth->method_name ! && ! search_for_method_in_list (class_method_list, mth->method_name)) { /* This instance method isn't a class method. *************** void __objc_register_instance_methods_to *** 126,135 **** *curr_method = *mth; /* Reallocate the method list if necessary */ ! if(++new_list->method_count == max_methods_no) new_list = ! objc_realloc(new_list, sizeof(struct objc_method_list) ! + sizeof(struct objc_method[max_methods_no += 16])); curr_method = &new_list->method_list[new_list->method_count]; } --- 126,135 ---- *curr_method = *mth; /* Reallocate the method list if necessary */ ! if (++new_list->method_count == max_methods_no) new_list = ! objc_realloc (new_list, sizeof (struct objc_method_list) ! + sizeof (struct objc_method[max_methods_no += 16])); curr_method = &new_list->method_list[new_list->method_count]; } *************** void __objc_register_instance_methods_to *** 143,150 **** if (new_list->method_count) { new_list = ! objc_realloc(new_list, sizeof(struct objc_method_list) ! + sizeof(struct objc_method[new_list->method_count])); new_list->method_next = class->class_pointer->methods; class->class_pointer->methods = new_list; } --- 143,150 ---- if (new_list->method_count) { new_list = ! objc_realloc (new_list, sizeof (struct objc_method_list) ! + sizeof (struct objc_method[new_list->method_count])); new_list->method_next = class->class_pointer->methods; class->class_pointer->methods = new_list; } *************** void __objc_register_instance_methods_to *** 156,176 **** /* Returns YES iff t1 and t2 have same method types, but we ignore the argframe layout */ BOOL ! sel_types_match (const char* t1, const char* t2) { ! if (!t1 || !t2) return NO; while (*t1 && *t2) { if (*t1 == '+') t1++; if (*t2 == '+') t2++; ! while (isdigit(*t1)) t1++; ! while (isdigit(*t2)) t2++; /* xxx Remove these next two lines when qualifiers are put in all selectors, not just Protocol selectors. */ ! t1 = objc_skip_type_qualifiers(t1); ! t2 = objc_skip_type_qualifiers(t2); ! if (!*t1 && !*t2) return YES; if (*t1 != *t2) return NO; --- 156,176 ---- /* Returns YES iff t1 and t2 have same method types, but we ignore the argframe layout */ BOOL ! sel_types_match (const char *t1, const char *t2) { ! if (! t1 || ! t2) return NO; while (*t1 && *t2) { if (*t1 == '+') t1++; if (*t2 == '+') t2++; ! while (isdigit ((unsigned char) *t1)) t1++; ! while (isdigit ((unsigned char) *t2)) t2++; /* xxx Remove these next two lines when qualifiers are put in all selectors, not just Protocol selectors. */ ! t1 = objc_skip_type_qualifiers (t1); ! t2 = objc_skip_type_qualifiers (t2); ! if (! *t1 && ! *t2) return YES; if (*t1 != *t2) return NO; *************** sel_get_typed_uid (const char *name, con *** 187,221 **** struct objc_list *l; sidx i; ! objc_mutex_lock(__objc_runtime_mutex); i = (sidx) hash_value_for_key (__objc_selector_hash, name); if (i == 0) { ! objc_mutex_unlock(__objc_runtime_mutex); return 0; } ! for (l = (struct objc_list*)sarray_get_safe (__objc_selector_array, i); l; l = l->tail) { ! SEL s = (SEL)l->head; if (types == 0 || s->sel_types == 0) { if (s->sel_types == types) { ! objc_mutex_unlock(__objc_runtime_mutex); return s; } } else if (sel_types_match (s->sel_types, types)) { ! objc_mutex_unlock(__objc_runtime_mutex); return s; } } ! objc_mutex_unlock(__objc_runtime_mutex); return 0; } --- 187,221 ---- struct objc_list *l; sidx i; ! objc_mutex_lock (__objc_runtime_mutex); i = (sidx) hash_value_for_key (__objc_selector_hash, name); if (i == 0) { ! objc_mutex_unlock (__objc_runtime_mutex); return 0; } ! for (l = (struct objc_list *) sarray_get_safe (__objc_selector_array, i); l; l = l->tail) { ! SEL s = (SEL) l->head; if (types == 0 || s->sel_types == 0) { if (s->sel_types == types) { ! objc_mutex_unlock (__objc_runtime_mutex); return s; } } else if (sel_types_match (s->sel_types, types)) { ! objc_mutex_unlock (__objc_runtime_mutex); return s; } } ! objc_mutex_unlock (__objc_runtime_mutex); return 0; } *************** sel_get_any_typed_uid (const char *name) *** 227,253 **** sidx i; SEL s = NULL; ! objc_mutex_lock(__objc_runtime_mutex); i = (sidx) hash_value_for_key (__objc_selector_hash, name); if (i == 0) { ! objc_mutex_unlock(__objc_runtime_mutex); return 0; } ! for (l = (struct objc_list*)sarray_get_safe (__objc_selector_array, i); l; l = l->tail) { s = (SEL) l->head; if (s->sel_types) { ! objc_mutex_unlock(__objc_runtime_mutex); return s; } } ! objc_mutex_unlock(__objc_runtime_mutex); return s; } --- 227,253 ---- sidx i; SEL s = NULL; ! objc_mutex_lock (__objc_runtime_mutex); i = (sidx) hash_value_for_key (__objc_selector_hash, name); if (i == 0) { ! objc_mutex_unlock (__objc_runtime_mutex); return 0; } ! for (l = (struct objc_list *) sarray_get_safe (__objc_selector_array, i); l; l = l->tail) { s = (SEL) l->head; if (s->sel_types) { ! objc_mutex_unlock (__objc_runtime_mutex); return s; } } ! objc_mutex_unlock (__objc_runtime_mutex); return s; } *************** sel_get_any_uid (const char *name) *** 258,279 **** struct objc_list *l; sidx i; ! objc_mutex_lock(__objc_runtime_mutex); i = (sidx) hash_value_for_key (__objc_selector_hash, name); if (soffset_decode (i) == 0) { ! objc_mutex_unlock(__objc_runtime_mutex); return 0; } ! l = (struct objc_list*)sarray_get_safe (__objc_selector_array, i); ! objc_mutex_unlock(__objc_runtime_mutex); if (l == 0) return 0; ! return (SEL)l->head; } /* return selector representing name */ --- 258,279 ---- struct objc_list *l; sidx i; ! objc_mutex_lock (__objc_runtime_mutex); i = (sidx) hash_value_for_key (__objc_selector_hash, name); if (soffset_decode (i) == 0) { ! objc_mutex_unlock (__objc_runtime_mutex); return 0; } ! l = (struct objc_list *) sarray_get_safe (__objc_selector_array, i); ! objc_mutex_unlock (__objc_runtime_mutex); if (l == 0) return 0; ! return (SEL) l->head; } /* return selector representing name */ *************** sel_get_uid (const char *name) *** 285,302 **** /* Get name of selector. If selector is unknown, the empty string "" is returned */ ! const char* ! sel_get_name (SEL selector) { const char *ret; ! objc_mutex_lock(__objc_runtime_mutex); ! if ((soffset_decode((sidx)selector->sel_id) > 0) ! && (soffset_decode((sidx)selector->sel_id) <= __objc_selector_max_index)) ret = sarray_get_safe (__objc_selector_names, (sidx) selector->sel_id); else ret = 0; ! objc_mutex_unlock(__objc_runtime_mutex); return ret; } --- 285,301 ---- /* Get name of selector. If selector is unknown, the empty string "" is returned */ ! const char *sel_get_name (SEL selector) { const char *ret; ! objc_mutex_lock (__objc_runtime_mutex); ! if ((soffset_decode ((sidx)selector->sel_id) > 0) ! && (soffset_decode ((sidx)selector->sel_id) <= __objc_selector_max_index)) ret = sarray_get_safe (__objc_selector_names, (sidx) selector->sel_id); else ret = 0; ! objc_mutex_unlock (__objc_runtime_mutex); return ret; } *************** sel_is_mapped (SEL selector) *** 308,315 **** } ! const char* ! sel_get_type (SEL selector) { if (selector) return selector->sel_types; --- 307,313 ---- } ! const char *sel_get_type (SEL selector) { if (selector) return selector->sel_types; *************** sel_get_type (SEL selector) *** 318,324 **** } /* The uninstalled dispatch table */ ! extern struct sarray* __objc_uninstalled_dtable; /* Store the passed selector name in the selector record and return its selector value (value returned by sel_get_uid). --- 316,322 ---- } /* The uninstalled dispatch table */ ! extern struct sarray *__objc_uninstalled_dtable; /* Store the passed selector name in the selector record and return its selector value (value returned by sel_get_uid). *************** SEL *** 331,365 **** __sel_register_typed_name (const char *name, const char *types, struct objc_selector *orig, BOOL is_const) { ! struct objc_selector* j; sidx i; struct objc_list *l; i = (sidx) hash_value_for_key (__objc_selector_hash, name); if (soffset_decode (i) != 0) { ! for (l = (struct objc_list*)sarray_get_safe (__objc_selector_array, i); l; l = l->tail) { ! SEL s = (SEL)l->head; if (types == 0 || s->sel_types == 0) { if (s->sel_types == types) { if (orig) { ! orig->sel_id = (void*)i; return orig; } else return s; } } ! else if (!strcmp (s->sel_types, types)) { if (orig) { ! orig->sel_id = (void*)i; return orig; } else --- 329,363 ---- __sel_register_typed_name (const char *name, const char *types, struct objc_selector *orig, BOOL is_const) { ! struct objc_selector *j; sidx i; struct objc_list *l; i = (sidx) hash_value_for_key (__objc_selector_hash, name); if (soffset_decode (i) != 0) { ! for (l = (struct objc_list *) sarray_get_safe (__objc_selector_array, i); l; l = l->tail) { ! SEL s = (SEL) l->head; if (types == 0 || s->sel_types == 0) { if (s->sel_types == types) { if (orig) { ! orig->sel_id = (void *) i; return orig; } else return s; } } ! else if (! strcmp (s->sel_types, types)) { if (orig) { ! orig->sel_id = (void *) i; return orig; } else *************** __sel_register_typed_name (const char *n *** 371,402 **** else j = objc_malloc (sizeof (struct objc_selector)); ! j->sel_id = (void*)i; /* Can we use the pointer or must copy types? Don't copy if NULL */ if ((is_const) || (types == 0)) ! j->sel_types = (const char*)types; else { ! j->sel_types = (char *) objc_malloc(strlen(types)+1); ! strcpy((char *)j->sel_types, types); } ! l = (struct objc_list*)sarray_get_safe (__objc_selector_array, i); } else { __objc_selector_max_index += 1; ! i = soffset_encode(__objc_selector_max_index); if (orig) j = orig; else j = objc_malloc (sizeof (struct objc_selector)); ! j->sel_id = (void*)i; /* Can we use the pointer or must copy types? Don't copy if NULL */ if ((is_const) || (types == 0)) ! j->sel_types = (const char*)types; else { ! j->sel_types = (char *) objc_malloc(strlen(types)+1); ! strcpy((char *)j->sel_types, types); } l = 0; } --- 369,400 ---- else j = objc_malloc (sizeof (struct objc_selector)); ! j->sel_id = (void *) i; /* Can we use the pointer or must copy types? Don't copy if NULL */ if ((is_const) || (types == 0)) ! j->sel_types = (const char *) types; else { ! j->sel_types = (char *) objc_malloc (strlen (types) + 1); ! strcpy ((char *) j->sel_types, types); } ! l = (struct objc_list *) sarray_get_safe (__objc_selector_array, i); } else { __objc_selector_max_index += 1; ! i = soffset_encode (__objc_selector_max_index); if (orig) j = orig; else j = objc_malloc (sizeof (struct objc_selector)); ! j->sel_id = (void *) i; /* Can we use the pointer or must copy types? Don't copy if NULL */ if ((is_const) || (types == 0)) ! j->sel_types = (const char *) types; else { ! j->sel_types = (char *) objc_malloc (strlen (types) + 1); ! strcpy ((char *) j->sel_types, types); } l = 0; } *************** __sel_register_typed_name (const char *n *** 412,429 **** if ((is_const) || (name == 0)) new_name = name; else { ! new_name = (char *) objc_malloc(strlen(name)+1); ! strcpy((char *)new_name, name); } ! l = list_cons ((void*)j, l); sarray_at_put_safe (__objc_selector_names, i, (void *) new_name); sarray_at_put_safe (__objc_selector_array, i, (void *) l); if (is_new) hash_add (&__objc_selector_hash, (void *) new_name, (void *) i); } ! sarray_realloc(__objc_uninstalled_dtable, __objc_selector_max_index+1); return (SEL) j; } --- 410,427 ---- if ((is_const) || (name == 0)) new_name = name; else { ! new_name = (char *) objc_malloc (strlen (name) + 1); ! strcpy ((char *) new_name, name); } ! l = list_cons ((void *) j, l); sarray_at_put_safe (__objc_selector_names, i, (void *) new_name); sarray_at_put_safe (__objc_selector_array, i, (void *) l); if (is_new) hash_add (&__objc_selector_hash, (void *) new_name, (void *) i); } ! sarray_realloc (__objc_uninstalled_dtable, __objc_selector_max_index + 1); return (SEL) j; } *************** sel_register_name (const char *name) *** 433,443 **** { SEL ret; ! objc_mutex_lock(__objc_runtime_mutex); /* Assume that name is not constant static memory and needs to be copied before put into a runtime structure. is_const == NO */ ret = __sel_register_typed_name (name, 0, 0, NO); ! objc_mutex_unlock(__objc_runtime_mutex); return ret; } --- 431,441 ---- { SEL ret; ! objc_mutex_lock (__objc_runtime_mutex); /* Assume that name is not constant static memory and needs to be copied before put into a runtime structure. is_const == NO */ ret = __sel_register_typed_name (name, 0, 0, NO); ! objc_mutex_unlock (__objc_runtime_mutex); return ret; } *************** sel_register_typed_name (const char *nam *** 447,458 **** { SEL ret; ! objc_mutex_lock(__objc_runtime_mutex); /* Assume that name and type are not constant static memory and need to be copied before put into a runtime structure. is_const == NO */ ret = __sel_register_typed_name (name, type, 0, NO); ! objc_mutex_unlock(__objc_runtime_mutex); return ret; } - --- 445,455 ---- { SEL ret; ! objc_mutex_lock (__objc_runtime_mutex); /* Assume that name and type are not constant static memory and need to be copied before put into a runtime structure. is_const == NO */ ret = __sel_register_typed_name (name, type, 0, NO); ! objc_mutex_unlock (__objc_runtime_mutex); return ret; } diff -Nrc3pad gcc-3.2.3/libobjc/sendmsg.c gcc-3.3/libobjc/sendmsg.c *** gcc-3.2.3/libobjc/sendmsg.c 2001-02-24 06:14:36.000000000 +0000 --- gcc-3.3/libobjc/sendmsg.c 2002-09-12 17:29:58.000000000 +0000 *************** *** 1,6 **** /* GNU Objective C Runtime message lookup Copyright (C) 1993, 1995, 1996, 1997, 1998, ! 2001 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GNU CC. --- 1,6 ---- /* GNU Objective C Runtime message lookup Copyright (C) 1993, 1995, 1996, 1997, 1998, ! 2001, 2002 Free Software Foundation, Inc. Contributed by Kresten Krab Thorup This file is part of GNU CC. *************** Boston, MA 02111-1307, USA. */ *** 37,63 **** #define gen_rtx_REG(args...) 1 #define rtx int ! #if !defined(STRUCT_VALUE) || STRUCT_VALUE == 0 #define INVISIBLE_STRUCT_RETURN 1 #else #define INVISIBLE_STRUCT_RETURN 0 #endif /* The uninstalled dispatch table */ ! struct sarray* __objc_uninstalled_dtable = 0; /* !T:MUTEX */ /* Hook for method forwarding. If it is set, is invoked to return a function that performs the real forwarding. Otherwise the libgcc based functions (__builtin_apply and friends) are used. */ ! IMP (*__objc_msg_forward)(SEL) = NULL; /* Send +initialize to class */ ! static void __objc_send_initialize(Class); static void __objc_install_dispatch_table_for_class (Class); /* Forward declare some functions */ ! static void __objc_init_install_dtable(id, SEL); /* Various forwarding functions that are used based upon the return type for the selector. --- 37,63 ---- #define gen_rtx_REG(args...) 1 #define rtx int ! #if ! defined (STRUCT_VALUE) || STRUCT_VALUE == 0 #define INVISIBLE_STRUCT_RETURN 1 #else #define INVISIBLE_STRUCT_RETURN 0 #endif /* The uninstalled dispatch table */ ! struct sarray *__objc_uninstalled_dtable = 0; /* !T:MUTEX */ /* Hook for method forwarding. If it is set, is invoked to return a function that performs the real forwarding. Otherwise the libgcc based functions (__builtin_apply and friends) are used. */ ! IMP (*__objc_msg_forward) (SEL) = NULL; /* Send +initialize to class */ ! static void __objc_send_initialize (Class); static void __objc_install_dispatch_table_for_class (Class); /* Forward declare some functions */ ! static void __objc_init_install_dtable (id, SEL); /* Various forwarding functions that are used based upon the return type for the selector. *************** static void __objc_init_install_dtable(i *** 65,101 **** __objc_double_forward for floats/doubles. __objc_word_forward for pointers or types that fit in registers. */ ! static double __objc_double_forward(id, SEL, ...); ! static id __objc_word_forward(id, SEL, ...); typedef struct { id many[8]; } __big; #if INVISIBLE_STRUCT_RETURN static __big #else static id #endif ! __objc_block_forward(id, SEL, ...); static Method_t search_for_method_in_hierarchy (Class class, SEL sel); ! Method_t search_for_method_in_list(MethodList_t list, SEL op); ! id nil_method(id, SEL, ...); /* Given a selector, return the proper forwarding implementation. */ __inline__ IMP __objc_get_forward_imp (SEL sel) { if (__objc_msg_forward) { IMP result; ! if ((result = __objc_msg_forward (sel))) return result; } ! else { const char *t = sel->sel_types; if (t && (*t == '[' || *t == '(' || *t == '{') #ifdef OBJC_MAX_STRUCT_BY_VALUE ! && objc_sizeof_type(t) > OBJC_MAX_STRUCT_BY_VALUE #endif ) return (IMP)__objc_block_forward; --- 65,105 ---- __objc_double_forward for floats/doubles. __objc_word_forward for pointers or types that fit in registers. */ ! static double __objc_double_forward (id, SEL, ...); ! static id __objc_word_forward (id, SEL, ...); typedef struct { id many[8]; } __big; #if INVISIBLE_STRUCT_RETURN static __big #else static id #endif ! __objc_block_forward (id, SEL, ...); static Method_t search_for_method_in_hierarchy (Class class, SEL sel); ! Method_t search_for_method_in_list (MethodList_t list, SEL op); ! id nil_method (id, SEL); /* Given a selector, return the proper forwarding implementation. */ __inline__ IMP __objc_get_forward_imp (SEL sel) { + /* If a custom forwarding hook was registered, try getting a forwarding + * function from it. */ if (__objc_msg_forward) { IMP result; ! if ((result = __objc_msg_forward (sel)) != NULL) return result; } ! ! /* In all other cases, use the default forwarding functions built using ! * __builtin_apply and friends. */ { const char *t = sel->sel_types; if (t && (*t == '[' || *t == '(' || *t == '{') #ifdef OBJC_MAX_STRUCT_BY_VALUE ! && objc_sizeof_type (t) > OBJC_MAX_STRUCT_BY_VALUE #endif ) return (IMP)__objc_block_forward; *************** __inline__ *** 111,136 **** IMP get_imp (Class class, SEL sel) { ! void* res = sarray_get_safe (class->dtable, (size_t) sel->sel_id); if (res == 0) { /* Not a valid method */ ! if(class->dtable == __objc_uninstalled_dtable) { /* The dispatch table needs to be installed. */ ! objc_mutex_lock(__objc_runtime_mutex); __objc_install_dispatch_table_for_class (class); ! objc_mutex_unlock(__objc_runtime_mutex); /* Call ourselves with the installed dispatch table and get the real method */ ! res = get_imp(class, sel); } else { /* The dispatch table has been installed so the method just doesn't exist for the class. Return the forwarding implementation. */ ! res = __objc_get_forward_imp(sel); } } return res; --- 115,140 ---- IMP get_imp (Class class, SEL sel) { ! void *res = sarray_get_safe (class->dtable, (size_t) sel->sel_id); if (res == 0) { /* Not a valid method */ ! if (class->dtable == __objc_uninstalled_dtable) { /* The dispatch table needs to be installed. */ ! objc_mutex_lock (__objc_runtime_mutex); __objc_install_dispatch_table_for_class (class); ! objc_mutex_unlock (__objc_runtime_mutex); /* Call ourselves with the installed dispatch table and get the real method */ ! res = get_imp (class, sel); } else { /* The dispatch table has been installed so the method just doesn't exist for the class. Return the forwarding implementation. */ ! res = __objc_get_forward_imp (sel); } } return res; *************** __inline__ *** 143,156 **** BOOL __objc_responds_to (id object, SEL sel) { ! void* res; /* Install dispatch table if need be */ if (object->class_pointer->dtable == __objc_uninstalled_dtable) { ! objc_mutex_lock(__objc_runtime_mutex); __objc_install_dispatch_table_for_class (object->class_pointer); ! objc_mutex_unlock(__objc_runtime_mutex); } /* Get the method from the dispatch table */ --- 147,160 ---- BOOL __objc_responds_to (id object, SEL sel) { ! void *res; /* Install dispatch table if need be */ if (object->class_pointer->dtable == __objc_uninstalled_dtable) { ! objc_mutex_lock (__objc_runtime_mutex); __objc_install_dispatch_table_for_class (object->class_pointer); ! objc_mutex_unlock (__objc_runtime_mutex); } /* Get the method from the dispatch table */ *************** __objc_responds_to (id object, SEL sel) *** 163,199 **** needs to be installed or it doesn't exist and forwarding is attempted. */ __inline__ IMP ! objc_msg_lookup(id receiver, SEL op) { IMP result; ! if(receiver) { result = sarray_get_safe (receiver->class_pointer->dtable, (sidx)op->sel_id); if (result == 0) { /* Not a valid method */ ! if(receiver->class_pointer->dtable == __objc_uninstalled_dtable) { /* The dispatch table needs to be installed. This happens on the very first method call to the class. */ ! __objc_init_install_dtable(receiver, op); /* Get real method for this in newly installed dtable */ ! result = get_imp(receiver->class_pointer, op); } else { /* The dispatch table has been installed so the method just doesn't exist for the class. Attempt to forward the method. */ ! result = __objc_get_forward_imp(op); } } return result; } else ! return nil_method; } IMP --- 167,203 ---- needs to be installed or it doesn't exist and forwarding is attempted. */ __inline__ IMP ! objc_msg_lookup (id receiver, SEL op) { IMP result; ! if (receiver) { result = sarray_get_safe (receiver->class_pointer->dtable, (sidx)op->sel_id); if (result == 0) { /* Not a valid method */ ! if (receiver->class_pointer->dtable == __objc_uninstalled_dtable) { /* The dispatch table needs to be installed. This happens on the very first method call to the class. */ ! __objc_init_install_dtable (receiver, op); /* Get real method for this in newly installed dtable */ ! result = get_imp (receiver->class_pointer, op); } else { /* The dispatch table has been installed so the method just doesn't exist for the class. Attempt to forward the method. */ ! result = __objc_get_forward_imp (op); } } return result; } else ! return (IMP)nil_method; } IMP *************** objc_msg_lookup_super (Super_t super, SE *** 202,297 **** if (super->self) return get_imp (super->class, sel); else ! return nil_method; } ! int method_get_sizeof_arguments (Method*); retval_t ! objc_msg_sendv(id object, SEL op, arglist_t arg_frame) { ! Method* m = class_get_instance_method(object->class_pointer, op); const char *type; ! *((id*)method_get_first_argument (m, arg_frame, &type)) = object; ! *((SEL*)method_get_next_argument (arg_frame, &type)) = op; ! return __builtin_apply((apply_t)m->method_imp, ! arg_frame, ! method_get_sizeof_arguments (m)); } void ! __objc_init_dispatch_tables() { ! __objc_uninstalled_dtable ! = sarray_new(200, 0); } /* This function is called by objc_msg_lookup when the dispatch table needs to be installed; thus it is called once for each class, namely when the very first message is sent to it. */ static void ! __objc_init_install_dtable(id receiver, SEL op) { /* This may happen, if the programmer has taken the address of a method before the dtable was initialized... too bad for him! */ ! if(receiver->class_pointer->dtable != __objc_uninstalled_dtable) return; ! objc_mutex_lock(__objc_runtime_mutex); ! if(CLS_ISCLASS(receiver->class_pointer)) { /* receiver is an ordinary object */ ! assert(CLS_ISCLASS(receiver->class_pointer)); /* install instance methods table */ __objc_install_dispatch_table_for_class (receiver->class_pointer); /* call +initialize -- this will in turn install the factory dispatch table if not already done :-) */ ! __objc_send_initialize(receiver->class_pointer); } else { /* receiver is a class object */ ! assert(CLS_ISCLASS((Class)receiver)); ! assert(CLS_ISMETA(receiver->class_pointer)); /* Install real dtable for factory methods */ __objc_install_dispatch_table_for_class (receiver->class_pointer); ! __objc_send_initialize((Class)receiver); } ! objc_mutex_unlock(__objc_runtime_mutex); } /* Install dummy table for class which causes the first message to that class (or instances hereof) to be initialized properly */ void ! __objc_install_premature_dtable(Class class) { ! assert(__objc_uninstalled_dtable); class->dtable = __objc_uninstalled_dtable; } /* Send +initialize to class if not already done */ static void ! __objc_send_initialize(Class class) { /* This *must* be a class object */ ! assert(CLS_ISCLASS(class)); ! assert(!CLS_ISMETA(class)); ! if (!CLS_ISINITIALIZED(class)) { ! CLS_SETINITIALIZED(class); ! CLS_SETINITIALIZED(class->class_pointer); /* Create the garbage collector type memory description */ __objc_generate_gc_type_description (class); ! if(class->super_class) ! __objc_send_initialize(class->super_class); { SEL op = sel_register_name ("initialize"); --- 206,300 ---- if (super->self) return get_imp (super->class, sel); else ! return (IMP)nil_method; } ! int method_get_sizeof_arguments (Method *); retval_t ! objc_msg_sendv (id object, SEL op, arglist_t arg_frame) { ! Method *m = class_get_instance_method (object->class_pointer, op); const char *type; ! *((id *) method_get_first_argument (m, arg_frame, &type)) = object; ! *((SEL *) method_get_next_argument (arg_frame, &type)) = op; ! return __builtin_apply ((apply_t) m->method_imp, ! arg_frame, ! method_get_sizeof_arguments (m)); } void ! __objc_init_dispatch_tables () { ! __objc_uninstalled_dtable = sarray_new (200, 0); } /* This function is called by objc_msg_lookup when the dispatch table needs to be installed; thus it is called once for each class, namely when the very first message is sent to it. */ static void ! __objc_init_install_dtable (id receiver, SEL op __attribute__ ((__unused__))) { /* This may happen, if the programmer has taken the address of a method before the dtable was initialized... too bad for him! */ ! if (receiver->class_pointer->dtable != __objc_uninstalled_dtable) return; ! objc_mutex_lock (__objc_runtime_mutex); ! if (CLS_ISCLASS (receiver->class_pointer)) { /* receiver is an ordinary object */ ! assert (CLS_ISCLASS (receiver->class_pointer)); /* install instance methods table */ __objc_install_dispatch_table_for_class (receiver->class_pointer); /* call +initialize -- this will in turn install the factory dispatch table if not already done :-) */ ! __objc_send_initialize (receiver->class_pointer); } else { /* receiver is a class object */ ! assert (CLS_ISCLASS ((Class)receiver)); ! assert (CLS_ISMETA (receiver->class_pointer)); /* Install real dtable for factory methods */ __objc_install_dispatch_table_for_class (receiver->class_pointer); ! __objc_send_initialize ((Class)receiver); } ! objc_mutex_unlock (__objc_runtime_mutex); } /* Install dummy table for class which causes the first message to that class (or instances hereof) to be initialized properly */ void ! __objc_install_premature_dtable (Class class) { ! assert (__objc_uninstalled_dtable); class->dtable = __objc_uninstalled_dtable; } /* Send +initialize to class if not already done */ static void ! __objc_send_initialize (Class class) { /* This *must* be a class object */ ! assert (CLS_ISCLASS (class)); ! assert (! CLS_ISMETA (class)); ! if (! CLS_ISINITIALIZED (class)) { ! CLS_SETINITIALIZED (class); ! CLS_SETINITIALIZED (class->class_pointer); /* Create the garbage collector type memory description */ __objc_generate_gc_type_description (class); ! if (class->super_class) ! __objc_send_initialize (class->super_class); { SEL op = sel_register_name ("initialize"); *************** __objc_send_initialize(Class class) *** 302,308 **** int i; Method_t method; ! for (i = 0; i< method_list->method_count; i++) { method = &(method_list->method_list[i]); if (method->method_name && method->method_name->sel_id == op->sel_id) { --- 305,311 ---- int i; Method_t method; ! for (i = 0; i < method_list->method_count; i++) { method = &(method_list->method_list[i]); if (method->method_name && method->method_name->sel_id == op->sel_id) { *************** __objc_send_initialize(Class class) *** 318,324 **** } if (imp) ! (*imp)((id)class, op); } } --- 321,327 ---- } if (imp) ! (*imp) ((id) class, op); } } *************** __objc_install_methods_in_dtable (Class *** 335,341 **** { int i; ! if (!method_list) return; if (method_list->method_next) --- 338,344 ---- { int i; ! if (! method_list) return; if (method_list->method_next) *************** __objc_install_dispatch_table_for_class *** 358,365 **** /* If the class has not yet had its class links resolved, we must re-compute all class links */ ! if(!CLS_ISRESOLV(class)) ! __objc_resolve_class_links(); super = class->super_class; --- 361,368 ---- /* If the class has not yet had its class links resolved, we must re-compute all class links */ ! if (! CLS_ISRESOLV (class)) ! __objc_resolve_class_links (); super = class->super_class; *************** __objc_install_dispatch_table_for_class *** 369,377 **** /* Allocate dtable if necessary */ if (super == 0) { ! objc_mutex_lock(__objc_runtime_mutex); class->dtable = sarray_new (__objc_selector_max_index, 0); ! objc_mutex_unlock(__objc_runtime_mutex); } else class->dtable = sarray_lazy_copy (super->dtable); --- 372,380 ---- /* Allocate dtable if necessary */ if (super == 0) { ! objc_mutex_lock (__objc_runtime_mutex); class->dtable = sarray_new (__objc_selector_max_index, 0); ! objc_mutex_unlock (__objc_runtime_mutex); } else class->dtable = sarray_lazy_copy (super->dtable); *************** __objc_update_dispatch_table_for_class ( *** 389,395 **** if (class->dtable == __objc_uninstalled_dtable) return; ! objc_mutex_lock(__objc_runtime_mutex); arr = class->dtable; __objc_install_premature_dtable (class); /* someone might require it... */ --- 392,398 ---- if (class->dtable == __objc_uninstalled_dtable) return; ! objc_mutex_lock (__objc_runtime_mutex); arr = class->dtable; __objc_install_premature_dtable (class); /* someone might require it... */ *************** __objc_update_dispatch_table_for_class ( *** 402,408 **** for (next = class->subclass_list; next; next = next->sibling_class) __objc_update_dispatch_table_for_class (next); ! objc_mutex_unlock(__objc_runtime_mutex); } --- 405,411 ---- for (next = class->subclass_list; next; next = next->sibling_class) __objc_update_dispatch_table_for_class (next); ! objc_mutex_unlock (__objc_runtime_mutex); } *************** class_add_method_list (Class class, Meth *** 419,425 **** int i; /* Passing of a linked list is not allowed. Do multiple calls. */ ! assert (!list->method_next); /* Check for duplicates. */ for (i = 0; i < list->method_count; ++i) --- 422,428 ---- int i; /* Passing of a linked list is not allowed. Do multiple calls. */ ! assert (! list->method_next); /* Check for duplicates. */ for (i = 0; i < list->method_count; ++i) *************** class_add_method_list (Class class, Meth *** 430,436 **** { /* This is where selector names are transmogrified to SEL's */ method->method_name = ! sel_register_typed_name ((const char*)method->method_name, method->method_types); } } --- 433,439 ---- { /* This is where selector names are transmogrified to SEL's */ method->method_name = ! sel_register_typed_name ((const char *) method->method_name, method->method_types); } } *************** class_add_method_list (Class class, Meth *** 444,458 **** } Method_t ! class_get_instance_method(Class class, SEL op) { ! return search_for_method_in_hierarchy(class, op); } Method_t ! class_get_class_method(MetaClass class, SEL op) { ! return search_for_method_in_hierarchy(class, op); } --- 447,461 ---- } Method_t ! class_get_instance_method (Class class, SEL op) { ! return search_for_method_in_hierarchy (class, op); } Method_t ! class_get_class_method (MetaClass class, SEL op) { ! return search_for_method_in_hierarchy (class, op); } *************** __objc_forward (id object, SEL sel, argl *** 576,588 **** SEL err_sel; /* first try if the object understands forward:: */ ! if (!frwd_sel) ! frwd_sel = sel_get_any_uid("forward::"); if (__objc_responds_to (object, frwd_sel)) { ! imp = get_imp(object->class_pointer, frwd_sel); ! return (*imp)(object, frwd_sel, sel, args); } /* If the object recognizes the doesNotRecognize: method then we're going --- 579,591 ---- SEL err_sel; /* first try if the object understands forward:: */ ! if (! frwd_sel) ! frwd_sel = sel_get_any_uid ("forward::"); if (__objc_responds_to (object, frwd_sel)) { ! imp = get_imp (object->class_pointer, frwd_sel); ! return (*imp) (object, frwd_sel, sel, args); } /* If the object recognizes the doesNotRecognize: method then we're going *************** __objc_forward (id object, SEL sel, argl *** 597,607 **** /* The object doesn't recognize the method. Check for responding to error:. If it does then sent it. */ { ! char msg[256 + strlen ((const char*)sel_get_name (sel)) ! + strlen ((const char*)object->class_pointer->name)]; sprintf (msg, "(%s) %s does not recognize %s", ! (CLS_ISMETA(object->class_pointer) ? "class" : "instance" ), object->class_pointer->name, sel_get_name (sel)); --- 600,610 ---- /* The object doesn't recognize the method. Check for responding to error:. If it does then sent it. */ { ! char msg[256 + strlen ((const char *) sel_get_name (sel)) ! + strlen ((const char *) object->class_pointer->name)]; sprintf (msg, "(%s) %s does not recognize %s", ! (CLS_ISMETA (object->class_pointer) ? "class" : "instance" ), object->class_pointer->name, sel_get_name (sel)); *************** __objc_forward (id object, SEL sel, argl *** 622,661 **** } void ! __objc_print_dtable_stats() { int total = 0; ! objc_mutex_lock(__objc_runtime_mutex); #ifdef OBJC_SPARSE2 ! printf("memory usage: (%s)\n", "2-level sparse arrays"); #else ! printf("memory usage: (%s)\n", "3-level sparse arrays"); #endif ! printf("arrays: %d = %ld bytes\n", narrays, ! (long)narrays*sizeof(struct sarray)); ! total += narrays*sizeof(struct sarray); ! printf("buckets: %d = %ld bytes\n", nbuckets, ! (long)nbuckets*sizeof(struct sbucket)); ! total += nbuckets*sizeof(struct sbucket); ! printf("idxtables: %d = %ld bytes\n", idxsize, (long)idxsize*sizeof(void*)); ! total += idxsize*sizeof(void*); ! printf("-----------------------------------\n"); ! printf("total: %d bytes\n", total); ! printf("===================================\n"); ! objc_mutex_unlock(__objc_runtime_mutex); } /* Returns the uninstalled dispatch table indicator. If a class' dispatch table points to __objc_uninstalled_dtable then that means it needs its dispatch table to be installed. */ __inline__ ! struct sarray* ! objc_get_uninstalled_dtable() { return __objc_uninstalled_dtable; } --- 625,665 ---- } void ! __objc_print_dtable_stats () { int total = 0; ! objc_mutex_lock (__objc_runtime_mutex); #ifdef OBJC_SPARSE2 ! printf ("memory usage: (%s)\n", "2-level sparse arrays"); #else ! printf ("memory usage: (%s)\n", "3-level sparse arrays"); #endif ! printf ("arrays: %d = %ld bytes\n", narrays, ! (long) narrays * sizeof (struct sarray)); ! total += narrays * sizeof (struct sarray); ! printf ("buckets: %d = %ld bytes\n", nbuckets, ! (long) nbuckets * sizeof (struct sbucket)); ! total += nbuckets * sizeof (struct sbucket); ! printf ("idxtables: %d = %ld bytes\n", ! idxsize, (long) idxsize * sizeof (void *)); ! total += idxsize * sizeof (void *); ! printf ("-----------------------------------\n"); ! printf ("total: %d bytes\n", total); ! printf ("===================================\n"); ! objc_mutex_unlock (__objc_runtime_mutex); } /* Returns the uninstalled dispatch table indicator. If a class' dispatch table points to __objc_uninstalled_dtable then that means it needs its dispatch table to be installed. */ __inline__ ! struct sarray * ! objc_get_uninstalled_dtable () { return __objc_uninstalled_dtable; } diff -Nrc3pad gcc-3.2.3/libobjc/thr.c gcc-3.3/libobjc/thr.c *** gcc-3.2.3/libobjc/thr.c 2001-07-18 11:54:03.000000000 +0000 --- gcc-3.3/libobjc/thr.c 2002-07-02 19:42:53.000000000 +0000 *************** objc_thread_callback _objc_became_multi_ *** 48,54 **** it can be informed; for example, the GNUstep Base Library sets it so it can implement the NSBecomingMultiThreaded notification. */ ! objc_thread_callback objc_set_thread_callback(objc_thread_callback func) { objc_thread_callback temp = _objc_became_multi_threaded; _objc_became_multi_threaded = func; --- 48,54 ---- it can be informed; for example, the GNUstep Base Library sets it so it can implement the NSBecomingMultiThreaded notification. */ ! objc_thread_callback objc_set_thread_callback (objc_thread_callback func) { objc_thread_callback temp = _objc_became_multi_threaded; _objc_became_multi_threaded = func; *************** struct __objc_thread_start_state *** 76,119 **** }; static volatile void ! __objc_thread_detach_function(struct __objc_thread_start_state *istate) { /* Valid state? */ if (istate) { ! id (*imp)(id,SEL,id); SEL selector = istate->selector; id object = istate->object; id argument = istate->argument; /* Don't need anymore so free it */ ! objc_free(istate); /* Clear out the thread local storage */ ! objc_thread_set_data(NULL); /* Check to see if we just became multi threaded */ ! if (!__objc_is_multi_threaded) { __objc_is_multi_threaded = 1; /* Call the hook function */ if (_objc_became_multi_threaded != NULL) ! (*_objc_became_multi_threaded)(); } /* Call the method */ ! if ((imp = (id(*)(id, SEL, id))objc_msg_lookup(object, selector))) ! (*imp)(object, selector, argument); else ! objc_error(object, OBJC_ERR_UNIMPLEMENTED, ! "objc_thread_detach called with bad selector.\n"); } else ! objc_error(nil, OBJC_ERR_BAD_STATE, ! "objc_thread_detach called with NULL state.\n"); /* Exit the thread */ ! objc_thread_exit(); } /* --- 76,119 ---- }; static volatile void ! __objc_thread_detach_function (struct __objc_thread_start_state *istate) { /* Valid state? */ if (istate) { ! id (*imp) (id, SEL, id); SEL selector = istate->selector; id object = istate->object; id argument = istate->argument; /* Don't need anymore so free it */ ! objc_free (istate); /* Clear out the thread local storage */ ! objc_thread_set_data (NULL); /* Check to see if we just became multi threaded */ ! if (! __objc_is_multi_threaded) { __objc_is_multi_threaded = 1; /* Call the hook function */ if (_objc_became_multi_threaded != NULL) ! (*_objc_became_multi_threaded) (); } /* Call the method */ ! if ((imp = (id (*) (id, SEL, id))objc_msg_lookup (object, selector))) ! (*imp) (object, selector, argument); else ! objc_error (object, OBJC_ERR_UNIMPLEMENTED, ! "objc_thread_detach called with bad selector.\n"); } else ! objc_error (nil, OBJC_ERR_BAD_STATE, ! "objc_thread_detach called with NULL state.\n"); /* Exit the thread */ ! objc_thread_exit (); } /* *************** __objc_thread_detach_function(struct __o *** 131,144 **** takes a single argument. */ objc_thread_t ! objc_thread_detach(SEL selector, id object, id argument) { struct __objc_thread_start_state *istate; objc_thread_t thread_id = NULL; /* Allocate the state structure */ ! if (!(istate = (struct __objc_thread_start_state *) ! objc_malloc(sizeof(*istate)))) return NULL; /* Initialize the state structure */ --- 131,144 ---- takes a single argument. */ objc_thread_t ! objc_thread_detach (SEL selector, id object, id argument) { struct __objc_thread_start_state *istate; objc_thread_t thread_id = NULL; /* Allocate the state structure */ ! if (! (istate = (struct __objc_thread_start_state *) ! objc_malloc (sizeof (*istate)))) return NULL; /* Initialize the state structure */ *************** objc_thread_detach(SEL selector, id obje *** 147,185 **** istate->argument = argument; /* lock access */ ! objc_mutex_lock(__objc_runtime_mutex); /* Call the backend to spawn the thread */ ! if ((thread_id = __objc_thread_detach((void *)__objc_thread_detach_function, ! istate)) == NULL) { /* failed! */ ! objc_mutex_unlock(__objc_runtime_mutex); ! objc_free(istate); return NULL; } /* Increment our thread counter */ __objc_runtime_threads_alive++; ! objc_mutex_unlock(__objc_runtime_mutex); return thread_id; } /* Set the current thread's priority. */ int ! objc_thread_set_priority(int priority) { /* Call the backend */ ! return __objc_thread_set_priority(priority); } /* Return the current thread's priority. */ int ! objc_thread_get_priority(void) { /* Call the backend */ ! return __objc_thread_get_priority(); } /* --- 147,185 ---- istate->argument = argument; /* lock access */ ! objc_mutex_lock (__objc_runtime_mutex); /* Call the backend to spawn the thread */ ! if ((thread_id = __objc_thread_detach ((void *)__objc_thread_detach_function, ! istate)) == NULL) { /* failed! */ ! objc_mutex_unlock (__objc_runtime_mutex); ! objc_free (istate); return NULL; } /* Increment our thread counter */ __objc_runtime_threads_alive++; ! objc_mutex_unlock (__objc_runtime_mutex); return thread_id; } /* Set the current thread's priority. */ int ! objc_thread_set_priority (int priority) { /* Call the backend */ ! return __objc_thread_set_priority (priority); } /* Return the current thread's priority. */ int ! objc_thread_get_priority (void) { /* Call the backend */ ! return __objc_thread_get_priority (); } /* *************** objc_thread_get_priority(void) *** 188,197 **** make progress even on a lazy uniprocessor system. */ void ! objc_thread_yield(void) { /* Call the backend */ ! __objc_thread_yield(); } /* --- 188,197 ---- make progress even on a lazy uniprocessor system. */ void ! objc_thread_yield (void) { /* Call the backend */ ! __objc_thread_yield (); } /* *************** objc_thread_yield(void) *** 199,213 **** Actually, if it failed returns -1. */ int ! objc_thread_exit(void) { /* Decrement our counter of the number of threads alive */ ! objc_mutex_lock(__objc_runtime_mutex); __objc_runtime_threads_alive--; ! objc_mutex_unlock(__objc_runtime_mutex); /* Call the backend to terminate the thread */ ! return __objc_thread_exit(); } /* --- 199,213 ---- Actually, if it failed returns -1. */ int ! objc_thread_exit (void) { /* Decrement our counter of the number of threads alive */ ! objc_mutex_lock (__objc_runtime_mutex); __objc_runtime_threads_alive--; ! objc_mutex_unlock (__objc_runtime_mutex); /* Call the backend to terminate the thread */ ! return __objc_thread_exit (); } /* *************** objc_thread_exit(void) *** 215,224 **** NULL which is reserved as a marker for "no thread". */ objc_thread_t ! objc_thread_id(void) { /* Call the backend */ ! return __objc_thread_id(); } /* --- 215,224 ---- NULL which is reserved as a marker for "no thread". */ objc_thread_t ! objc_thread_id (void) { /* Call the backend */ ! return __objc_thread_id (); } /* *************** objc_thread_id(void) *** 226,245 **** Returns 0 if successful or -1 if failed. */ int ! objc_thread_set_data(void *value) { /* Call the backend */ ! return __objc_thread_set_data(value); } /* Returns the thread's local storage pointer. Returns NULL on failure. */ void * ! objc_thread_get_data(void) { /* Call the backend */ ! return __objc_thread_get_data(); } /* Frontend mutex functions */ --- 226,245 ---- Returns 0 if successful or -1 if failed. */ int ! objc_thread_set_data (void *value) { /* Call the backend */ ! return __objc_thread_set_data (value); } /* Returns the thread's local storage pointer. Returns NULL on failure. */ void * ! objc_thread_get_data (void) { /* Call the backend */ ! return __objc_thread_get_data (); } /* Frontend mutex functions */ *************** objc_thread_get_data(void) *** 249,267 **** allocation failed for any reason. */ objc_mutex_t ! objc_mutex_allocate(void) { objc_mutex_t mutex; /* Allocate the mutex structure */ ! if (!(mutex = (objc_mutex_t)objc_malloc(sizeof(struct objc_mutex)))) return NULL; /* Call backend to create the mutex */ ! if (__objc_mutex_allocate(mutex)) { /* failed! */ ! objc_free(mutex); return NULL; } --- 249,267 ---- allocation failed for any reason. */ objc_mutex_t ! objc_mutex_allocate (void) { objc_mutex_t mutex; /* Allocate the mutex structure */ ! if (! (mutex = (objc_mutex_t)objc_malloc (sizeof (struct objc_mutex)))) return NULL; /* Call backend to create the mutex */ ! if (__objc_mutex_allocate (mutex)) { /* failed! */ ! objc_free (mutex); return NULL; } *************** objc_mutex_allocate(void) *** 279,301 **** Returns the number of locks on the thread. (1 for deallocate). */ int ! objc_mutex_deallocate(objc_mutex_t mutex) { int depth; /* Valid mutex? */ ! if (!mutex) return -1; /* Acquire lock on mutex */ ! depth = objc_mutex_lock(mutex); /* Call backend to destroy mutex */ ! if (__objc_mutex_deallocate(mutex)) return -1; /* Free the mutex structure */ ! objc_free(mutex); /* Return last depth */ return depth; --- 279,301 ---- Returns the number of locks on the thread. (1 for deallocate). */ int ! objc_mutex_deallocate (objc_mutex_t mutex) { int depth; /* Valid mutex? */ ! if (! mutex) return -1; /* Acquire lock on mutex */ ! depth = objc_mutex_lock (mutex); /* Call backend to destroy mutex */ ! if (__objc_mutex_deallocate (mutex)) return -1; /* Free the mutex structure */ ! objc_free (mutex); /* Return last depth */ return depth; *************** objc_mutex_deallocate(objc_mutex_t mutex *** 308,329 **** Returns the lock count on the mutex held by this thread. */ int ! objc_mutex_lock(objc_mutex_t mutex) { objc_thread_t thread_id; int status; /* Valid mutex? */ ! if (!mutex) return -1; /* If we already own the lock then increment depth */ ! thread_id = __objc_thread_id(); if (mutex->owner == thread_id) return ++mutex->depth; /* Call the backend to lock the mutex */ ! status = __objc_mutex_lock(mutex); /* Failed? */ if (status) --- 308,329 ---- Returns the lock count on the mutex held by this thread. */ int ! objc_mutex_lock (objc_mutex_t mutex) { objc_thread_t thread_id; int status; /* Valid mutex? */ ! if (! mutex) return -1; /* If we already own the lock then increment depth */ ! thread_id = __objc_thread_id (); if (mutex->owner == thread_id) return ++mutex->depth; /* Call the backend to lock the mutex */ ! status = __objc_mutex_lock (mutex); /* Failed? */ if (status) *************** objc_mutex_lock(objc_mutex_t mutex) *** 340,361 **** thread has a lock on the mutex returns -1. */ int ! objc_mutex_trylock(objc_mutex_t mutex) { objc_thread_t thread_id; int status; /* Valid mutex? */ ! if (!mutex) return -1; /* If we already own the lock then increment depth */ ! thread_id = __objc_thread_id(); if (mutex->owner == thread_id) return ++mutex->depth; /* Call the backend to try to lock the mutex */ ! status = __objc_mutex_trylock(mutex); /* Failed? */ if (status) --- 340,361 ---- thread has a lock on the mutex returns -1. */ int ! objc_mutex_trylock (objc_mutex_t mutex) { objc_thread_t thread_id; int status; /* Valid mutex? */ ! if (! mutex) return -1; /* If we already own the lock then increment depth */ ! thread_id = __objc_thread_id (); if (mutex->owner == thread_id) return ++mutex->depth; /* Call the backend to try to lock the mutex */ ! status = __objc_mutex_trylock (mutex); /* Failed? */ if (status) *************** objc_mutex_trylock(objc_mutex_t mutex) *** 375,391 **** doesn't hold in which case return -1 and the mutex is unaffected. */ int ! objc_mutex_unlock(objc_mutex_t mutex) { objc_thread_t thread_id; int status; /* Valid mutex? */ ! if (!mutex) return -1; /* If another thread owns the lock then abort */ ! thread_id = __objc_thread_id(); if (mutex->owner != thread_id) return -1; --- 375,391 ---- doesn't hold in which case return -1 and the mutex is unaffected. */ int ! objc_mutex_unlock (objc_mutex_t mutex) { objc_thread_t thread_id; int status; /* Valid mutex? */ ! if (! mutex) return -1; /* If another thread owns the lock then abort */ ! thread_id = __objc_thread_id (); if (mutex->owner != thread_id) return -1; *************** objc_mutex_unlock(objc_mutex_t mutex) *** 398,404 **** mutex->owner = NULL; /* Have the backend unlock the mutex */ ! status = __objc_mutex_unlock(mutex); /* Failed? */ if (status) --- 398,404 ---- mutex->owner = NULL; /* Have the backend unlock the mutex */ ! status = __objc_mutex_unlock (mutex); /* Failed? */ if (status) *************** objc_mutex_unlock(objc_mutex_t mutex) *** 414,433 **** if the allocation failed for any reason. */ objc_condition_t ! objc_condition_allocate(void) { objc_condition_t condition; /* Allocate the condition mutex structure */ ! if (!(condition = ! (objc_condition_t)objc_malloc(sizeof(struct objc_condition)))) return NULL; /* Call the backend to create the condition mutex */ ! if (__objc_condition_allocate(condition)) { /* failed! */ ! objc_free(condition); return NULL; } --- 414,433 ---- if the allocation failed for any reason. */ objc_condition_t ! objc_condition_allocate (void) { objc_condition_t condition; /* Allocate the condition mutex structure */ ! if (! (condition = ! (objc_condition_t) objc_malloc (sizeof (struct objc_condition)))) return NULL; /* Call the backend to create the condition mutex */ ! if (__objc_condition_allocate (condition)) { /* failed! */ ! objc_free (condition); return NULL; } *************** objc_condition_allocate(void) *** 443,483 **** waiting but just wake them up. */ int ! objc_condition_deallocate(objc_condition_t condition) { /* Broadcast the condition */ ! if (objc_condition_broadcast(condition)) return -1; /* Call the backend to destroy */ ! if (__objc_condition_deallocate(condition)) return -1; /* Free the condition mutex structure */ ! objc_free(condition); return 0; } /* ! Wait on the condition unlocking the mutex until objc_condition_signal() ! or objc_condition_broadcast() are called for the same condition. The given mutex *must* have the depth set to 1 so that it can be unlocked here, so that someone else can lock it and signal/broadcast the condition. The mutex is used to lock access to the shared data that make up the "condition" predicate. */ int ! objc_condition_wait(objc_condition_t condition, objc_mutex_t mutex) { objc_thread_t thread_id; /* Valid arguments? */ ! if (!mutex || !condition) return -1; /* Make sure we are owner of mutex */ ! thread_id = __objc_thread_id(); if (mutex->owner != thread_id) return -1; --- 443,483 ---- waiting but just wake them up. */ int ! objc_condition_deallocate (objc_condition_t condition) { /* Broadcast the condition */ ! if (objc_condition_broadcast (condition)) return -1; /* Call the backend to destroy */ ! if (__objc_condition_deallocate (condition)) return -1; /* Free the condition mutex structure */ ! objc_free (condition); return 0; } /* ! Wait on the condition unlocking the mutex until objc_condition_signal () ! or objc_condition_broadcast () are called for the same condition. The given mutex *must* have the depth set to 1 so that it can be unlocked here, so that someone else can lock it and signal/broadcast the condition. The mutex is used to lock access to the shared data that make up the "condition" predicate. */ int ! objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex) { objc_thread_t thread_id; /* Valid arguments? */ ! if (! mutex || ! condition) return -1; /* Make sure we are owner of mutex */ ! thread_id = __objc_thread_id (); if (mutex->owner != thread_id) return -1; *************** objc_condition_wait(objc_condition_t con *** 490,496 **** mutex->owner = (objc_thread_t)NULL; /* Call the backend to wait */ ! __objc_condition_wait(condition, mutex); /* Make ourselves owner of the mutex */ mutex->owner = thread_id; --- 490,496 ---- mutex->owner = (objc_thread_t)NULL; /* Call the backend to wait */ ! __objc_condition_wait (condition, mutex); /* Make ourselves owner of the mutex */ mutex->owner = thread_id; *************** objc_condition_wait(objc_condition_t con *** 506,518 **** right away after this call. */ int ! objc_condition_broadcast(objc_condition_t condition) { /* Valid condition mutex? */ ! if (!condition) return -1; ! return __objc_condition_broadcast(condition); } /* --- 506,518 ---- right away after this call. */ int ! objc_condition_broadcast (objc_condition_t condition) { /* Valid condition mutex? */ ! if (! condition) return -1; ! return __objc_condition_broadcast (condition); } /* *************** objc_condition_broadcast(objc_condition_ *** 522,563 **** right away after this call. */ int ! objc_condition_signal(objc_condition_t condition) { /* Valid condition mutex? */ ! if (!condition) return -1; ! return __objc_condition_signal(condition); } /* Make the objc thread system aware that a thread which is managed (started, stopped) by external code could access objc facilities from now on. This is used when you are interfacing with some external non-objc-based environment/system - you must call ! objc_thread_add() before an alien thread makes any calls to Objective-C. Do not cause the _objc_became_multi_threaded hook to be executed. */ void ! objc_thread_add(void) { ! objc_mutex_lock(__objc_runtime_mutex); __objc_is_multi_threaded = 1; __objc_runtime_threads_alive++; ! objc_mutex_unlock(__objc_runtime_mutex); } /* Make the objc thread system aware that a thread managed (started, stopped) by some external code will no longer access objc and thus can be forgotten by the objc thread system. Call ! objc_thread_remove() when your alien thread is done with making calls to Objective-C. */ void ! objc_thread_remove(void) { ! objc_mutex_lock(__objc_runtime_mutex); __objc_runtime_threads_alive--; ! objc_mutex_unlock(__objc_runtime_mutex); } /* End of File */ --- 522,563 ---- right away after this call. */ int ! objc_condition_signal (objc_condition_t condition) { /* Valid condition mutex? */ ! if (! condition) return -1; ! return __objc_condition_signal (condition); } /* Make the objc thread system aware that a thread which is managed (started, stopped) by external code could access objc facilities from now on. This is used when you are interfacing with some external non-objc-based environment/system - you must call ! objc_thread_add () before an alien thread makes any calls to Objective-C. Do not cause the _objc_became_multi_threaded hook to be executed. */ void ! objc_thread_add (void) { ! objc_mutex_lock (__objc_runtime_mutex); __objc_is_multi_threaded = 1; __objc_runtime_threads_alive++; ! objc_mutex_unlock (__objc_runtime_mutex); } /* Make the objc thread system aware that a thread managed (started, stopped) by some external code will no longer access objc and thus can be forgotten by the objc thread system. Call ! objc_thread_remove () when your alien thread is done with making calls to Objective-C. */ void ! objc_thread_remove (void) { ! objc_mutex_lock (__objc_runtime_mutex); __objc_runtime_threads_alive--; ! objc_mutex_unlock (__objc_runtime_mutex); } /* End of File */ diff -Nrc3pad gcc-3.2.3/libobjc/thr-mach.c gcc-3.3/libobjc/thr-mach.c *** gcc-3.2.3/libobjc/thr-mach.c 1999-09-04 15:09:20.000000000 +0000 --- gcc-3.3/libobjc/thr-mach.c 2002-07-02 19:42:47.000000000 +0000 *************** *** 1,5 **** /* GNU Objective C Runtime Thread Implementation ! Copyright (C) 1996, 1997 Free Software Foundation, Inc. Contributed by Galen C. Hunt (gchunt@cs.rochester.edu) Modified for Mach threads by Bill Bumgarner Condition functions added by Mircea Oancea --- 1,5 ---- /* GNU Objective C Runtime Thread Implementation ! Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc. Contributed by Galen C. Hunt (gchunt@cs.rochester.edu) Modified for Mach threads by Bill Bumgarner Condition functions added by Mircea Oancea *************** Boston, MA 02111-1307, USA. */ *** 37,43 **** maximum priority downward only-- cannot be raised without superuser privileges. Once lowered, it cannot be raised. */ ! static int __mach_get_max_thread_priority(cthread_t t, int *base) { thread_t threadP; kern_return_t error; --- 37,44 ---- maximum priority downward only-- cannot be raised without superuser privileges. Once lowered, it cannot be raised. */ ! static int ! __mach_get_max_thread_priority (cthread_t t, int *base) { thread_t threadP; kern_return_t error; *************** static int __mach_get_max_thread_priorit *** 47,56 **** if (t == NULL) return -1; ! threadP = cthread_thread(t); /* get thread underlying */ ! error=thread_info(threadP, THREAD_SCHED_INFO, ! (thread_info_t)&info, &info_count); if (error != KERN_SUCCESS) return -1; --- 48,57 ---- if (t == NULL) return -1; ! threadP = cthread_thread (t); /* get thread underlying */ ! error = thread_info (threadP, THREAD_SCHED_INFO, ! (thread_info_t) &info, &info_count); if (error != KERN_SUCCESS) return -1; *************** static int __mach_get_max_thread_priorit *** 65,78 **** /* Initialize the threads subsystem. */ int ! __objc_init_thread_system(void) { return 0; } /* Close the threads subsystem. */ int ! __objc_close_thread_system(void) { return 0; } --- 66,79 ---- /* Initialize the threads subsystem. */ int ! __objc_init_thread_system (void) { return 0; } /* Close the threads subsystem. */ int ! __objc_close_thread_system (void) { return 0; } *************** __objc_close_thread_system(void) *** 81,99 **** /* Create a new thread of execution. */ objc_thread_t ! __objc_thread_detach(void (*func)(void *arg), void *arg) { objc_thread_t thread_id; cthread_t new_thread_handle; /* create thread */ ! new_thread_handle = cthread_fork((cthread_fn_t)func, arg); ! if(new_thread_handle) { /* this is not terribly portable */ ! thread_id = *(objc_thread_t *)&new_thread_handle; ! cthread_detach(new_thread_handle); } else thread_id = NULL; --- 82,100 ---- /* Create a new thread of execution. */ objc_thread_t ! __objc_thread_detach (void (*func) (void *arg), void *arg) { objc_thread_t thread_id; cthread_t new_thread_handle; /* create thread */ ! new_thread_handle = cthread_fork ((cthread_fn_t) func, arg); ! if (new_thread_handle) { /* this is not terribly portable */ ! thread_id = *(objc_thread_t *) &new_thread_handle; ! cthread_detach (new_thread_handle); } else thread_id = NULL; *************** __objc_thread_detach(void (*func)(void * *** 103,113 **** /* Set the current thread's priority. */ int ! __objc_thread_set_priority(int priority) { ! objc_thread_t *t = objc_thread_id(); cthread_t cT = (cthread_t) t; ! int maxPriority = __mach_get_max_thread_priority(cT, NULL); int sys_priority = 0; if (maxPriority == -1) --- 104,114 ---- /* Set the current thread's priority. */ int ! __objc_thread_set_priority (int priority) { ! objc_thread_t *t = objc_thread_id (); cthread_t cT = (cthread_t) t; ! int maxPriority = __mach_get_max_thread_priority (cT, NULL); int sys_priority = 0; if (maxPriority == -1) *************** __objc_thread_set_priority(int priority) *** 132,138 **** return -1; /* Change the priority */ ! if (cthread_priority(cT, sys_priority, 0) == KERN_SUCCESS) return 0; else return -1; --- 133,139 ---- return -1; /* Change the priority */ ! if (cthread_priority (cT, sys_priority, 0) == KERN_SUCCESS) return 0; else return -1; *************** __objc_thread_set_priority(int priority) *** 140,158 **** /* Return the current thread's priority. */ int ! __objc_thread_get_priority(void) { ! objc_thread_t *t = objc_thread_id(); ! cthread_t cT = (cthread_t) t; /* see objc_thread_id() */ int basePriority; int maxPriority; int sys_priority = 0; int interactiveT, backgroundT, lowT; /* thresholds */ ! maxPriority = __mach_get_max_thread_priority(cT, &basePriority); ! if(maxPriority == -1) return -1; if (basePriority > ( (maxPriority * 2) / 3)) --- 141,159 ---- /* Return the current thread's priority. */ int ! __objc_thread_get_priority (void) { ! objc_thread_t *t = objc_thread_id (); ! cthread_t cT = (cthread_t) t; /* see objc_thread_id () */ int basePriority; int maxPriority; int sys_priority = 0; int interactiveT, backgroundT, lowT; /* thresholds */ ! maxPriority = __mach_get_max_thread_priority (cT, &basePriority); ! if (maxPriority == -1) return -1; if (basePriority > ( (maxPriority * 2) / 3)) *************** __objc_thread_get_priority(void) *** 166,182 **** /* Yield our process time to another thread. */ void ! __objc_thread_yield(void) { ! cthread_yield(); } /* Terminate the current thread. */ int ! __objc_thread_exit(void) { /* exit the thread */ ! cthread_exit(&__objc_thread_exit_status); /* Failed if we reached here */ return -1; --- 167,183 ---- /* Yield our process time to another thread. */ void ! __objc_thread_yield (void) { ! cthread_yield (); } /* Terminate the current thread. */ int ! __objc_thread_exit (void) { /* exit the thread */ ! cthread_exit (&__objc_thread_exit_status); /* Failed if we reached here */ return -1; *************** __objc_thread_exit(void) *** 184,225 **** /* Returns an integer value which uniquely describes a thread. */ objc_thread_t ! __objc_thread_id(void) { ! cthread_t self = cthread_self(); ! return *(objc_thread_t *)&self; } /* Sets the thread's local storage pointer. */ int ! __objc_thread_set_data(void *value) { ! cthread_set_data(cthread_self(), (any_t) value); return 0; } /* Returns the thread's local storage pointer. */ void * ! __objc_thread_get_data(void) { ! return (void *) cthread_data(cthread_self()); } /* Backend mutex functions */ /* Allocate a mutex. */ int ! __objc_mutex_allocate(objc_mutex_t mutex) { int err = 0; ! mutex->backend = objc_malloc(sizeof(struct mutex)); ! err = mutex_init((mutex_t)(mutex->backend)); if (err != 0) { ! objc_free(mutex->backend); return -1; } else --- 185,226 ---- /* Returns an integer value which uniquely describes a thread. */ objc_thread_t ! __objc_thread_id (void) { ! cthread_t self = cthread_self (); ! return *(objc_thread_t *) &self; } /* Sets the thread's local storage pointer. */ int ! __objc_thread_set_data (void *value) { ! cthread_set_data (cthread_self (), (any_t) value); return 0; } /* Returns the thread's local storage pointer. */ void * ! __objc_thread_get_data (void) { ! return (void *) cthread_data (cthread_self ()); } /* Backend mutex functions */ /* Allocate a mutex. */ int ! __objc_mutex_allocate (objc_mutex_t mutex) { int err = 0; ! mutex->backend = objc_malloc (sizeof (struct mutex)); ! err = mutex_init ((mutex_t) (mutex->backend)); if (err != 0) { ! objc_free (mutex->backend); return -1; } else *************** __objc_mutex_allocate(objc_mutex_t mutex *** 228,255 **** /* Deallocate a mutex. */ int ! __objc_mutex_deallocate(objc_mutex_t mutex) { ! mutex_clear((mutex_t)(mutex->backend)); ! objc_free(mutex->backend); mutex->backend = NULL; return 0; } /* Grab a lock on a mutex. */ int ! __objc_mutex_lock(objc_mutex_t mutex) { ! mutex_lock((mutex_t)(mutex->backend)); return 0; } /* Try to grab a lock on a mutex. */ int ! __objc_mutex_trylock(objc_mutex_t mutex) { ! if (mutex_try_lock((mutex_t)(mutex->backend)) == 0) return -1; else return 0; --- 229,256 ---- /* Deallocate a mutex. */ int ! __objc_mutex_deallocate (objc_mutex_t mutex) { ! mutex_clear ((mutex_t) (mutex->backend)); ! objc_free (mutex->backend); mutex->backend = NULL; return 0; } /* Grab a lock on a mutex. */ int ! __objc_mutex_lock (objc_mutex_t mutex) { ! mutex_lock ((mutex_t) (mutex->backend)); return 0; } /* Try to grab a lock on a mutex. */ int ! __objc_mutex_trylock (objc_mutex_t mutex) { ! if (mutex_try_lock ((mutex_t) (mutex->backend)) == 0) return -1; else return 0; *************** __objc_mutex_trylock(objc_mutex_t mutex) *** 257,265 **** /* Unlock the mutex */ int ! __objc_mutex_unlock(objc_mutex_t mutex) { ! mutex_unlock((mutex_t)(mutex->backend)); return 0; } --- 258,266 ---- /* Unlock the mutex */ int ! __objc_mutex_unlock (objc_mutex_t mutex) { ! mutex_unlock ((mutex_t) (mutex->backend)); return 0; } *************** __objc_mutex_unlock(objc_mutex_t mutex) *** 267,311 **** /* Allocate a condition. */ int ! __objc_condition_allocate(objc_condition_t condition) { ! condition->backend = objc_malloc(sizeof(struct condition)); ! condition_init((condition_t)(condition->backend)); return 0; } /* Deallocate a condition. */ int ! __objc_condition_deallocate(objc_condition_t condition) { ! condition_clear((condition_t)(condition->backend)); ! objc_free(condition->backend); condition->backend = NULL; return 0; } /* Wait on the condition */ int ! __objc_condition_wait(objc_condition_t condition, objc_mutex_t mutex) { ! condition_wait((condition_t)(condition->backend), ! (mutex_t)(mutex->backend)); return 0; } /* Wake up all threads waiting on this condition. */ int ! __objc_condition_broadcast(objc_condition_t condition) { ! condition_broadcast((condition_t)(condition->backend)); return 0; } /* Wake up one thread waiting on this condition. */ int ! __objc_condition_signal(objc_condition_t condition) { ! condition_signal((condition_t)(condition->backend)); return 0; } --- 268,312 ---- /* Allocate a condition. */ int ! __objc_condition_allocate (objc_condition_t condition) { ! condition->backend = objc_malloc (sizeof (struct condition)); ! condition_init ((condition_t) (condition->backend)); return 0; } /* Deallocate a condition. */ int ! __objc_condition_deallocate (objc_condition_t condition) { ! condition_clear ((condition_t) (condition->backend)); ! objc_free (condition->backend); condition->backend = NULL; return 0; } /* Wait on the condition */ int ! __objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex) { ! condition_wait ((condition_t) (condition->backend), ! (mutex_t) (mutex->backend)); return 0; } /* Wake up all threads waiting on this condition. */ int ! __objc_condition_broadcast (objc_condition_t condition) { ! condition_broadcast ((condition_t) (condition->backend)); return 0; } /* Wake up one thread waiting on this condition. */ int ! __objc_condition_signal (objc_condition_t condition) { ! condition_signal ((condition_t) (condition->backend)); return 0; }