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
5379d640
Commit
5379d640
authored
Nov 20, 2003
by
Götz Lindenmaier
Browse files
new accesss routines
[r2065]
parent
fb95da51
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/tr/type.c
View file @
5379d640
...
...
@@ -745,6 +745,14 @@ void remove_class_supertype(type *clss, type *supertype) {
}
}
char
*
get_peculiarity_string
(
peculiarity
p
)
{
if
(
p
==
peculiarity_description
)
return
"peculiarity_description"
;
if
(
p
==
peculiarity_inherited
)
return
"peculiarity_inherited"
;
return
"peculiarity_existent"
;
}
INLINE
peculiarity
get_class_peculiarity
(
type
*
clss
)
{
assert
(
clss
&&
(
clss
->
type_op
==
type_class
));
return
clss
->
attr
.
ca
.
peculiarity
;
...
...
@@ -925,11 +933,18 @@ entity *get_method_value_param_ent(type *method, int pos) {
method
->
attr
.
ma
.
value_params
=
build_value_type
(
mangle_u
(
get_type_ident
(
method
),
value_params_suffix
),
get_method_n_params
(
method
),
method
->
attr
.
ma
.
param_type
);
assert
((
get_entity_type
(
get_struct_member
(
method
->
attr
.
ma
.
value_params
,
pos
))
!=
method
->
attr
.
ma
.
value_params
)
assert
((
get_entity_type
(
get_struct_member
(
method
->
attr
.
ma
.
value_params
,
pos
))
!=
method
->
attr
.
ma
.
value_params
)
&&
"param type not yet set"
);
return
get_struct_member
(
method
->
attr
.
ma
.
value_params
,
pos
);
}
type
*
get_method_value_res_type
(
type
*
method
)
{
assert
(
method
&&
(
method
->
type_op
==
type_method
));
return
method
->
attr
.
ma
.
value_params
;
}
int
get_method_n_ress
(
type
*
method
)
{
assert
(
method
&&
(
method
->
type_op
==
type_method
));
return
method
->
attr
.
ma
.
n_res
;
...
...
ir/tr/type.h
View file @
5379d640
...
...
@@ -408,9 +408,11 @@ typedef enum peculiarity {
Overwrites must refer to at least one other
entity. If this is a method entity there exists
no irg for this entity, only for one of the
overwritten ones. */
overwritten ones.
Only for entity. */
peculiarity_existent
/**< The entity/type (can) exist. */
}
peculiarity
;
char
*
get_peculiarity_string
(
peculiarity
p
);
/* The peculiarity of the class. The enumeration peculiarity is defined
in entity.h */
...
...
@@ -546,6 +548,9 @@ void set_method_res_type(type *method, int pos, type* tp);
/* Returns an entity that represents the copied value result. Only necessary
for compounds passed by value. This information is constructed only on demand. */
entity
*
get_method_value_res_ent
(
type
*
method
,
int
pos
);
/*
*/
type
*
get_method_value_res_type
(
type
*
method
);
/**
* this enum flags the variadicity of methods (methods with a
...
...
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