@@ -105,8 +105,16 @@ class Serializer {
}
function serializeRef(v) {
+ #if js
+ var vt = untyped __js__("typeof")(v);
+ #end
for( i in 0...cache.length ) {
+ var ci = cache[i];
+ if( untyped __js__("typeof")(ci) == vt && ci == v ) {
+ #else true
if( cache[i] == v ) {
buf.add("r");
buf.add(i);
return true;