* cppexp.c: Don't include cpphash.h.
(parse_charconst, cpp_lex): Use cpp_defined.
(cpp_lex): Use get_directive_token throughout. Remove
unnecessary cases from switch. Move assertion-handling code
down to OTHER case.
(cpp_parse_expr): If we see '+' or '-', check the context to
determine if they are unary or binary operators. Streamline
the jumps a bit. Do not call skip_rest_of_line.
* cpplib.c: Make skip_rest_of_line and cpp_skip_hspace
static. Export get_directive_token. Update commentary.
(cpp_defined): New function.
(do_define): Remove reference to T_PCSTRING. Call
free_definition to release memory for old definition, when
redefining a macro.
(eval_if_expression): Set only_seen_white to 0 before calling
cpp_parse_expr. Call skip_rest_of_line after it returns.
(cpp_read_check_assertion): Don't preserve a pointer into the
token buffer across a call to cpp_get_token.
* Makefile.in (cppexp.o): Don't depend on cpphash.h.
* cppfiles.c (redundant_include_p): Use cpp_defined.
* cpphash.c (free_definition): New function.
(delete_macro): Use it. Update commentary.
* cpphash.h: Typedef HASHNODE here. Prototype cpp_lookup and
free_definition.
* cpplib.h: Don't typedef HASHNODE here. Delete T_PCSTRING
from enum node_type. Prototype cpp_defined and get_directive_token.
Don't prototype cpp_lookup, skip_rest_of_line, or cpp_skip_hspace.
* fix-header.c (check_macro_names): Use cpp_defined.
(read_scan_file): Set inhibit_warnings and inhibit_errors in
the options structure.
From-SVN: r31908
* include/jni.h (JNI_FALSE): Renamed from JNI_TRUE; oops.
(jboolean): Declare as an attributed int, not a bool.
(_Jv_func): Declare differently for C.
From-SVN: r31907
* gnu/gcj/jni/natNativeThread.cc: New file.
* gnu/gcj/jni/NativeThread.java: New file.
* java/lang/Thread.java (data): Now a RawData.
* include/jvm.h (_Jv_GetCurrentJNIEnv, _Jv_SetCurrentJNIEnv):
Declare.
* Makefile.in: Rebuilt.
* Makefile.am (java/lang/Thread.h): New target.
(ordinary_java_source_files): Added NativeThread.java.
(nat_source_files): Added natNativeThread.cc.
* java/lang/natThread.cc: Include <jni.h>
(struct natThread): Added `jni_env' field.
(_Jv_GetCurrentJNIEnv): New function.
(_Jv_SetCurrentJNIEnv): Likewise.
(initialize_native): Initialize jni_env.
Include RawData.h.
* jni.cc (ThreadGroupClass): New define.
(_Jv_JNI_InvokeFunctions): New structure.
(JNI_GetCreatedJavaVMs): New function.
(the_vm): New global.
(JNI_GetDefaultJavaVMInitArgs): New function.
Include NativeThread.h.
(NativeThreadClass): New define.
(_Jv_JNI_EnsureLocalCapacity): Return JNI_ERR, not -1.
(_Jv_JNI_DestroyJavaVM): New function.
(_Jv_JNI_AttachCurrentThread): New function.
(_Jv_JNI_DetachCurrentThread): New function.
(_Jv_JNI_GetEnv): New function.
(JNI_CreateJavaVM): New function.
(_Jv_JNI_GetJavaVM): New function.
(_Jv_JNIFunctions): Added entry for GetJavaVM.
* include/jni.h (JavaVMAttachArgs): New structure.
(JNI_EDETACHED): New define.
(JNI_EVERSION): Likewise.
(JavaVM): Define properly.
(struct JNIInvokeInterface): New structure.
(class _Jv_JavaVM): New class.
(JNI_OnLoad, JNI_OnUnload): Declare.
(JNI_GetDefaultJavaVMInitArgs, JNI_CreateJavaVM,
JNI_GetCreatedJavaVMs): Declare.
(JavaVMInitArgs): New typedef.
(JavaVMOption): Likewise.
(JNI_ERR): New define.
(JNI_OK): Likewise.
From-SVN: r31901
* function.c (assign_temp): Change zero-sized arrays to size 1.
* integrate.c (expand_inline_function): Do not update
stack_alignment_needed
* i386.c (compute_frame_size): Remove #ifdef PREFERRED_FRAME_BOUNDARY,
add some sanity checking, remove optimization for function with
zero frame size.
From-SVN: r31898
2000-02-10 Andrew Haley <aph@cygnus.com>
* interpret.cc: Don't include fdlibm.h.
Replace #if with #ifdef throughout.
Declare extern __ieee754_fmod.
(continue1): Remove op_getfield, op_getstatic, op_putfield,
op_putstatic insns.
* resolve.cc (_Jv_PrepareClass): Use imeth as method pointer.
Search class hierarchy for superclass vtable.
* java/lang/natClassLoader.cc (_Jv_UnregisterClass): Don't fall
off the end of a pointer list.
* java/lang/natThread.cc (stop): Don't abort, throw an exception
instead.
(suspend): Ditto.
From-SVN: r31897
* fixinc/server.c (load_data): Return NULL if the marker line is
not found.
(run_shell): If load_data returns NULL, retry the command once, in
a new shell.
From-SVN: r31894
* configure.in: Correct --help text for --with-dwarf2.
Put tm-dwarf2.h after other tm files, if it's requested.
* configure: Regenerate.
* config/tm-dwarf2.h: #undef PREFERRED_DEBUGGING_TYPE before
defining it.
From-SVN: r31883
* cpplib.h: Provide HASHNODE typedef and forward decl of
struct hashnode only. Kill cpp_hashnode typedef. MACRODEF,
DEFINITION, struct hashnode, struct macrodef, struct
definition, scan_decls prototype, default defn of
INCLUDE_LEN_FUDGE moved elsewhere.
* cpphash.h: MACRODEF, DEFINITION, struct macrodef, struct
definition, and struct hashnode moved here. Remove the unused
'predefined' field from struct definition. Replace the 'args'
union with its sole member. All users updated (cpphash.c).
Delete HASHSTEP and MAKE_POS macros, and hashf prototype. Add
multiple include guard.
* cpphash.c (hashf): Make static; use better algorithm; drop
HASHSIZE parameter; return an unsigned int.
(cpp_lookup): Drop HASH parameter. PFILE parameter is
used. Calculate HASHSIZE modulus here.
(cpp_install): Drop HASH parameter. Calculate HASHSIZE modulus
here.
(create_definition): Drop PREDEFINITION parameter.
* cpplib.c (do_define): Don't calculate a hash value here.
Don't pass (keyword == NULL) to create_definition.
* scan.h: Prototype scan_decls here.
* cppfiles.c: Move INCLUDE_LEN_FUDGE default defn here.
* cppexp.c, cppfiles.c, cppinit.c, cpplib.c, fix-header.c: All
callers of cpp_lookup and cpp_install updated.
From-SVN: r31881
* cpphash.c (macarg): Hoist all the flag diddling out of the
function...
(macroexpand): ... and out of the loop that calls macarg.
Skip over the initial paren before macro arguments with
cpp_get_non_space_token; point may be some distance before
that paren. Abort if it's not there.
* cpplib.c (parse_clear_mark): Delete function.
(parse_set_mark, parse_goto_mark): Make static.
(ACTIVE_MARK_P): New macro.
(skip_block_comment, skip_line_comment): Do not bump the line
if ACTIVE_MARK_P is true.
(cpp_pop_buffer): The buffer to be popped may not have an
active mark.
(cpp_get_token): When looking for the initial paren before
macro arguments, only set a mark in a file buffer, Always
return to that mark before proceeding to call macroexpand or
return a NAME token.
* cpplib.h: Remove prototypes of parse_set_mark,
parse_clear_mark, parse_goto_mark.
(struct cpp_options): Rename 'put_out_comments' to
'discard_comments' and invert its sense.
* cppinit.c, cpphash.c, cpplib.c: All users of
put_out_comments changed to use discard_comments, with
opposite sense.
From-SVN: r31879
* function.c (thread_prologue_and_epilogue_insns): Don't delete
the edge from a block that both jumps and falls through to the
fallthru block.
From-SVN: r31878
* gnu/gcj/convert/natIconv.cc (Input_iconv::finalize): Call
iconv_close when handle is not NULL. Thanks to Andrew Haley.
(Output_iconv::finalize): Likewise.
From-SVN: r31876
* cpplib.c (cpp_define, cpp_undef): Make sure the stacked buffer
ends with a newline and a NUL. Don't be so clever manipulating
strings.
From-SVN: r31864