pike.git/
src/
program.c
Branch:
Tag:
Non-build tags
All tags
No tags
2016-05-05
2016-05-05 09:53:10 by Henrik Grubbström (Grubba) <grubba@grubba.org>
1c5130822ecd9fa2fe2714f9def43169d10b4bce (
29
lines) (+
29
/-
0
)
[
Show
|
Annotate
]
Branch:
8.1
Compiler: Improved handling of inherit ::this_program.
5174:
return; }
+
if ((n->token == F_APPLY) && (CAR(n)->token == F_CONSTANT) &&
+
(TYPEOF(CAR(n)->u.sval) == T_FUNCTION) &&
+
(SUBTYPEOF(CAR(n)->u.sval) == FUNCTION_BUILTIN) &&
+
(CAR(n)->u.sval.u.efun->function == debug_f_aggregate)) {
+
/* Disambiguate multiple inherit ::-reference. */
+
node *arg;
+
while(1) {
+
while ((arg = CDR(n))) {
+
n = arg;
+
if (n->token != F_ARG_LIST) goto found;
+
}
+
/* Paranoia. */
+
if ((arg = CAR(n))) {
+
n = arg;
+
continue;
+
}
+
/* FIXME: Ought to go up a level and try the car there...
+
* But as this code probably won't be reached, we
+
* just fail.
+
*/
+
yyerror("Unable to inherit");
+
return;
+
}
+
found:
+
/* NB: The traditional C grammar requires a statement after a label. */
+
;
+
}
+
fix_type_field(n); if (!pike_types_le(n->type, inheritable_type_string) &&