Mark Mitchell [Mon, 6 Jan 2003 21:32:17 +0000 (21:32 +0000)]
re PR c++/9189 ([New parser] Order of default argument processing and function body compilation)
PR c++/9189
* parser.c (cp_parser): Remove default_arg_types. Update
documentation for unparsed_functions_queues.
(cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
parameter.
(cp_parser_new): Don't set parser->default_arg_types.
(cp_parser_function_definition): Adjust usage of
unparsed_funtions_queues.
(cp_parser_class_specifier): Don't mess with
parser->default_arg_types. Handle default argument processing in
a separate phase from function body processing.
(cp_parser_template_declaration_after_export): Adjust usage of
unparsed_functions_queues.
(cp_parser_late_parsing_for_member): Do not handle default
arguments.
Nathan Sidwell [Mon, 6 Jan 2003 18:40:22 +0000 (18:40 +0000)]
re PR c++/9109 (parse ambiguity)
cp:
PR c++/9109
* parser.c (cp_parser_declarator_kind): New enum.
(cp_parser_declarator): Adjust.
(cp_parser_direct_declarator): Adjust. Allow for either named or
abstract declarator. Prefer abstract, if possible. Allow
parenthesized function name.
(cp_parser_condition): Adjust cp_parser_declarator call.
(cp_parser_explicit_instantiation): Likewise.
(cp_parser_init_declarator): Likewise.
(cp_parser_type_id): Likewise.
(cp_parser_function_definition): Likewise.
(cp_parser_member_declaration): Likewise.
(cp_parser_parameter_declaration): Use cp_parser_declarator to do
the tentative parsing.
(cp_parser_exception_declaration): Likewise.
testsuite:
* g++.dg/parse/ambig1.C: New test.
* g++.dg/parse/defarg2.C: New test.
* configure.in (LD): Improve test for gcc. Try to set LD to the ld used
by gcc if LD is not defined and we are not doing a Canadian Cross.
* configure: Rebuilt.
Kazu Hirata [Sat, 4 Jan 2003 17:46:24 +0000 (17:46 +0000)]
h8300-protos.h: Add prototypes for the new functions defined below.
* config/h8300/h8300-protos.h: Add prototypes for
the new functions defined below.
* config/h8300/h8300.c (TARGET_ASM_FUNCTION_PROLOGUE): Do not
define.
(dosize): Emit RTL instead of assembly code.
(push): Likewise.
(pop): Likewise.
(h8300_output_function_prologue): Remove.
(h8300_expand_prologue): New.
(h8300_expand_epilogue): New.
(h8300_output_function_epilogue): Do only the reset of
pragma_saveall.
* config/h8300/h8300.md (push_h8300): New.
(push_h8300hs): Likewise.
(pop_h8300): Likewise.
(pop_h8300hs): Likewise.
(*stm_h8300s_2): Change the name to stm_h8300s_2.
(*stm_h8300s_3): Change the name to stm_h8300s_3.
(*stm_h8300s_4): Change the name to stm_h8300s_4.
(*ldm_h8300s_2): New.
(*ldm_h8300s_3): Likewise.
(*ldm_h8300s_4): Likewise.
(return): Likewise.
(*return_1): Likewise.
(prologue): Likewise.
(epilogue): Likewise.
(monitor_prologue): Likewise.
Mark Wielaard [Sat, 4 Jan 2003 03:53:00 +0000 (03:53 +0000)]
FileDescriptor.java (position): New private field.
* java/io/FileDescriptor.java (position): New private field.
* java/io/natFileDescriptorPosix.cc (write): Up position.
(setLength): Use and set position.
(seek): Set position.
(getFilePointer): Return position.
(read): Up position.
Mark Wielaard [Sat, 4 Jan 2003 03:44:07 +0000 (03:44 +0000)]
Merge with Classpath:
* java/io/ObjectStreamClass.java (lookup): Split method and call
lookupForClassObject().
(lookupForClassObject): New method.
(isProxyClass): New field.
(setClass): Set isProxyClass, add object to classLookupTable, set
superClass and calculateOffsets.
(ObjectStreamClass): Set isProxyClass. Only set uid when Serializable
and not a proxy class.
(setFields): Set accessible true for serialPersistentFields.
(getClassUID): Same for suid. And check if suid is of type long.
(hasClassInitializer): Don't throw NoSuchMethodError.
Toon Moene [Fri, 3 Jan 2003 22:02:29 +0000 (22:02 +0000)]
stc.c (ffestc_R810): Allow any kind integer in case statements.
2003-01-03 Bud Davis <bdavis11@directvinternet.com>
* stc.c (ffestc_R810): Allow any kind integer in
case statements.
* ste.c (ffeste_R810): Give error message when
case selector exceeds its valid values.
Matt Austern [Fri, 3 Jan 2003 19:48:55 +0000 (19:48 +0000)]
cp-tree.h (struct lang_type_class): add field for key method
* cp-tree.h (struct lang_type_class): add field for key method
(cp_global_trees): rename dynamic_classes to keyed_classes
(key_method): add definition
* class.c (finish_struct_1): compute class's key method, and add
the class to keyed_classes list if there is no key method.
* decl.c (finish_function): add class to keyed_classes list if we
see a definition of the class's key method.
* pt.c (instantiate_class_template): add template specialization
of a dynamic class to keyed_classes list.
* decl2.c (key_method): remove
(finish_file): iterate only through keyed_classes list when
deciding whether to emit vtables, remove class from its list after
we do the emission.
Jason Merrill [Fri, 3 Jan 2003 19:29:51 +0000 (14:29 -0500)]
c-common.c (finish_fname_decls): Put the DECL_STMTs inside the outermost scope.
* c-common.c (finish_fname_decls): Put the DECL_STMTs inside the
outermost scope.
* c-decl.c (c_make_fname_decl): Push the decls there, too.
cp/
* decl.c (cp_make_fname_decl): Push the decls inside the
outermost scope.
* gnu/gcj/protocol/http/Connection.java (proxyPort, proxyInUse,
proxyHost): New static fields.
(<clinit>): Initialize new fields.
(connect): Use proxy if necessary.
(usingProxy): Implement.
* java/util/TreeMap.java (fabricateTree): Fix off-by-one error.
(TreeIterator.remove): Prefer IllegalStateException over
ConcurrentModificationException, to match Sun.
Kazu Hirata [Fri, 3 Jan 2003 16:44:55 +0000 (16:44 +0000)]
h8300-protos.h: Add a prototype for h8300_current_function_interrupt_function_p.
* config/h8300/h8300-protos.h: Add a prototype for
h8300_current_function_interrupt_function_p.
* config/h8300/h8300.c (interrupt_handler): Remove.
(os_task): Likewise.
(monitor): Likewise.
(pragma_interrupt): New.
(WORD_REG_USED): Use
h8300_current_function_interrupt_function_p.
(dosize): Likewise.
(h8300_output_function_prologue): Likewise.
Do not set interrupt_handler, os_task, monitor.
(h8300_output_function_prologue): Use
h8300_current_function_interrupt_function_p.
Do not set interrupt_handler, os_task, monitor.
(h8300_current_function_interrupt_function_p): New.
(h8300_pr_interrupt): Set pragma_interrupt.
(h8300_insert_attributes): Reset pragma_interrupt.
Mark Wielaard [Fri, 3 Jan 2003 00:49:31 +0000 (00:49 +0000)]
HttpURLConnection.java (HTTP_NOT_IMPLEMENTED): Must be public.
* java/net/HttpURLConnection.java (HTTP_NOT_IMPLEMENTED): Must be
public.
(HTTP_USE_PROXY): Add field.
(getResponseVals): Only set responseCode when not yet explicitly
set by subclass.
Jason Merrill [Thu, 2 Jan 2003 22:48:21 +0000 (17:48 -0500)]
atomicity.h (__exchange_and_add, [...]): *__mem is also an output.
* config/cpu/i486/atomicity.h (__exchange_and_add, __atomic_add):
*__mem is also an output.
* config/cpu/m68k/atomicity.h (__exchange_and_add): Likewise.
* java/util/zip/ZipFile.java (entries): Now HashMap.
(readLeShort(DataInput, byte[])): Read from given byte array.
(readLeInt(DataInput, byte[]): Likewise.
(readLeShort(byte[] b, int off)): New method.
(readLeInt(byte[] b, int off)): Likewise.
(readEntries): Use byte arrays to read info in bigger chunks.
(getEntries): Return HashMap.
(getEntry): Use HashMap.
(locBuf): New private field.
(checkLocalHeader): Use locBuf to read info in one chunk.
(getInputStream): Use entries HashMap, wrap PartialInputStream
in BufferedInputStream.
(ZipEntryEnumeration): Use HashMap and Interator.
Co-Authored-By: Mark Wielaard <mark@klomp.org>
From-SVN: r60803
Mark Mitchell [Thu, 2 Jan 2003 19:45:12 +0000 (19:45 +0000)]
parser.c (cp_lexer_next_token_is): Declare it inline.
* parser.c (cp_lexer_next_token_is): Declare it inline.
(cp_lexer_set_source_position_from_token): Likewise.
(cp_lexer_debugging_p): Likewise.
(cp_parser_parsing_tentatively): Likewise.
(cp_parser_nested_name_specifier_opt): Reduce the number of calls
to the cp_lexer_peek_token.
Kazu Hirata [Thu, 2 Jan 2003 14:59:30 +0000 (14:59 +0000)]
h8300.c (stack_pointer_operand): New.
* config/h8300/h8300.c (stack_pointer_operand): New.
(const_int_gt_2_operand): Likewise.
(const_int_ge_8_operand): Likewise.
* config/h8300/h8300.md (a splitter): Likewise.
(a peephole2): Likewise.
* config/h8300/h8300-protos.h: Add prototypes for the new
functions above.