Closed ghent360 closed 7 years ago
Your example program produces the same output on JSIL and .NET 4.5 (try for example dotnetfiddle.net). Where did you run it to get the expected output?
Sorry, my mistake. Should have been 1L << 47; It works fine when I fix the code.
Sample code, entered in try.jsil.com
using System; public static class Program { public static void Main () { ulong x64 = 2 << 47; ulong y64 = x64 << 5; Console.WriteLine("Hello JSIL World!"); Console.WriteLine("{0}, {1}", x64, y64); } }
Generated code: ... (function Program$Members () { var $, $thisType; var $T00 = function () { return ($T00 = JSIL.Memoize($asm01.System.Console)) (); }; var $T01 = function () { return ($T01 = JSIL.Memoize($asm01.System.UInt64)) (); };
function Program_Main () { $T00().WriteLine("Hello JSIL World!"); $T00().WriteLine( "{0}, {1}", $T01().Create(65536, 0, 0), $T01().op_LeftShift($T01().Create(65536, 0, 0), 5) ); };
JSIL.MakeStaticClass("Program", true, [], function ($interfaceBuilder) { $ = $interfaceBuilder;
});
})();
Output: Hello JSIL World! 65536, 2097152
Expected: Hello JSIL World! 140737488355328, 4503599627370496