PIPS
alias_private.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "genC.h"
#include "alias_private.h"
+ Include dependency graph for alias_private.c:

Go to the source code of this file.

Functions

alias_associations copy_alias_associations (alias_associations p)
 ALIAS_ASSOCIATIONS. More...
 
void free_alias_associations (alias_associations p)
 
alias_associations check_alias_associations (alias_associations p)
 
bool alias_associations_consistent_p (alias_associations p)
 
bool alias_associations_defined_p (alias_associations p)
 
list gen_alias_associations_cons (alias_associations p, list l)
 
void alias_associations_assign_contents (alias_associations r, alias_associations v)
 
void alias_associations_non_recursive_free (alias_associations p)
 
void write_alias_associations (FILE *f, alias_associations p)
 
alias_associations read_alias_associations (FILE *f)
 
alias_associations make_alias_associations (list a)
 
alias_association copy_alias_association (alias_association p)
 ALIAS_ASSOCIATION. More...
 
void free_alias_association (alias_association p)
 
alias_association check_alias_association (alias_association p)
 
bool alias_association_consistent_p (alias_association p)
 
bool alias_association_defined_p (alias_association p)
 
list gen_alias_association_cons (alias_association p, list l)
 
void alias_association_assign_contents (alias_association r, alias_association v)
 
void alias_association_non_recursive_free (alias_association p)
 
void write_alias_association (FILE *f, alias_association p)
 
alias_association read_alias_association (FILE *f)
 
alias_association make_alias_association (entity a1, entity a2, expression a3, intptr_t a4, intptr_t a5, list a6)
 
call_site copy_call_site (call_site p)
 CALL_SITE. More...
 
void free_call_site (call_site p)
 
call_site check_call_site (call_site p)
 
bool call_site_consistent_p (call_site p)
 
bool call_site_defined_p (call_site p)
 
list gen_call_site_cons (call_site p, list l)
 
void call_site_assign_contents (call_site r, call_site v)
 
void call_site_non_recursive_free (call_site p)
 
void write_call_site (FILE *f, call_site p)
 
call_site read_call_site (FILE *f)
 
call_site make_call_site (entity a1, intptr_t a2)
 
dynamic_check copy_dynamic_check (dynamic_check p)
 DYNAMIC_CHECK. More...
 
void free_dynamic_check (dynamic_check p)
 
dynamic_check check_dynamic_check (dynamic_check p)
 
bool dynamic_check_consistent_p (dynamic_check p)
 
bool dynamic_check_defined_p (dynamic_check p)
 
list gen_dynamic_check_cons (dynamic_check p, list l)
 
void dynamic_check_assign_contents (dynamic_check r, dynamic_check v)
 
void dynamic_check_non_recursive_free (dynamic_check p)
 
void write_dynamic_check (FILE *f, dynamic_check p)
 
dynamic_check read_dynamic_check (FILE *f)
 
dynamic_check make_dynamic_check (entity a1, entity a2, bool a3)
 

Function Documentation

◆ alias_association_assign_contents()

void alias_association_assign_contents ( alias_association  r,
alias_association  v 
)

Definition at line 77 of file alias_private.c.

77  {
80  message_assert("defined references to domain alias_association",
82  memcpy(r, v, sizeof(struct _newgen_struct_alias_association_));
83 }
alias_association check_alias_association(alias_association p)
Definition: alias_private.c:64
bool alias_association_defined_p(alias_association p)
Definition: alias_private.c:71
#define message_assert(msg, ex)
Definition: newgen_assert.h:47

References alias_association_defined_p(), check_alias_association(), and message_assert.

+ Here is the call graph for this function:

◆ alias_association_consistent_p()

bool alias_association_consistent_p ( alias_association  p)

Definition at line 67 of file alias_private.c.

67  {
69  return gen_consistent_p((gen_chunk*) p);
70 }
int gen_consistent_p(gen_chunk *obj)
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ.
Definition: genClib.c:2398
A gen_chunk is used to store every object.
Definition: genC.h:58

References check_alias_association(), and gen_consistent_p().

+ Here is the call graph for this function:

◆ alias_association_defined_p()

bool alias_association_defined_p ( alias_association  p)

Definition at line 71 of file alias_private.c.

71  {
72  return gen_defined_p((gen_chunk*) p);
73 }
int gen_defined_p(gen_chunk *obj)
Definition: genClib.c:2438

References gen_defined_p().

+ Here is the call graph for this function:

◆ alias_association_non_recursive_free()

void alias_association_non_recursive_free ( alias_association  p)

Definition at line 84 of file alias_private.c.

84  {
85  // should clear up contents...
86  free(p);
87 }
void free(void *)

References free().

+ Here is the call graph for this function:

◆ alias_associations_assign_contents()

void alias_associations_assign_contents ( alias_associations  r,
alias_associations  v 
)

Definition at line 35 of file alias_private.c.

35  {
38  message_assert("defined references to domain alias_associations",
40  memcpy(r, v, sizeof(struct _newgen_struct_alias_associations_));
41 }
alias_associations check_alias_associations(alias_associations p)
Definition: alias_private.c:22
bool alias_associations_defined_p(alias_associations p)
Definition: alias_private.c:29

References alias_associations_defined_p(), check_alias_associations(), and message_assert.

+ Here is the call graph for this function:

◆ alias_associations_consistent_p()

bool alias_associations_consistent_p ( alias_associations  p)

Definition at line 25 of file alias_private.c.

25  {
27  return gen_consistent_p((gen_chunk*) p);
28 }

References check_alias_associations(), and gen_consistent_p().

+ Here is the call graph for this function:

◆ alias_associations_defined_p()

bool alias_associations_defined_p ( alias_associations  p)

Definition at line 29 of file alias_private.c.

29  {
30  return gen_defined_p((gen_chunk*) p);
31 }

References gen_defined_p().

+ Here is the call graph for this function:

◆ alias_associations_non_recursive_free()

void alias_associations_non_recursive_free ( alias_associations  p)

Definition at line 42 of file alias_private.c.

42  {
43  // should clear up contents...
44  free(p);
45 }

References free().

+ Here is the call graph for this function:

◆ call_site_assign_contents()

void call_site_assign_contents ( call_site  r,
call_site  v 
)

Definition at line 119 of file alias_private.c.

119  {
120  check_call_site(r);
121  check_call_site(v);
122  message_assert("defined references to domain call_site",
124  memcpy(r, v, sizeof(struct _newgen_struct_call_site_));
125 }
call_site check_call_site(call_site p)
bool call_site_defined_p(call_site p)

References call_site_defined_p(), check_call_site(), and message_assert.

+ Here is the call graph for this function:

◆ call_site_consistent_p()

bool call_site_consistent_p ( call_site  p)

Definition at line 109 of file alias_private.c.

109  {
110  check_call_site(p);
111  return gen_consistent_p((gen_chunk*) p);
112 }

References check_call_site(), and gen_consistent_p().

+ Here is the call graph for this function:

◆ call_site_defined_p()

bool call_site_defined_p ( call_site  p)

Definition at line 113 of file alias_private.c.

113  {
114  return gen_defined_p((gen_chunk*) p);
115 }

References gen_defined_p().

+ Here is the call graph for this function:

◆ call_site_non_recursive_free()

void call_site_non_recursive_free ( call_site  p)

Definition at line 126 of file alias_private.c.

126  {
127  // should clear up contents...
128  free(p);
129 }

References free().

+ Here is the call graph for this function:

◆ check_alias_association()

alias_association check_alias_association ( alias_association  p)

Definition at line 64 of file alias_private.c.

64  {
66 }
#define alias_association_domain
newgen_alias_associations_domain_defined
Definition: alias_private.h:32
gen_chunk * gen_check(gen_chunk *obj, int t)
GEN_CHECK checks that the gen_chunk received OBJ is of the appropriate TYPE.
Definition: genClib.c:2356

References alias_association_domain, and gen_check().

+ Here is the call graph for this function:

◆ check_alias_associations()

alias_associations check_alias_associations ( alias_associations  p)

Definition at line 22 of file alias_private.c.

22  {
24 }
#define alias_associations_domain
newgen_expression_domain_defined
Definition: alias_private.h:24

References alias_associations_domain, and gen_check().

+ Here is the call graph for this function:

◆ check_call_site()

call_site check_call_site ( call_site  p)

Definition at line 106 of file alias_private.c.

106  {
108 }
#define call_site_domain
newgen_alias_association_domain_defined
Definition: alias_private.h:40

References call_site_domain, and gen_check().

+ Here is the call graph for this function:

◆ check_dynamic_check()

dynamic_check check_dynamic_check ( dynamic_check  p)

Definition at line 148 of file alias_private.c.

148  {
150 }
#define dynamic_check_domain
newgen_call_site_domain_defined
Definition: alias_private.h:48

References dynamic_check_domain, and gen_check().

+ Here is the call graph for this function:

◆ copy_alias_association()

alias_association copy_alias_association ( alias_association  p)

ALIAS_ASSOCIATION.

Definition at line 58 of file alias_private.c.

58  {
60 }
gen_chunk * gen_copy_tree(gen_chunk *obj)
Definition: genClib.c:1429

References gen_copy_tree().

+ Here is the call graph for this function:

◆ copy_alias_associations()

alias_associations copy_alias_associations ( alias_associations  p)

ALIAS_ASSOCIATIONS.

Definition at line 16 of file alias_private.c.

16  {
18 }

References gen_copy_tree().

+ Here is the call graph for this function:

◆ copy_call_site()

call_site copy_call_site ( call_site  p)

CALL_SITE.

Definition at line 100 of file alias_private.c.

100  {
101  return (call_site) gen_copy_tree((gen_chunk*) p);
102 }

References gen_copy_tree().

+ Here is the call graph for this function:

◆ copy_dynamic_check()

dynamic_check copy_dynamic_check ( dynamic_check  p)

DYNAMIC_CHECK.

Definition at line 142 of file alias_private.c.

142  {
143  return (dynamic_check) gen_copy_tree((gen_chunk*) p);
144 }

References gen_copy_tree().

+ Here is the call graph for this function:

◆ dynamic_check_assign_contents()

void dynamic_check_assign_contents ( dynamic_check  r,
dynamic_check  v 
)

Definition at line 161 of file alias_private.c.

161  {
164  message_assert("defined references to domain dynamic_check",
166  memcpy(r, v, sizeof(struct _newgen_struct_dynamic_check_));
167 }
bool dynamic_check_defined_p(dynamic_check p)
dynamic_check check_dynamic_check(dynamic_check p)

References check_dynamic_check(), dynamic_check_defined_p(), and message_assert.

+ Here is the call graph for this function:

◆ dynamic_check_consistent_p()

bool dynamic_check_consistent_p ( dynamic_check  p)

Definition at line 151 of file alias_private.c.

151  {
153  return gen_consistent_p((gen_chunk*) p);
154 }

References check_dynamic_check(), and gen_consistent_p().

+ Here is the call graph for this function:

◆ dynamic_check_defined_p()

bool dynamic_check_defined_p ( dynamic_check  p)

Definition at line 155 of file alias_private.c.

155  {
156  return gen_defined_p((gen_chunk*) p);
157 }

References gen_defined_p().

+ Here is the call graph for this function:

◆ dynamic_check_non_recursive_free()

void dynamic_check_non_recursive_free ( dynamic_check  p)

Definition at line 168 of file alias_private.c.

168  {
169  // should clear up contents...
170  free(p);
171 }

References free().

+ Here is the call graph for this function:

◆ free_alias_association()

void free_alias_association ( alias_association  p)

Definition at line 61 of file alias_private.c.

61  {
62  gen_free((gen_chunk*) p);
63 }
void gen_free(gen_chunk *obj)
version without shared_pointers.
Definition: genClib.c:992

References gen_free().

+ Here is the call graph for this function:

◆ free_alias_associations()

void free_alias_associations ( alias_associations  p)

Definition at line 19 of file alias_private.c.

19  {
20  gen_free((gen_chunk*) p);
21 }

References gen_free().

+ Here is the call graph for this function:

◆ free_call_site()

void free_call_site ( call_site  p)

Definition at line 103 of file alias_private.c.

103  {
104  gen_free((gen_chunk*) p);
105 }

References gen_free().

+ Here is the call graph for this function:

◆ free_dynamic_check()

void free_dynamic_check ( dynamic_check  p)

Definition at line 145 of file alias_private.c.

145  {
146  gen_free((gen_chunk*) p);
147 }

References gen_free().

+ Here is the call graph for this function:

◆ gen_alias_association_cons()

list gen_alias_association_cons ( alias_association  p,
list  l 
)

Definition at line 74 of file alias_private.c.

74  {
76 }
#define ALIAS_ASSOCIATION_NEWGEN_DOMAIN
Definition: alias_private.h:35
list gen_typed_cons(_int type, const void *item, const list next)
CONS a list with minimal type checking this cannot be done within the CONS macro because possible fun...
Definition: list.c:900

References ALIAS_ASSOCIATION_NEWGEN_DOMAIN, and gen_typed_cons().

+ Here is the call graph for this function:

◆ gen_alias_associations_cons()

list gen_alias_associations_cons ( alias_associations  p,
list  l 
)

Definition at line 32 of file alias_private.c.

32  {
34 }
#define ALIAS_ASSOCIATIONS_NEWGEN_DOMAIN
Definition: alias_private.h:27

References ALIAS_ASSOCIATIONS_NEWGEN_DOMAIN, and gen_typed_cons().

+ Here is the call graph for this function:

◆ gen_call_site_cons()

list gen_call_site_cons ( call_site  p,
list  l 
)

Definition at line 116 of file alias_private.c.

116  {
118 }
#define CALL_SITE_NEWGEN_DOMAIN
Definition: alias_private.h:43

References CALL_SITE_NEWGEN_DOMAIN, and gen_typed_cons().

+ Here is the call graph for this function:

◆ gen_dynamic_check_cons()

list gen_dynamic_check_cons ( dynamic_check  p,
list  l 
)

Definition at line 158 of file alias_private.c.

158  {
160 }
#define DYNAMIC_CHECK_NEWGEN_DOMAIN
Definition: alias_private.h:51

References DYNAMIC_CHECK_NEWGEN_DOMAIN, and gen_typed_cons().

+ Here is the call graph for this function:

◆ make_alias_association()

alias_association make_alias_association ( entity  a1,
entity  a2,
expression  a3,
intptr_t  a4,
intptr_t  a5,
list  a6 
)

Definition at line 94 of file alias_private.c.

94  {
95  return (alias_association) gen_alloc(7*sizeof(gen_chunk), GEN_CHECK_ALLOC, alias_association_domain, a1, a2, a3, a4, a5, a6);
96 }
#define GEN_CHECK_ALLOC
Definition: genC.h:307
gen_chunk * gen_alloc(int size, int gen_check_p, int dom,...)
allocates something in newgen.
Definition: genClib.c:298

References alias_association_domain, gen_alloc(), and GEN_CHECK_ALLOC.

+ Here is the call graph for this function:

◆ make_alias_associations()

alias_associations make_alias_associations ( list  a)

Definition at line 52 of file alias_private.c.

References alias_associations_domain, gen_alloc(), and GEN_CHECK_ALLOC.

+ Here is the call graph for this function:

◆ make_call_site()

call_site make_call_site ( entity  a1,
intptr_t  a2 
)

Definition at line 136 of file alias_private.c.

136  {
137  return (call_site) gen_alloc(3*sizeof(gen_chunk), GEN_CHECK_ALLOC, call_site_domain, a1, a2);
138 }

References call_site_domain, gen_alloc(), and GEN_CHECK_ALLOC.

+ Here is the call graph for this function:

◆ make_dynamic_check()

dynamic_check make_dynamic_check ( entity  a1,
entity  a2,
bool  a3 
)

Definition at line 178 of file alias_private.c.

178  {
179  return (dynamic_check) gen_alloc(4*sizeof(gen_chunk), GEN_CHECK_ALLOC, dynamic_check_domain, a1, a2, a3);
180 }

References dynamic_check_domain, gen_alloc(), and GEN_CHECK_ALLOC.

+ Here is the call graph for this function:

◆ read_alias_association()

alias_association read_alias_association ( FILE *  f)

Definition at line 91 of file alias_private.c.

91  {
92  return (alias_association) gen_read(f);
93 }
gen_chunk * gen_read(FILE *file)
GEN_READ reads any object from the FILE stream.
Definition: genClib.c:2323
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15

References f(), and gen_read().

+ Here is the call graph for this function:

◆ read_alias_associations()

alias_associations read_alias_associations ( FILE *  f)

Definition at line 49 of file alias_private.c.

49  {
50  return (alias_associations) gen_read(f);
51 }

References f(), and gen_read().

+ Here is the call graph for this function:

◆ read_call_site()

call_site read_call_site ( FILE *  f)

Definition at line 133 of file alias_private.c.

133  {
134  return (call_site) gen_read(f);
135 }

References f(), and gen_read().

+ Here is the call graph for this function:

◆ read_dynamic_check()

dynamic_check read_dynamic_check ( FILE *  f)

Definition at line 175 of file alias_private.c.

175  {
176  return (dynamic_check) gen_read(f);
177 }

References f(), and gen_read().

+ Here is the call graph for this function:

◆ write_alias_association()

void write_alias_association ( FILE *  f,
alias_association  p 
)

Definition at line 88 of file alias_private.c.

88  {
89  gen_write(f, (gen_chunk*) p);
90 }
void gen_write(FILE *fd, gen_chunk *obj)
GEN_WRITE writes the OBJect on the stream FD.
Definition: genClib.c:1745

References f(), and gen_write().

+ Here is the call graph for this function:

◆ write_alias_associations()

void write_alias_associations ( FILE *  f,
alias_associations  p 
)

Definition at line 46 of file alias_private.c.

46  {
47  gen_write(f, (gen_chunk*) p);
48 }

References f(), and gen_write().

+ Here is the call graph for this function:

◆ write_call_site()

void write_call_site ( FILE *  f,
call_site  p 
)

Definition at line 130 of file alias_private.c.

130  {
131  gen_write(f, (gen_chunk*) p);
132 }

References f(), and gen_write().

+ Here is the call graph for this function:

◆ write_dynamic_check()

void write_dynamic_check ( FILE *  f,
dynamic_check  p 
)

Definition at line 172 of file alias_private.c.

172  {
173  gen_write(f, (gen_chunk*) p);
174 }

References f(), and gen_write().

+ Here is the call graph for this function: