Using anonymous function for div/mod initialization arithmetic
authorLubomir Nerad <lubomir.nerad@oracle.com>
Tue, 05 Feb 2013 17:12:17 +0100
brancharithmetic
changeset 6788a25056ef283
parent 677 1ff540c1650f
child 679 ee595aae8353
Using anonymous function for div/mod initialization
emul/mini/src/main/resources/org/apidesign/vm4brwsr/emul/lang/java_lang_Number.js
     1.1 --- a/emul/mini/src/main/resources/org/apidesign/vm4brwsr/emul/lang/java_lang_Number.js	Tue Feb 05 17:04:22 2013 +0100
     1.2 +++ b/emul/mini/src/main/resources/org/apidesign/vm4brwsr/emul/lang/java_lang_Number.js	Tue Feb 05 17:12:17 2013 +0100
     1.3 @@ -205,7 +205,7 @@
     1.4      return ret.add64(1);
     1.5  };
     1.6  
     1.7 -function __initDivMod(numberPrototype) {
     1.8 +(function(numberPrototype) {
     1.9      function __Int64(hi32, lo32) {
    1.10          this.hi32 = hi32 | 0;
    1.11          this.lo32 = lo32 | 0;
    1.12 @@ -511,6 +511,4 @@
    1.13          var result = r64.toNumber();
    1.14          return negateResult ? result.neg64() : result; 
    1.15      }
    1.16 -};
    1.17 -
    1.18 -__initDivMod(Number.prototype);
    1.19 +})(Number.prototype);