@@ -1776,7 +1776,7 @@ let generate com =
end;
if has_feature ctx "$global.$haxeUID" then begin
add_feature ctx "js.Lib.global";
- print ctx "if(typeof $global.$haxeUID == \"undefined\") $global.$haxeUID = 0;\n";
+ print ctx "$global.$haxeUID |= 0;\n";
List.iter (gen_block_element ~after:true ctx) (List.rev ctx.inits);
List.iter (generate_static ctx) (List.rev ctx.statics);
@@ -135,7 +135,7 @@ class Lib {
Generate next unique id
**/
@:allow(haxe.ds.ObjectMap.assignId)
- static inline function getNextHaxeUID():{function nextId(counterName:String):Int;} {
+ static inline function getNextHaxeUID():Int {
return js.Syntax.code("{0}.$haxeUID++", untyped __define_feature__("$global.$haxeUID", global));
}