|
/* We use a HashMap instead of an IdentityHashMap because the latter is |
|
* implemented in terms of the former anyway, to a HashMap is leaner and |
|
* faster. |
|
*/ |
|
private val javaMap: HashMap[Class[_], T] = |
|
if (useJSMap) null |
|
else new HashMap() |
Always use Java Map, with linkTimeIf
scala-wasm/javalib/src/main/scala/java/lang/ClassValue.scala
Lines 41 to 47 in ff1e80e
Always use Java Map, with
linkTimeIf