pike.git/
src/
program.h
Branch:
Tag:
Non-build tags
All tags
No tags
1999-03-11
1999-03-11 22:59:21 by Henrik Grubbström (Grubba) <grubba@grubba.org>
d00c50254b9103ce1536126fab386138041855c7 (
11
lines) (+
6
/-
5
)
[
Show
|
Annotate
]
Branch:
7.9
Added some more debug_malloc_pass() stuff.
Rev: src/program.h:1.52
5:
\*/ /*
-
* $Id: program.h,v 1.
51
1999/
02
/
10
21
:
46
:
52
hubbe
Exp $
+
* $Id: program.h,v 1.
52
1999/
03
/
11
22
:
59
:
21
grubba
Exp $
*/ #ifndef PROGRAM_H #define PROGRAM_H
223:
INT16 lfuns[NUM_LFUNS]; };
-
#define INHERIT_FROM_PTR(P,X) ((P)->inherits + (X)->inherit_offset)
-
#define PROG_FROM_PTR(P,X) (INHERIT_FROM_PTR(P,X)->prog)
+
#define INHERIT_FROM_PTR(P,X) ((
debug_malloc_pass(
P)
)
->inherits + (
debug_malloc_pass(
X)
)
->inherit_offset)
+
#define PROG_FROM_PTR(P,X) (
debug_malloc_pass(
INHERIT_FROM_PTR(P,X)->prog)
)
#define ID_FROM_PTR(P,X) (PROG_FROM_PTR(P,X)->identifiers+(X)->identifier_offset) #define INHERIT_FROM_INT(P,X) INHERIT_FROM_PTR(P,(P)->identifier_references+(X)) #define PROG_FROM_INT(P,X) PROG_FROM_PTR(P,(P)->identifier_references+(X)) #define ID_FROM_INT(P,X) ID_FROM_PTR(P,(P)->identifier_references+(X))
-
#define FIND_LFUN(P,N) ((P)->flags & PROGRAM_FIXED?(P)->lfuns[(N)]:find_identifier(lfun_names[(N)],(P)))
+
#define FIND_LFUN(P,N) ((
debug_malloc_pass(
P)
)
->flags & PROGRAM_FIXED?(
debug_malloc_pass((
P)->lfuns[(N)]
))
:find_identifier(lfun_names[(N)],(P)))
#define free_program(p) do{ struct program *_=(p); debug_malloc_touch(_); if(!--_->refs) really_free_program(_); }while(0)
416:
#endif #ifdef DEBUG_MALLOC
-
#define end_program() ((struct program *)debug_malloc_
touch
(debug_end_program()))
+
#define end_program() ((struct program *)debug_malloc_
pass
(debug_end_program()))
#define end_class(NAME, FLAGS) do { debug_malloc_touch(new_program); debug_end_class(NAME, CONSTANT_STRLEN(NAME), FLAGS); }while(0) #else #define end_class(NAME,FLAGS) debug_end_class(NAME, CONSTANT_STRLEN(NAME), FLAGS) #define end_program debug_end_program #endif