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
f8627e64
Commit
f8627e64
authored
Mar 19, 2002
by
Götz Lindenmaier
Browse files
*** empty log message ***
[r339]
parent
a97d5ade
Changes
5
Hide whitespace changes
Inline
Side-by-side
ir/ir/irprog.c
View file @
f8627e64
...
...
@@ -40,7 +40,7 @@ ir_prog *new_ir_prog (void) {
res
->
types
=
NEW_ARR_F
(
type
*
,
1
);
res
->
glob_type
=
new_type_class
(
id_from_str
(
GLOBAL_TYPE_NAME
,
strlen
(
GLOBAL_TYPE_NAME
)));
add_irp_type
(
(
type
*
)
res
->
glob_type
);
add_irp_type
(
res
->
glob_type
);
res
->
const_code_irg
=
new_const_code_irg
();
...
...
ir/tr/entity.c
View file @
f8627e64
...
...
@@ -410,6 +410,7 @@ set_entity_irg(entity *ent, ir_graph *irg) {
assert
(
ent
&&
ent
->
type
);
assert
(
irg
);
assert
(
is_method_type
(
ent
->
type
));
assert
(
ent
->
peculiarity
==
existent
);
ent
->
irg
=
irg
;
}
...
...
ir/tr/entity.h
View file @
f8627e64
...
...
@@ -246,7 +246,9 @@ void* get_entity_link(entity *ent);
void
set_entity_link
(
entity
*
ent
,
void
*
l
);
/* The entity knows the corresponding irg if the entity is a method.
This allows to get from a Call to the called irg. */
This allows to get from a Call to the called irg.
Only entities of peculiarity "existent" can have a corresponding irg,
else the field is fixed to NULL. (Get returns NULL, set asserts.) */
ir_graph
*
get_entity_irg
(
entity
*
ent
);
void
set_entity_irg
(
entity
*
ent
,
ir_graph
*
irg
);
...
...
ir/tr/entity_t.h
View file @
f8627e64
/*
/*
10 2002/03/19 13:08:33
** Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
** All rights reserved.
**
...
...
@@ -64,12 +64,10 @@ struct entity {
void
*
link
;
/* To store some intermediate information */
unsigned
long
visit
;
/* visited counter for walks of the type information */
/* for methods */
enum
peculiarity
peculiarity
;
ir_graph
*
irg
;
/* If (type == method_type) this is the corresponding irg.
The ir_graph constructor automatically sets this field.
@@@ Does this go here, or should it be in type_method,
or should Call have an attribute ent??
Yes, it must be here. */
peculiarity
peculiarity
;
};
...
...
ir/tr/type.h
View file @
f8627e64
/****h* libfirm/type
/****h* libfirm/type
6 2002/03/19 13:08:33
*
* NAME
* file type.h - datastructure to hold type information.
...
...
@@ -270,7 +270,7 @@ void set_class_supertype (type *clss, type *supertype, int pos);
void
remove_class_supertype
(
type
*
clss
,
type
*
supertype
);
/* This enumeration flags the peculiarity of entities and types. */
typedef
enum
{
typedef
enum
peculiarity
{
description
,
/* Represents only a description. The entity/type is never
allocated, no code/data exists for this entity/type. */
existent
/* The entity/type (can) exist. */
...
...
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