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

Go to the source code of this file.

Functions

statement_task copy_statement_task (statement_task p)
 STATEMENT_TASK. More...
 
void free_statement_task (statement_task p)
 
statement_task check_statement_task (statement_task p)
 
bool statement_task_consistent_p (statement_task p)
 
bool statement_task_defined_p (statement_task p)
 
list gen_statement_task_cons (statement_task p, list l)
 
void statement_task_assign_contents (statement_task r, statement_task v)
 
void statement_task_non_recursive_free (statement_task p)
 
void write_statement_task (FILE *f, statement_task p)
 
statement_task read_statement_task (FILE *f)
 
statement_task make_statement_task (void)
 
task apply_statement_task (statement_task f, statement k)
 
void update_statement_task (statement_task f, statement k, task v)
 
void extend_statement_task (statement_task f, statement k, task v)
 
task delete_statement_task (statement_task f, statement k)
 
bool bound_statement_task_p (statement_task f, statement k)
 
task copy_task (task p)
 TASK. More...
 
void free_task (task p)
 
task check_task (task p)
 
bool task_consistent_p (task p)
 
bool task_defined_p (task p)
 
list gen_task_cons (task p, list l)
 
void task_assign_contents (task r, task v)
 
void task_non_recursive_free (task p)
 
void write_task (FILE *f, task p)
 
task read_task (FILE *f)
 
task make_task (intptr_t a1, list a2, intptr_t a3, bool a4)
 

Function Documentation

◆ apply_statement_task()

task apply_statement_task ( statement_task  f,
statement  k 
)

Definition at line 55 of file task_private.c.

55  {
56  return (task) (intptr_t)HASH_GET(p, p, statement_task_hash_table(f), k);
57 }
#define HASH_GET(start, image, h, k)
Definition: newgen_map.h:30
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15
#define intptr_t
Definition: stdint.in.h:294
#define statement_task_hash_table(x)
Definition: task_private.h:70

References f(), HASH_GET, intptr_t, and statement_task_hash_table.

+ Here is the call graph for this function:

◆ bound_statement_task_p()

bool bound_statement_task_p ( statement_task  f,
statement  k 
)

Definition at line 67 of file task_private.c.

67  {
69 }
#define HASH_BOUND_P(start, image, h, k)
Definition: newgen_map.h:32

References f(), HASH_BOUND_P, intptr_t, and statement_task_hash_table.

+ Here is the call graph for this function:

◆ check_statement_task()

statement_task check_statement_task ( statement_task  p)

Definition at line 22 of file task_private.c.

22  {
24 }
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
#define statement_task_domain
newgen_entity_domain_defined
Definition: task_private.h:24
A gen_chunk is used to store every object.
Definition: genC.h:58

References gen_check(), and statement_task_domain.

+ Here is the call graph for this function:

◆ check_task()

task check_task ( task  p)

Definition at line 79 of file task_private.c.

79  {
80  return (task) gen_check((gen_chunk*) p, task_domain);
81 }
#define task_domain
newgen_statement_task_domain_defined
Definition: task_private.h:32

References gen_check(), and task_domain.

+ Here is the call graph for this function:

◆ copy_statement_task()

statement_task copy_statement_task ( statement_task  p)

STATEMENT_TASK.

Definition at line 16 of file task_private.c.

16  {
17  return (statement_task) gen_copy_tree((gen_chunk*) p);
18 }
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_task()

task copy_task ( task  p)

TASK.

Definition at line 73 of file task_private.c.

73  {
74  return (task) gen_copy_tree((gen_chunk*) p);
75 }

References gen_copy_tree().

+ Here is the call graph for this function:

◆ delete_statement_task()

task delete_statement_task ( statement_task  f,
statement  k 
)

Definition at line 64 of file task_private.c.

64  {
66 }
#define HASH_DELETE(start, image, h, k)
Definition: newgen_map.h:38

References f(), HASH_DELETE, intptr_t, and statement_task_hash_table.

+ Here is the call graph for this function:

◆ extend_statement_task()

void extend_statement_task ( statement_task  f,
statement  k,
task  v 
)

Definition at line 61 of file task_private.c.

61  {
63 }
#define HASH_EXTEND(start, image, h, k, v)
Definition: newgen_map.h:36

References f(), HASH_EXTEND, intptr_t, and statement_task_hash_table.

+ Here is the call graph for this function:

◆ free_statement_task()

void free_statement_task ( statement_task  p)

Definition at line 19 of file task_private.c.

19  {
20  gen_free((gen_chunk*) p);
21 }
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_task()

void free_task ( task  p)

Definition at line 76 of file task_private.c.

76  {
77  gen_free((gen_chunk*) p);
78 }

References gen_free().

+ Here is the call graph for this function:

◆ gen_statement_task_cons()

list gen_statement_task_cons ( statement_task  p,
list  l 
)

Definition at line 32 of file task_private.c.

32  {
34 }
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
#define STATEMENT_TASK_NEWGEN_DOMAIN
Definition: task_private.h:27

References gen_typed_cons(), and STATEMENT_TASK_NEWGEN_DOMAIN.

+ Here is the call graph for this function:

◆ gen_task_cons()

list gen_task_cons ( task  p,
list  l 
)

Definition at line 89 of file task_private.c.

89  {
90  return gen_typed_cons(TASK_NEWGEN_DOMAIN, p, l);
91 }
#define TASK_NEWGEN_DOMAIN
Definition: task_private.h:35

References gen_typed_cons(), and TASK_NEWGEN_DOMAIN.

+ Here is the call graph for this function:

◆ make_statement_task()

statement_task make_statement_task ( void  )

Definition at line 52 of file task_private.c.

52  {
54 }
#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 gen_alloc(), GEN_CHECK_ALLOC, and statement_task_domain.

+ Here is the call graph for this function:

◆ make_task()

task make_task ( intptr_t  a1,
list  a2,
intptr_t  a3,
bool  a4 
)

Definition at line 109 of file task_private.c.

109  {
110  return (task) gen_alloc(5*sizeof(gen_chunk), GEN_CHECK_ALLOC, task_domain, a1, a2, a3, a4);
111 }

References gen_alloc(), GEN_CHECK_ALLOC, and task_domain.

+ Here is the call graph for this function:

◆ read_statement_task()

statement_task read_statement_task ( FILE *  f)

Definition at line 49 of file task_private.c.

49  {
50  return (statement_task) gen_read(f);
51 }
gen_chunk * gen_read(FILE *file)
GEN_READ reads any object from the FILE stream.
Definition: genClib.c:2323

References f(), and gen_read().

+ Here is the call graph for this function:

◆ read_task()

task read_task ( FILE *  f)

Definition at line 106 of file task_private.c.

106  {
107  return (task) gen_read(f);
108 }

References f(), and gen_read().

+ Here is the call graph for this function:

◆ statement_task_assign_contents()

void statement_task_assign_contents ( statement_task  r,
statement_task  v 
)

Definition at line 35 of file task_private.c.

35  {
38  message_assert("defined references to domain statement_task",
40  memcpy(r, v, sizeof(struct _newgen_struct_statement_task_));
41 }
statement_task check_statement_task(statement_task p)
Definition: task_private.c:22
bool statement_task_defined_p(statement_task p)
Definition: task_private.c:29
#define message_assert(msg, ex)
Definition: newgen_assert.h:47

References check_statement_task(), message_assert, and statement_task_defined_p().

+ Here is the call graph for this function:

◆ statement_task_consistent_p()

bool statement_task_consistent_p ( statement_task  p)

Definition at line 25 of file task_private.c.

25  {
27  return gen_consistent_p((gen_chunk*) p);
28 }
int gen_consistent_p(gen_chunk *obj)
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ.
Definition: genClib.c:2398

References check_statement_task(), and gen_consistent_p().

+ Here is the call graph for this function:

◆ statement_task_defined_p()

bool statement_task_defined_p ( statement_task  p)

Definition at line 29 of file task_private.c.

29  {
30  return gen_defined_p((gen_chunk*) p);
31 }
int gen_defined_p(gen_chunk *obj)
Definition: genClib.c:2438

References gen_defined_p().

+ Here is the call graph for this function:

◆ statement_task_non_recursive_free()

void statement_task_non_recursive_free ( statement_task  p)

Definition at line 42 of file task_private.c.

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

References free().

+ Here is the call graph for this function:

◆ task_assign_contents()

void task_assign_contents ( task  r,
task  v 
)

Definition at line 92 of file task_private.c.

92  {
93  check_task(r);
94  check_task(v);
95  message_assert("defined references to domain task",
97  memcpy(r, v, sizeof(struct _newgen_struct_task_));
98 }
bool task_defined_p(task p)
Definition: task_private.c:86
task check_task(task p)
Definition: task_private.c:79

References check_task(), message_assert, and task_defined_p().

+ Here is the call graph for this function:

◆ task_consistent_p()

bool task_consistent_p ( task  p)

Definition at line 82 of file task_private.c.

82  {
83  check_task(p);
84  return gen_consistent_p((gen_chunk*) p);
85 }

References check_task(), and gen_consistent_p().

+ Here is the call graph for this function:

◆ task_defined_p()

bool task_defined_p ( task  p)

Definition at line 86 of file task_private.c.

86  {
87  return gen_defined_p((gen_chunk*) p);
88 }

References gen_defined_p().

+ Here is the call graph for this function:

◆ task_non_recursive_free()

void task_non_recursive_free ( task  p)

Definition at line 99 of file task_private.c.

99  {
100  // should clear up contents...
101  free(p);
102 }

References free().

+ Here is the call graph for this function:

◆ update_statement_task()

void update_statement_task ( statement_task  f,
statement  k,
task  v 
)

Definition at line 58 of file task_private.c.

58  {
60 }
#define HASH_UPDATE(start, image, h, k, v)
Definition: newgen_map.h:34

References f(), HASH_UPDATE, intptr_t, and statement_task_hash_table.

+ Here is the call graph for this function:

◆ write_statement_task()

void write_statement_task ( FILE *  f,
statement_task  p 
)

Definition at line 46 of file task_private.c.

46  {
47  gen_write(f, (gen_chunk*) p);
48 }
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_task()

void write_task ( FILE *  f,
task  p 
)

Definition at line 103 of file task_private.c.

103  {
104  gen_write(f, (gen_chunk*) p);
105 }

References f(), and gen_write().

+ Here is the call graph for this function: