pike.git/
src/
program.c
Branch:
Tag:
Non-build tags
All tags
No tags
1999-09-28
1999-09-28 23:19:55 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
eb071e0b1fae9d31eb3d057a1fe5c90707a66f19 (
15
lines) (+
13
/-
2
)
[
Show
|
Annotate
]
Branch:
7.9
commented the comment. :)
Rev: src/program.c:1.156
5:
\*/ /**/ #include "global.h"
-
RCSID("$Id: program.c,v 1.
155
1999/09/28
22
:
34
:
47
grubba
Exp $");
+
RCSID("$Id: program.c,v 1.
156
1999/09/28
23
:
19
:
55
hubbe
Exp $");
#include "program.h" #include "object.h" #include "dynamic_buffer.h"
1106:
offset=DO_ALIGN(new_program->storage_needed-modulo,alignment)+modulo; if(!new_program->storage_needed) {
-
/*
FIXME:
Shouldn't new_program->storage_needed be set here?
+
/* Shouldn't new_program->storage_needed be set here?
* Otherwise the debug code below ought to be trigged. * But since it isn't, I guess this is dead code? * /grubba 1999-09-28
-
+
*
+
* No, the below offset represents the storage in the beginning
+
* of obj->storage which is not used because of alignment constraints.
+
* However, for historical reasons, prog->storage_offset needs to
+
* contain this unused space as well. This means that the real
+
* space used by all variables in an object is really:
+
* o->prog->storage_needed - o->prog->inherits[0].storage_offset,
+
* This can also be written as STORAGE_NEEDED(o->prog)
+
* STORAGE_NEEDED() is defined in program.h.
+
* /Hubbe 1999-09-29
*/ new_program->inherits[0].storage_offset=offset; }