MIRROR: javascript for ๐Ÿœ's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

add T_NEEDS_PROTO_FALLBACK macro for type checking

+3 -4
+3 -4
src/ant.c
··· 468 468 }; 469 469 470 470 #define TYPE_MASK(t) (1u << (t)) 471 - #define T_REFTYPE (TYPE_MASK(T_FUNC) | TYPE_MASK(T_ARR) | TYPE_MASK(T_PROMISE) | TYPE_MASK(T_OBJ)) 471 + #define T_NEEDS_PROTO_FALLBACK (TYPE_MASK(T_FUNC) | TYPE_MASK(T_ARR) | TYPE_MASK(T_PROMISE)) 472 472 473 473 static const char *typestr_raw(uint8_t t) { 474 474 const char *names[] = { ··· 4935 4935 uint8_t pt = vtype(proto); 4936 4936 if (pt == T_NULL) break; 4937 4937 if (pt != T_OBJ && pt != T_ARR && pt != T_FUNC) { 4938 - if (TYPE_MASK(t) & T_REFTYPE) { 4938 + if (TYPE_MASK(t) & T_NEEDS_PROTO_FALLBACK) { 4939 4939 cur = get_prototype_for_type(js, t); 4940 4940 t = vtype(cur); 4941 4941 if (t == T_NULL || t == T_UNDEF) break; 4942 - depth++; 4943 - continue; 4942 + depth++; continue; 4944 4943 } 4945 4944 break; 4946 4945 }