projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Consider that unreachble blocks might have no bitinfo.
[libfirm]
/
ir
/
tr
/
typewalk.c
diff --git
a/ir/tr/typewalk.c
b/ir/tr/typewalk.c
index
7466b6e
..
b0725f3
100644
(file)
--- a/
ir/tr/typewalk.c
+++ b/
ir/tr/typewalk.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 1995-20
08
University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-20
11
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
*
* This file is part of libFirm.
*
@@
-90,7
+90,7
@@
static void do_type_walk(type_or_ent tore,
type_walk_func *post,
void *env)
{
type_walk_func *post,
void *env)
{
-
int
i, n_types, n_mem;
+
size_t
i, n_types, n_mem;
ir_entity *ent = NULL;
ir_type *tp = NULL;
ir_node *n;
ir_entity *ent = NULL;
ir_type *tp = NULL;
ir_node *n;
@@
-130,7
+130,7
@@
static void do_type_walk(type_or_ent tore,
if (ent->initializer != NULL) {
walk_initializer(ent->initializer, pre, post, env);
} else if (entity_has_compound_ent_values(ent)) {
if (ent->initializer != NULL) {
walk_initializer(ent->initializer, pre, post, env);
} else if (entity_has_compound_ent_values(ent)) {
- n_mem = get_compound_ent_n_values(ent);
+
size_t i,
n_mem = get_compound_ent_n_values(ent);
for (i = 0; i < n_mem; ++i) {
n = get_compound_ent_value(ent, i);
irn_type_walker(n, pre, post, env);
for (i = 0; i < n_mem; ++i) {
n = get_compound_ent_value(ent, i);
irn_type_walker(n, pre, post, env);
@@
-245,7
+245,7
@@
static void irn_type_walker(
If so start a walk over that information. */
static void start_type_walk(ir_node *node, void *ctx)
{
If so start a walk over that information. */
static void start_type_walk(ir_node *node, void *ctx)
{
- type_walk_env *env = ctx;
+ type_walk_env *env =
(type_walk_env*)
ctx;
type_walk_func *pre;
type_walk_func *post;
void *envi;
type_walk_func *pre;
type_walk_func *post;
void *envi;
@@
-260,7
+260,7
@@
static void start_type_walk(ir_node *node, void *ctx)
/* walker: walks over all types */
void type_walk(type_walk_func *pre, type_walk_func *post, void *env)
{
/* walker: walks over all types */
void type_walk(type_walk_func *pre, type_walk_func *post, void *env)
{
-
int
i, n_types = get_irp_n_types();
+
size_t
i, n_types = get_irp_n_types();
type_or_ent cont;
irp_reserve_resources(irp, IR_RESOURCE_TYPE_VISITED);
type_or_ent cont;
irp_reserve_resources(irp, IR_RESOURCE_TYPE_VISITED);
@@
-276,7
+276,7
@@
void type_walk(type_walk_func *pre, type_walk_func *post, void *env)
void type_walk_prog(type_walk_func *pre, type_walk_func *post, void *env)
{
void type_walk_prog(type_walk_func *pre, type_walk_func *post, void *env)
{
-
in
t i, n_irgs = get_irp_n_irgs();
+
size_
t i, n_irgs = get_irp_n_irgs();
type_or_ent cont;
type_walk(pre, post, env);
type_or_ent cont;
type_walk(pre, post, env);
@@
-344,7
+344,6
@@
static void type_walk_s2s_2(type_or_ent tore,
void *env)
{
type_or_ent cont;
void *env)
{
type_or_ent cont;
- int i, n;
/* marked? */
switch (get_kind(tore.ent)) {
/* marked? */
switch (get_kind(tore.ent)) {
@@
-367,6
+366,8
@@
static void type_walk_s2s_2(type_or_ent tore,
switch (get_type_tpop_code(tp)) {
case tpo_class:
{
switch (get_type_tpop_code(tp)) {
case tpo_class:
{
+ size_t i, n;
+
n = get_class_n_supertypes(tp);
for (i = 0; i < n; ++i) {
cont.typ = get_class_supertype(tp, i);
n = get_class_n_supertypes(tp);
for (i = 0; i < n; ++i) {
cont.typ = get_class_supertype(tp, i);
@@
-415,7
+416,7
@@
void type_walk_super2sub(type_walk_func *pre,
void *env)
{
type_or_ent cont;
void *env)
{
type_or_ent cont;
-
int
i, n_types = get_irp_n_types();
+
size_t
i, n_types = get_irp_n_types();
irp_reserve_resources(irp, IR_RESOURCE_TYPE_VISITED);
inc_master_type_visited();
irp_reserve_resources(irp, IR_RESOURCE_TYPE_VISITED);
inc_master_type_visited();
@@
-434,7
+435,6
@@
static void type_walk_super_2(type_or_ent tore, type_walk_func *pre,
type_walk_func *post, void *env)
{
type_or_ent cont;
type_walk_func *post, void *env)
{
type_or_ent cont;
- int i, n;
/* marked? */
switch (get_kind(tore.ent)) {
/* marked? */
switch (get_kind(tore.ent)) {
@@
-459,6
+459,8
@@
static void type_walk_super_2(type_or_ent tore, type_walk_func *pre,
switch (get_type_tpop_code(tp)) {
case tpo_class:
{
switch (get_type_tpop_code(tp)) {
case tpo_class:
{
+ size_t i, n;
+
/* execute pre method */
if (pre)
pre(tore, env);
/* execute pre method */
if (pre)
pre(tore, env);
@@
-499,7
+501,7
@@
static void type_walk_super_2(type_or_ent tore, type_walk_func *pre,
void type_walk_super(type_walk_func *pre, type_walk_func *post, void *env)
{
void type_walk_super(type_walk_func *pre, type_walk_func *post, void *env)
{
-
int
i, n_types = get_irp_n_types();
+
size_t
i, n_types = get_irp_n_types();
type_or_ent cont;
irp_reserve_resources(irp, IR_RESOURCE_TYPE_VISITED);
type_or_ent cont;
irp_reserve_resources(irp, IR_RESOURCE_TYPE_VISITED);
@@
-519,7
+521,7
@@
void type_walk_super(type_walk_func *pre, type_walk_func *post, void *env)
static void class_walk_s2s_2(ir_type *tp, class_walk_func *pre,
class_walk_func *post, void *env)
{
static void class_walk_s2s_2(ir_type *tp, class_walk_func *pre,
class_walk_func *post, void *env)
{
-
in
t i, n;
+
size_
t i, n;
/* marked? */
if (type_visited(tp)) return;
/* marked? */
if (type_visited(tp)) return;
@@
-551,7
+553,7
@@
void class_walk_super2sub(class_walk_func *pre,
class_walk_func *post,
void *env)
{
class_walk_func *post,
void *env)
{
-
in
t i, n_types = get_irp_n_types();
+
size_
t i, n_types = get_irp_n_types();
ir_type *tp;
irp_reserve_resources(irp, IR_RESOURCE_TYPE_VISITED);
ir_type *tp;
irp_reserve_resources(irp, IR_RESOURCE_TYPE_VISITED);
@@
-575,7
+577,7
@@
void walk_types_entities(ir_type *tp,
entity_walk_func *doit,
void *env)
{
entity_walk_func *doit,
void *env)
{
-
in
t i, n;
+
size_
t i, n;
switch (get_type_tpop_code(tp)) {
case tpo_class:
switch (get_type_tpop_code(tp)) {
case tpo_class: