pike.git/
src/
encode.c
Branch:
Tag:
Non-build tags
All tags
No tags
2005-05-31
2005-05-31 12:00:07 by Henrik Grubbström (Grubba) <grubba@grubba.org>
d29d9170dbb75e8dba343c17ebe8bd6e12271770 (
13
lines) (+
12
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
The old-style program decoder is now mexec-aware.
Rev: src/encode.c:1.230
2:
|| This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: encode.c,v 1.
229
2005/05/
27
18
:
34
:
23
mast
Exp $
+
|| $Id: encode.c,v 1.
230
2005/05/
31
12
:
00
:
07
grubba
Exp $
*/ #include "global.h"
2904:
if(data->pass == 1) {
+
#ifdef PIKE_USE_MACHINE_CODE
+
/* We want our program to be in mexec-allocated memory... */
+
#define BAR(NUMTYPE,TYPE,ARGTYPE,NAME)
+
#endif /* PIKE_USE_MACHINE_CODE */
#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ size=DO_ALIGN(size, ALIGNOF(TYPE)); \ size+=p->PIKE_CONCAT(num_,NAME)*sizeof(p->NAME[0]);
2913:
debug_malloc_touch(dat); MEMSET(dat,0,size); size=0;
+
#ifdef PIKE_USE_MACHINE_CODE
+
/* We want our program to be in mexec-allocated memory... */
+
#define BAR(NUMTYPE,TYPE,ARGTYPE,NAME) \
+
p->NAME = (TYPE *)mexec_alloc(p->PIKE_CONCAT(num_, NAME) * \
+
sizeof(p->NAME[0]));
+
#endif /* PIKE_USE_MACHINE_CODE */
#define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \ size=DO_ALIGN(size, ALIGNOF(TYPE)); \ p->NAME=(TYPE *)(dat+size); \