pike.git/
src/
builtin_functions.c
Branch:
Tag:
Non-build tags
All tags
No tags
1999-12-08
1999-12-08 21:19:21 by Henrik Grubbström (Grubba) <grubba@grubba.org>
f01a89dc0b01b5044b7408e741668ff8612c5bdc (
45
lines) (+
37
/-
8
)
[
Show
|
Annotate
]
Branch:
7.9
Fixed SHARED_NODES bug in fix_aggregate_mapping_type().
Rev: src/builtin_functions.c:1.220
5:
\*/ /**/ #include "global.h"
-
RCSID("$Id: builtin_functions.c,v 1.
219
1999/12/
07
18
:
58
:
47
grubba Exp $");
+
RCSID("$Id: builtin_functions.c,v 1.
220
1999/12/
08
21
:
19
:
21
grubba Exp $");
#include "interpret.h" #include "svalue.h" #include "pike_macros.h"
1554:
args->parent = 0; while(arg) {
+
#ifdef PIKE_DEBUG
+
if (l_flag > 4) {
+
fprintf(stderr, "Searching for arg #%d...\n", argno);
+
}
+
#endif /* PIKE_DEBUG */
if (arg->token == F_ARG_LIST) { if (CAR(arg)) { CAR(arg)->parent = arg;
1567:
} /* Retrace */ retrace:
+
#ifdef PIKE_DEBUG
+
if (l_flag > 4) {
+
fprintf(stderr, "Retracing in search for arg %d...\n", argno);
+
}
+
#endif /* PIKE_DEBUG */
while (arg->parent && (!CDR(arg->parent) || (CDR(arg->parent) == arg))) { arg = arg->parent;
1586:
MAKE_CONSTANT_SHARED_STRING(new_type, tMap(tMixed, tMixed)); goto set_type; }
+
#ifdef PIKE_DEBUG
+
if (l_flag > 4) {
+
fprintf(stderr, "Found arg #%d:\n", argno);
+
print_tree(arg);
+
simple_describe_type(arg->type);
+
}
+
#endif /* PIKE_DEBUG */
+
do {
if (types[argno]) { struct pike_string *t = or_pike_types(types[argno], arg->type, 0); free_string(types[argno]); types[argno] = t;
-
+
#ifdef PIKE_DEBUG
+
if (l_flag > 4) {
+
fprintf(stderr, "Resulting type for arg #%d:\n", argno);
+
simple_describe_type(types[argno]);
+
}
+
#endif /* PIKE_DEBUG */
} else { copy_shared_string(types[argno], arg->type); } argno = !argno;
-
+
/* Handle the special case where CAR & CDR are the same.
+
* Only occurrs with SHARED_NODES.
+
*/
+
} while (argno && arg->parent && CAR(arg->parent) == CDR(arg->parent));
goto retrace; }