[js] compiler: function call simplifications