Short answer: it’s complicated.
(That’s a valid answer to almost any question, of course, but particularly so here!)
Slightly longer answer:
As should be obvious, the
Any class isn’t compiled from that code. That just defines how it appears to other Kotlin code; it’s a sort of stub implementation.
Any is a mapped type, which is provided by the relevant platform. On the JVM, it’s mapped to
java.lang.Object (which is itself partly implemented by native code, not all written in Java, as you can see from one version of its source).
So in the case of the JVM, the actual implementation is effectively split between the stub Kotlin source, parts of the Kotlin compiler, the stub Java source, and parts of the Java runtime. On other platforms, it’ll be different.