Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
15fdcfe9
Commit
15fdcfe9
authored
Nov 12, 1998
by
Per Bothner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extensive changes.
� Extensive changes. See ChangeLog. From-SVN: r23621
parent
12472854
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
16 deletions
+52
-16
gcc/java/Make-lang.in
+1
-4
gcc/java/decl.c
+2
-0
gcc/java/expr.c
+42
-6
gcc/java/parse.h
+7
-6
gcc/java/parse.y
+0
-0
No files found.
gcc/java/Make-lang.in
View file @
15fdcfe9
...
...
@@ -191,16 +191,13 @@ java.install-info:
java.mostlyclean
:
-
rm
-f
java/
*
$(objext)
$(DEMANGLER_PROG)
# CYGNUS LOCAL - Delete these files here instead of in realclean because they
# are now created in the build subdirectories.
-rm
-f
java/parse.c
java/parse-scan.c
java/parse.output
java/y.tab.c
java.clean
:
java.distclean
:
-
rm
-f
java/config.status java/Makefile
-
rm
-f
java/parse.output
java.extraclean
:
java.maintainer-clean
:
-
rm
-f
java/parse.c java/parse-scan.c java/parse.output java/y.tab.c
# Stage hooks:
# The main makefile has already created stage?/java.
...
...
gcc/java/decl.c
View file @
15fdcfe9
...
...
@@ -431,6 +431,8 @@ init_decl_processing ()
TREE_TYPE
(
size_zero_node
)
=
sizetype
;
size_one_node
=
build_int_2
(
1
,
0
);
TREE_TYPE
(
size_one_node
)
=
sizetype
;
/* Used by the parser to represent empty statements and blocks. */
CAN_COMPLETE_NORMALLY
(
size_zero_node
)
=
1
;
byte_type_node
=
make_signed_type
(
8
);
pushdecl
(
build_decl
(
TYPE_DECL
,
get_identifier
(
"byte"
),
byte_type_node
));
...
...
gcc/java/expr.c
View file @
15fdcfe9
...
...
@@ -1337,9 +1337,7 @@ build_known_method_ref (method, method_type, self_type, method_signature, arg_li
tree
method
,
method_type
,
self_type
,
method_signature
,
arg_list
;
{
tree
func
;
if
(
flag_emit_class_files
)
return
method
;
else
if
(
is_compiled_class
(
self_type
))
if
(
is_compiled_class
(
self_type
))
{
make_decl_rtl
(
method
,
NULL
,
1
);
func
=
build1
(
ADDR_EXPR
,
method_ptr_type_node
,
method
);
...
...
@@ -1696,6 +1694,18 @@ load_type_state (label)
type_map
[
i
]
=
TREE_VEC_ELT
(
vec
,
i
);
}
/* Do the expansion of a Java switch. With Gcc, switches are front-end
dependant things, but they rely on gcc routines. This function is
placed here because it uses things defined locally in parse.y. */
static
tree
case_identity
(
t
,
v
)
tree
t
__attribute__
((
__unused__
));
tree
v
;
{
return
v
;
}
struct
rtx_def
*
java_lang_expand_expr
(
exp
,
target
,
tmode
,
modifier
)
register
tree
exp
;
...
...
@@ -1716,6 +1726,7 @@ java_lang_expand_expr (exp, target, tmode, modifier)
if
(
BLOCK_EXPR_BODY
(
exp
))
{
tree
local
;
tree
body
=
BLOCK_EXPR_BODY
(
exp
);
struct
rtx_def
*
to_return
;
pushlevel
(
2
);
/* 2 and above */
expand_start_bindings
(
0
);
...
...
@@ -1727,16 +1738,41 @@ java_lang_expand_expr (exp, target, tmode, modifier)
expand_decl
(
pushdecl
(
local
));
local
=
next
;
}
to_return
=
expand_expr
(
BLOCK_EXPR_BODY
(
exp
),
target
,
tmode
,
modifier
);
/* Avoid deep recursion for long block. */
while
(
TREE_CODE
(
body
)
==
COMPOUND_EXPR
)
{
expand_expr
(
TREE_OPERAND
(
body
,
0
),
const0_rtx
,
VOIDmode
,
0
);
body
=
TREE_OPERAND
(
body
,
1
);
}
to_return
=
expand_expr
(
body
,
target
,
tmode
,
modifier
);
poplevel
(
1
,
1
,
0
);
expand_end_bindings
(
getdecls
(),
1
,
0
);
return
to_return
;
}
break
;
case
CASE_EXPR
:
{
tree
duplicate
;
if
(
pushcase
(
TREE_OPERAND
(
exp
,
0
),
case_identity
,
build_decl
(
LABEL_DECL
,
NULL_TREE
,
NULL_TREE
),
&
duplicate
)
==
2
)
{
EXPR_WFL_LINECOL
(
wfl_operator
)
=
EXPR_WFL_LINECOL
(
exp
);
parse_error_context
(
wfl_operator
,
"Duplicate case label: `%s'"
,
print_int_node
(
TREE_OPERAND
(
exp
,
0
)));
}
return
const0_rtx
;
}
case
DEFAULT_EXPR
:
pushcase
(
NULL_TREE
,
0
,
build_decl
(
LABEL_DECL
,
NULL_TREE
,
NULL_TREE
),
NULL
);
return
const0_rtx
;
case
SWITCH_EXPR
:
java_expand_switch
(
exp
);
expand_start_case
(
0
,
TREE_OPERAND
(
exp
,
0
),
int_type_node
,
"switch"
);
expand_expr_stmt
(
TREE_OPERAND
(
exp
,
1
));
expand_end_case
(
TREE_OPERAND
(
exp
,
0
));
return
const0_rtx
;
case
TRY_EXPR
:
...
...
gcc/java/parse.h
View file @
15fdcfe9
...
...
@@ -439,6 +439,9 @@ static jdeplist *reverse_jdep_list ();
#define BLOCK_EXPR_DECLS(NODE) BLOCK_VARS(NODE)
#define BLOCK_EXPR_BODY(NODE) BLOCK_SUBBLOCKS(NODE)
/* For an artificial BLOCK (created to house a local variable declaration not
at the start of an existing block), the parent block; otherwise NULL. */
#define BLOCK_EXPR_ORIGIN(NODE) BLOCK_ABSTRACT_ORIGIN(NODE)
/* Merge an other line to the source line number of a decl. Used to
...
...
@@ -601,7 +604,7 @@ struct parser_ctxt {
tree
import_list
;
/* List of import */
tree
import_demand_list
;
/* List of import on demand */
tree
current_loop
;
/* List of the currently nested loops */
tree
current_loop
;
/* List of the currently nested loops
/switches
*/
tree
current_labeled_block
;
/* List of currently nested
labeled blocks. */
...
...
@@ -618,7 +621,6 @@ struct parser_ctxt {
/* Functions declarations */
#ifndef JC1_LITE
static
char
*
java_accstring_lookup
PROTO
((
int
));
static
void
parse_error
PROTO
((
char
*
));
static
void
classitf_redefinition_error
PROTO
((
char
*
,
tree
,
tree
,
tree
));
static
void
variable_redefinition_error
PROTO
((
tree
,
tree
,
tree
,
int
));
static
void
check_modifiers
PROTO
((
char
*
,
int
,
int
));
...
...
@@ -637,9 +639,8 @@ static tree lookup_java_method2 PROTO ((tree, tree, int));
static
tree
method_header
PROTO
((
int
,
tree
,
tree
,
tree
));
static
void
fix_method_argument_names
PROTO
((
tree
,
tree
));
static
tree
method_declarator
PROTO
((
tree
,
tree
));
static
void
parse_error_context
VPROTO
((
tree
cl
,
char
*
msg
,
...));
static
void
parse_warning_context
VPROTO
((
tree
cl
,
char
*
msg
,
...));
static
void
issue_warning_error_from_context
PROTO
((
tree
,
char
*
msg
));
static
void
issue_warning_error_from_context
PROTO
((
tree
,
char
*
msg
,
va_list
));
static
tree
parse_jdk1_1_error
PROTO
((
char
*
));
static
void
complete_class_report_errors
PROTO
((
jdep
*
));
static
int
process_imports
PROTO
((
void
));
...
...
@@ -662,8 +663,8 @@ static tree resolve_expression_name PROTO ((tree, tree *));
static
tree
maybe_create_class_interface_decl
PROTO
((
tree
,
tree
,
tree
));
static
int
check_class_interface_creation
PROTO
((
int
,
int
,
tree
,
tree
,
tree
,
tree
));
static
tree
patch_method_invocation
_stmt
PROTO
((
tree
,
tree
,
tree
,
int
*
,
tree
*
,
int
));
static
tree
patch_method_invocation
PROTO
((
tree
,
tree
,
tree
,
int
*
,
tree
*
,
int
));
static
int
breakdown_qualified
PROTO
((
tree
*
,
tree
*
,
tree
));
static
tree
resolve_and_layout
PROTO
((
tree
,
tree
));
static
tree
resolve_no_layout
PROTO
((
tree
,
tree
));
...
...
gcc/java/parse.y
View file @
15fdcfe9
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment