Commit 80d8e475 by Per Bothner

jcf-write.c (localvar_alloc): Only emit entry for LocalVariableTable if…

jcf-write.c (localvar_alloc): Only emit entry for LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.

 
	* jcf-write.c (localvar_alloc):  Only emit entry for
	LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
	(generate_bytecode_insns):  Only call put_linenumber if
	debug_info_level > DINFO_LEVEL_NONE.
	* jvspec.c (lang_specific_driver):  If no -O* or -g* option
	is specified, add -g1 (for compatibility wih javac).

From-SVN: r24963
parent 113f494f
...@@ -29,6 +29,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ ...@@ -29,6 +29,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "obstack.h" #include "obstack.h"
#undef AND #undef AND
#include "rtl.h" #include "rtl.h"
#include "flags.h"
#include "java-opcodes.h" #include "java-opcodes.h"
#include "parse.h" /* for BLOCK_EXPR_BODY */ #include "parse.h" /* for BLOCK_EXPR_BODY */
#include "buffer.h" #include "buffer.h"
...@@ -525,7 +526,8 @@ localvar_alloc (decl, state) ...@@ -525,7 +526,8 @@ localvar_alloc (decl, state)
info->decl = decl; info->decl = decl;
info->start_label = start_label; info->start_label = start_label;
if (DECL_NAME (decl) != NULL_TREE) if (debug_info_level > DINFO_LEVEL_TERSE
&& DECL_NAME (decl) != NULL_TREE)
{ {
/* Generate debugging info. */ /* Generate debugging info. */
info->next = NULL; info->next = NULL;
...@@ -1329,7 +1331,8 @@ generate_bytecode_insns (exp, target, state) ...@@ -1329,7 +1331,8 @@ generate_bytecode_insns (exp, target, state)
break; break;
input_filename = EXPR_WFL_FILENAME (exp); input_filename = EXPR_WFL_FILENAME (exp);
lineno = EXPR_WFL_LINENO (exp); lineno = EXPR_WFL_LINENO (exp);
if (EXPR_WFL_EMIT_LINE_NOTE (exp) && lineno > 0) if (EXPR_WFL_EMIT_LINE_NOTE (exp) && lineno > 0
&& debug_info_level > DINFO_LEVEL_NONE)
put_linenumber (lineno, state); put_linenumber (lineno, state);
generate_bytecode_insns (body, target, state); generate_bytecode_insns (body, target, state);
input_filename = saved_input_filename; input_filename = saved_input_filename;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment