Commit ef0dd710

ef0dd7102c46Merged

Yukihiro "Matz" Matsumoto <[email protected]> · 5 months ago · 20 files · +12 added · ~8 modified

Description

Merge pull request #1465 from ryanseys/rs-c-proc-param-typing

Type proc/lambda and forwarded-callable parameters

Details

Commit
ef0dd7102c46
Parent
1c3f7fb151e6
Merge parent
5df30dada3ba

src/analyze.hmodifiedView file

@@ -21,6 +21,15 @@
2121 /* Name of a block's idx-th required parameter, or NULL. */
2222 const char *block_param_name(Compiler *c, int block, int idx);
2323
24+/* Element type an `each_with_object([])` accumulator is filled with, inferred
25+ from how the memo param is pushed to (following a forwarded callable's body).
26+ TY_UNKNOWN when undetermined; callers default an empty `[]` to int_array. */
27+TyKind ewo_memo_elem_type(Compiler *c, int callid);
28+
29+/* For a curry-application node, whether it completes the curry (reaches the base
30+ proc's arity) and the proc's return type. Returns 1 for a recognized chain. */
31+int curry_apply_info(Compiler *c, int node, int *out_complete, TyKind *out_ret);
32+
2433 /* Class index when a receiverless instance_eval/exec resolves to self, else -1. */
2534 int ie_implicit_self_class(Compiler *c, int id);
2635