Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
e0662f63
Commit
e0662f63
authored
Feb 17, 2003
by
Götz Lindenmaier
Browse files
Changes semantics of method types and method calls. Now call by value is possible
for compound types. [r793]
parent
1dd3b381
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/ir/irnode.h
View file @
e0662f63
...
...
@@ -593,6 +593,7 @@ ir_node *get_fragile_op_mem(ir_node *node);
#define DDME(X) xprintf("%s(l.%i) %I: %p\n", __FILE__, __LINE__, get_entity_ident(X), (X))
#define DDMG(X) xprintf("%s(l.%i) %I: %p\n", __FILE__, __LINE__, get_irg_ent(get_entity_ident(X)), (X))
#define DDMI(X) xprintf("%s(l.%i) %I: %p\n", __FILE__, __LINE__, (X), (X))
#define DDMM(X) xprintf("%s(l.%i) %I: %p\n", __FILE__, __LINE__, get_mode_ident(X), (X))
#endif
/* __GNUC__ */
/*@}*/
/* Macros for debug.. */
...
...
ir/ir/irvrfy.c
View file @
e0662f63
...
...
@@ -111,6 +111,8 @@ vrfy_Proj_proj(ir_node *p) {
mt
=
get_entity_type
(
get_irg_ent
(
current_ir_graph
));
assert
(
proj
<
get_method_n_params
(
mt
)
&&
"More Projs for args than args in type"
);
if
((
mode
==
mode_P
)
&&
is_compound_type
(
get_method_param_type
(
mt
,
proj
)))
/* value argument */
break
;
assert
(
mode
==
get_type_mode
(
get_method_param_type
(
mt
,
proj
))
&&
"Mode of Proj from Start doesn't match mode of param type."
);
}
break
;
...
...
@@ -120,6 +122,8 @@ vrfy_Proj_proj(ir_node *p) {
mt
=
get_Call_type
(
pred
);
assert
(
proj
<
get_method_n_ress
(
mt
)
&&
"More Projs for results than results in type."
);
if
((
mode
==
mode_P
)
&&
is_compound_type
(
get_method_res_type
(
mt
,
proj
)))
/* value result */
break
;
assert
(
mode
==
get_type_mode
(
get_method_res_type
(
mt
,
proj
))
&&
"Mode of Proj from Call doesn't match mode of result type."
);
}
break
;
...
...
@@ -291,7 +295,7 @@ irn_vrfy (ir_node *n)
assert
(
/* common Add: BB x num x num --> num */
((
mymode
==
op1mode
&&
mymode
==
op2mode
&&
mode_is_num
(
mymode
))
&&
(
mode_is_num
(
mymode
)
||
mymode
==
mode_P
)
)
||
/* Pointer Add: BB x P x Is --> P */
(
op1mode
==
mode_P
&&
op2mode
==
mode_Is
&&
mymode
==
mode_P
)
||
/* Pointer Add: BB x Is x P --> P */
...
...
Write
Preview
Supports
Markdown
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