Commit 512afc22 authored by Götz Lindenmaier's avatar Götz Lindenmaier
Browse files

Some access routines for visited flags in entity.h, irnode.h,

  bug in oo_program_example.

[r291]
parent b4cfa9a1
20.12.2001 Goetz
Some access routines for visited flags in entity.h, irnode.h,
bug in oo_program_example.
17.12.2001 Boris
Removed all obsolete Makefiles
......
......@@ -47,7 +47,7 @@
/* If this and DEBUG_libfirm are defined irdump uses the nodeid numbers as
labels for the vcg nodes. This makes the vcg graph better readable.
Sometimes it's useful to see the pointer values, though. */
#define NODEID_AS_LABEL 0
#define NODEID_AS_LABEL 1
/* a list of firm kinds */
typedef enum {
......
......@@ -13,6 +13,11 @@
# include "irnode.h"
/* Exchanges two nodes by conserving edges leaving old (i.e., pointers
pointing to old). Turns the old node into an Id. Requires that
current_ir_graph is set properly. */
inline void exchange (ir_node *old, ir_node *new);
/* Turns a node into a "useless" Tuple. The Tuple node just forms a tuple
from several inputs. The predecessors of the tuple have to be
set by hand. The block predecessor automatically remains the same.
......@@ -20,11 +25,6 @@
extracting values from the tuple are not available. */
void turn_into_tuple (ir_node *node, int arity);
/* Exchanges two nodes by conserving edges leaving old (i.e., pointers
pointing to old). Turns the old node into an Id. Requires that
current_ir_graph is set properly. */
inline void exchange (ir_node *old, ir_node *new);
/* Walks over the passed ir graph and collects all Phi nodes as a
list built with the link field in their corresponding block.
Further it collects all Proj nodes in a list of the node producing
......
......@@ -58,7 +58,7 @@ int get_irn_arity (ir_node *node);
/* returns the array with the ins: */
inline ir_node **get_irn_in (ir_node *node);
/* Replaces the old in array by a new one that will contain the ins given in
the parameters. It copies the array passed.
the parameters. Conserves the block predecessor. It copies the array passed.
This function is necessary to ajust in arrays of blocks, calls and phis.
Assumes the current_ir_graph is set to the graph containing "node".
"in" must contain all predecessors except the block that are required for
......
......@@ -222,7 +222,7 @@ ir_graph *get_entity_irg(entity *ent);
void set_entity_irg(entity *ent, ir_graph *irg);
/* Returns true if the type of the entity is a primitive, pointern
/* Returns true if the type of the entity is a primitive, pointer
enumeration or method type. */
int is_atomic_entity(entity *ent);
/* Returns true if the type of the entity is a class, structure,
......
......@@ -40,6 +40,7 @@
# include "irprog.h"
# include "mangle.h"
# include "tv.h"
# include "ircons.h"
/*******************************************************************/
/** TYPE **/
......@@ -532,8 +533,8 @@ int get_array_n_dimensions (type *array) {
assert(array && (array->type_op == type_array));
return array->attr.aa.n_dimensions;
}
void set_array_bounds_int (type *array, int dimension, int lower_bound,
int upper_bound) {
void set_array_bounds_int (type *array, int dimension, int lower_bound,
int upper_bound) {
ir_graph *rem;
assert(array && (array->type_op == type_array));
rem = current_ir_graph;
......@@ -545,8 +546,8 @@ void set_array_bounds_int (type *array, int dimension, int lower_bound,
current_ir_graph = rem;
}
void set_array_bounds (type *array, int dimension, ir_node * lower_bound,
ir_node * upper_bound) {
void set_array_bounds (type *array, int dimension, ir_node * lower_bound,
ir_node * upper_bound) {
assert(array && (array->type_op == type_array));
array->attr.aa.lower_bound[dimension] = lower_bound;
array->attr.aa.upper_bound[dimension] = upper_bound;
......
......@@ -22,6 +22,7 @@
#include "irnode.h"
#include "irprog.h"
#include "type_or_entity.h"
#include "typegmod.h"
/* Make types visible to allow most efficient access */
#include "entity_t.h"
......
......@@ -35,12 +35,13 @@ void type_walk_irg(ir_graph *irg,
void (post)(type_or_ent*, void*),
void *env);
/** Walks over all type information reachable from global roots.
Touches every type and entity in specified order:
- first the super types
- second the type itself
- third the sub types. If new types/entities are created
/** Walks over all classes information reachable from global roots.
Touches every class in specified order:
- first the super class
- second the class itself
- third the sub classes. If new classes are created
during the traversal these will be visited, too. **/
/** @@@ shoulc be named class-walk **/
void type_walk_super2sub(void (pre)(type_or_ent*, void*),
void (post)(type_or_ent*, void*),
void *env);
......
......@@ -115,7 +115,7 @@ main(void)
obj_size = new_SymConst((type_or_id_p)class_prima, size);
obj_o = new_Alloc(get_store(), obj_size, class_prima, heap_alloc);
set_store(new_Proj(obj_o, mode_M, 0)); /* make the changed memory visible */
obj_o = new_Proj(obj_o, mode_p, 1); /* remember the pointer to the object */
obj_o = new_Proj(obj_o, mode_p, 2); /* remember the pointer to the object */
set_value(o_pos, obj_o);
/* Get the pointer to the procedure from the object. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment