RISC-V 64-bit Linux in JavaScript
bellard.org
bellard.org
For example: http://copy.sh/v86/
And many others...
There's even a demo with Linux 3. [1]
[0] https://github.com/copy/v86 [1] https://copy.sh/v86/?profile=linux3
It is possible to get fast longs in JS, though, if you push your optimizer far enough. This is what we have done in Scala.js. I wrote a paper about this, but it is still under submission so I cannot disclose it just yet. However, I can point to the implementation:
* The user-land implementation of `Long`s in Scala.js: https://github.com/scala-js/scala-js/blob/master/library/src...
* The PR that made the performance breakthrough in the optimizer, by stack-allocating all instances of `RuntimeLong`: https://github.com/scala-js/scala-js/pull/2488
Do you know what the reasons were for JS not implementing full 2^64?
Also I noticed theres a JS C-types that has 64 bit ints, would that not help here?
> js-ctypes is only available from chrome code; that is, ctypes is not available to websites, only application and extension code.
Basically `js-ctypes` won't work in an actual browser. So you cannot use it. There are other Node.js-specific native packages that give a representation for 64-bit integers, but not arithmetic operations. Besides, even if they had arithmetic operations, they would be heap-allocated, and since the JIT cannot understand them, it would not be able to optimize them as well as what we built for Scala.js.
~# date
Thu Jan 1 00:03:09 UTC 1970https://www.youtube.com/watch?v=vB0FC1DZqUM&feature=youtu.be
https://people.eecs.berkeley.edu/~krste/papers/riscv-priv-sp...
The rocket chip generator https://github.com/ucb-bar/rocket-chip and boom both have support for it, as far as I know.