Automatically infer rest arg as having seq type

Description

In

no type will be inferred for the xs param. If we instead infer it to be of type seq then an unchecked if can be emitted. (An example of code like this involving an unnecessary check in if is in the variadic arity of str.)

While a change such as this wouldn't have a huge perf impact, it could slightly reduce generated code size and it could lead to better diagnostics for incorrect code:

Environment

None

Activity

Show:
Mike Fikes
May 12, 2019, 2:27 AM

CLJS-2961.patch added to Patch Tender

Mike Fikes
November 4, 2018, 6:42 PM

CLJS-2961.patch passes CI and Canary, and shows no compiler slowdown when compiling Coal Mine.

Assignee

David Nolen

Reporter

Mike Fikes

Labels

None

Approval

None

Patch

Code and Test

Priority

Minor