perf/lib/bigdecimal_GWT/bigdecimal.js
function fix_and_export(class_name) {
  var Src = window.bigdecimal[class_name];
  var Fixed = Src;
  if(Src.__init__) {
    Fixed = function wrap_constructor() {
      var args = Array.prototype.slice.call(arguments);
      return Src.__init__(args);
    };

    Fixed.prototype = Src.prototype;

    for (var a in Src)
      if(Src.hasOwnProperty(a)) {
        if((typeof Src[a] != 'function') || !a.match(/_va$/))
          Fixed[a] = Src[a];
        else {
          var pub_name = a.replace(/_va$/, '');
          Fixed[pub_name] = function wrap_classmeth () {
            var args = Array.prototype.slice.call(arguments);
            return wrap_classmeth.inner_method(args);
          };
          Fixed[pub_name].inner_method = Src[a];
        }
      }

  }

  var proto = Fixed.prototype;
  for (var a in proto) {
    if(proto.hasOwnProperty(a) && (typeof proto[a] == 'function') && a.match(/_va$/)) {
      var pub_name = a.replace(/_va$/, '');
      proto[pub_name] = function wrap_meth() {
        var args = Array.prototype.slice.call(arguments);
        return wrap_meth.inner_method.apply(this, [args]);
      };
      proto[pub_name].inner_method = proto[a];
      delete proto[a];
    }
  }

  exports[class_name] = Fixed;
}
function fix_and_export(class_name) {
  var Src = window.bigdecimal[class_name];
  var Fixed = Src;
  if(Src.__init__) {
    Fixed = function wrap_constructor() {
      var args = Array.prototype.slice.call(arguments);
      return Src.__init__(args);
    };

    Fixed.prototype = Src.prototype;

    for (var a in Src)
      if(Src.hasOwnProperty(a)) {
        if((typeof Src[a] != 'function') || !a.match(/_va$/))
          Fixed[a] = Src[a];
        else {
          var pub_name = a.replace(/_va$/, '');
          Fixed[pub_name] = function wrap_classmeth () {
            var args = Array.prototype.slice.call(arguments);
            return wrap_classmeth.inner_method(args);
          };
          Fixed[pub_name].inner_method = Src[a];
        }
      }

  }

  var proto = Fixed.prototype;
  for (var a in proto) {
    if(proto.hasOwnProperty(a) && (typeof proto[a] == 'function') && a.match(/_va$/)) {
      var pub_name = a.replace(/_va$/, '');
      proto[pub_name] = function wrap_meth() {
        var args = Array.prototype.slice.call(arguments);
        return wrap_meth.inner_method.apply(this, [args]);
      };
      proto[pub_name].inner_method = proto[a];
      delete proto[a];
    }
  }

  exports[class_name] = Fixed;
}
function fix_and_export ( class_name ) { var Src = window . bigdecimal [ class_name ] ; var Fixed = Src ; if ( Src . __init__ ) { Fixed = function wrap_constructor ( ) { var args = Array . prototype . slice . call ( arguments ) ; return Src . __init__ ( args ) ; } ; Fixed . prototype = Src . prototype ; for ( var a in Src ) if ( Src . hasOwnProperty ( a ) ) { if ( ( typeof Src [ a ] != 'function' ) || ! a . match ( / _va$ / ) ) Fixed [ a ] = Src [ a ] ; else { var pub_name = a . replace ( / _va$ / , '' ) ; Fixed [ pub_name ] = function wrap_classmeth ( ) { var args = Array . prototype . slice . call ( arguments ) ; return wrap_classmeth . inner_method ( args ) ; } ; Fixed [ pub_name ] . inner_method = Src [ a ] ; } } } var proto = Fixed . prototype ; for ( var a in proto ) { if ( proto . hasOwnProperty ( a ) && ( typeof proto [ a ] == 'function' ) && a . match ( / _va$ / ) ) { var pub_name = a . replace ( / _va$ / , '' ) ; proto [ pub_name ] = function wrap_meth ( ) { var args = Array . prototype . slice . call ( arguments ) ; return wrap_meth . inner_method . apply ( this , [ args ] ) ; } ; proto [ pub_name ] . inner_method = proto [ a ] ; delete proto [ a ] ; } } exports [ class_name ] = Fixed ; }
This is an unfortunate kludge because Java methods and constructors cannot accept vararg parameters.
This is an unfortunate kludge because Java methods and constructors cannot accept vararg parameters .