-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All numberic types are 64 bit on Objeck? #208
Comments
The best way to state this is that Objeck is 64-bit for the host environment. For Win64, longs are 32-bit; however, they are 64-bit on POSIX per the platform specifications. As such, program code data (such as literals) are capped at 32 bits. Some optimization is done within the compiler (i.e., constant folding and propagation) and assumes long 32-bit literals. The VM and its JIT compilers run in 64-bit mode with a cast to 32-values as needed. |
Yep, but Windows also provides Update: My point is, even though on Win64 Another update: Unlike Fantom, Objeck doesn't allow the users to specify the data type. On Fantom, type inference is something completely optional and people could write something like |
@iahung a type can be enforced via the following I may make a branch and explore further. There is incompatibility with the C++ STL and |
Add it to document please? Otherwise who could know about that other than you? |
I think it's here |
Point taken, I will take action to explore changing the 64-Windows model to be POSIX 64 compliant. |
Just another weird syntax @objeck:
In this case, both If |
If Int is 64 bit then the maximum value for an Int is 9223372036854775807 isn't it?
https://learn.microsoft.com/vi-vn/cpp/cpp/data-type-ranges?view=msvc-160
But this piece of code doesn't agree with it:
It printed 2147483646. This mean the maximum value for an Int on Objeck is 2147483647 so Objeck's Int is 32 bit.
The text was updated successfully, but these errors were encountered: