rt/emul/mini/src/main/resources/org/apidesign/vm4brwsr/emul/lang/java_lang_Number.js
changeset 1871 bcbc4c03d35d
parent 1870 790cc8784820
child 1872 df5db062f180
     1.1 --- a/rt/emul/mini/src/main/resources/org/apidesign/vm4brwsr/emul/lang/java_lang_Number.js	Wed Jan 27 21:17:44 2016 +0100
     1.2 +++ b/rt/emul/mini/src/main/resources/org/apidesign/vm4brwsr/emul/lang/java_lang_Number.js	Wed Jan 27 21:24:22 2016 +0100
     1.3 @@ -207,11 +207,11 @@
     1.4          }
     1.5      };
     1.6  
     1.7 -    numberPrototype.compare64 = function(x) {
     1.8 -        if (this.high32() === x.high32()) {
     1.9 -            return (this < x) ? -1 : ((this > x) ? 1 : 0);
    1.10 +    function compare64(x, y) {
    1.11 +        if (x.high32() === y.high32()) {
    1.12 +            return (x < y) ? -1 : ((x > y) ? 1 : 0);
    1.13          }
    1.14 -        return (this.high32() < x.high32()) ? -1 : 1;
    1.15 +        return (x.high32() < y.high32()) ? -1 : 1;
    1.16      };
    1.17  
    1.18      function neg64(x) {
    1.19 @@ -554,7 +554,7 @@
    1.20      b.shl64 = shl64;
    1.21      b.shr64 = shr64;
    1.22      b.ushr64 = ushr64;
    1.23 -    b.compare64 = function(x,y) { return y.compare64(x); };
    1.24 +    b.compare64 = compare64;
    1.25  })(Number.prototype);
    1.26  
    1.27  vm.java_lang_Number(false);