Welcome! Please see the About page for a little more info on how this works.

0 votes
in Clojure by

This will allow instance? predicates calls to be emitted using the instanceof JVM bytecode and will also allow tools like core.typed or tools.analyzer.jvm to infer the type of a var/local on a per branch basis without having to special-case all the core predicates.

3 Answers

0 votes
by

Comment made by: wagjo

Related ticket CLJ-1227 and related quote from Alex:

{quote}
definline is considered to be an experimental feature and Rich would like to discourage its use as the hope is to remove it in the future. The desired replacement is something like common lisp compiler macros that could allow the compiler to detect special situations and optimize the result but leave behind a function invocation for the case where no special behavior is available.
{quote}

0 votes
by

Comment made by: bronsa

This patch uses "manual" :inline metadata on functions, it's used by many other core functions (like +,- et), not definline so Rich's comment doesn't apply.

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJ-1504 (reported by bronsa)
...