arcticfox1919 / LuaDardo

A Lua virtual machine written in Dart
Apache License 2.0
176 stars 34 forks source link

compile errors when targeting JS #20

Closed maks closed 1 year ago

maks commented 1 year ago

When targeting JS, for example when using this package in a Flutter web app, you will get compile errors due to Dart on JS only:

When compiling to JavaScript, integers are therefore restricted to 53 significant bits because all JavaScript numbers are double->precision floating point values. ref: https://stackoverflow.com/a/50429767/85472

This happens due to both definition of int64MaxValue, int64MinValue and implementation of logicalRShift() extension method.