pike.git/
src/
pike_types.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2022-02-18
2022-02-18 12:58:55 by Henrik Grubbström (Grubba) <grubba@grubba.org>
04404a7b341d9ccf0b6994465ccceee1011353cb (
20
lines) (+
11
/-
9
)
[
Show
|
Annotate
]
Branch:
master
Compiler
[Typechecker]
: Clean up handling of PT_FLAG_VOIDABLE.
663:
} else if (type == PIKE_T_SCOPE) { /* The scope blocks propagation of markers. */ t->flags = cdr->flags & ~(PT_FLAG_MARKER|PT_FLAG_ASSIGN);
-
} else if (type == T_
OR
) {
+
} else if (type == T_
NOT
) {
if (car) {
-
+
t->flags |= car->flags ^ ~PT_FLAG_MARK_ASSIGN;
+
}
+
} else if (flag_method & PT_COPY_MORE) {
+
if (car && (flag_method & PT_COPY_CAR)) {
t->flags |= car->flags; }
-
if (cdr) {
+
if (cdr
&& (flag_method & PT_COPY_CDR
)
)
{
t->flags |= cdr->flags; }
-
} else if (type == T_NOT) {
-
if (car) {
-
t->flags |= car->flags ^ ~PT_FLAG_MARK_ASSIGN;
-
}
+
} else { if (car && (flag_method & PT_COPY_CAR)) { t->flags |= car->flags & PT_FLAG_MARK_ASSIGN;
888:
*Pike_compiler->type_stackp = mk_type(T_SCOPE, (void *)(ptrdiff_t)level, *Pike_compiler->type_stackp,
-
PT_COPY_CDR);
+
PT_COPY_
MORE|PT_COPY_
CDR);
TYPE_STACK_DEBUG("push_scope_type"); }
916:
*Pike_compiler->type_stackp = mk_type(PIKE_T_ATTRIBUTE, (void *)attr, *Pike_compiler->type_stackp,
-
PT_COPY_CDR);
+
PT_COPY_
MORE|PT_COPY_
CDR);
TYPE_STACK_DEBUG("push_type_attribute"); }
927:
*Pike_compiler->type_stackp = mk_type(PIKE_T_NAME, (void *)name, *Pike_compiler->type_stackp,
-
PT_COPY_CDR);
+
PT_COPY_
MORE|PT_COPY_
CDR);
TYPE_STACK_DEBUG("push_type_name"); }
1053:
*Pike_compiler->type_stackp = mk_type(type, *Pike_compiler->type_stackp, *(Pike_compiler->type_stackp+1),
+
((type == T_OR)? PT_COPY_MORE : 0) |
PT_COPY_BOTH); break; default: