[js] some inlining for IntMap