Skip to content
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

Rework numeric types #86

Merged
merged 11 commits into from
Sep 9, 2019
Merged

Rework numeric types #86

merged 11 commits into from
Sep 9, 2019

Conversation

lucteo
Copy link
Contributor

@lucteo lucteo commented Sep 9, 2019

No description provided.

lucteo added 11 commits July 9, 2019 20:55
Also moved tests related to functions from Basic into Basic/fun/
Mutable fields can be changed for const objects.
Const fields cannot be changed at all, except in the constructor or
destructor.
Temp fields are just like regular fields

The category is only handled at Sparrow level; when translating to
Feather, the category disappears.

Added test for explanation of a datatype decl.
Fixed issue with generation of basic storage types in unittests.
Dtor was called automatically even if the dtor is called manually.
Fix the behavior by checking the existence of dtor call before calling
dtor for the fields.
Make temp construction to return temp types
Make temp types not be convertible to mutable types
Make plain types convert to temp types

Better control of temporary objects along standard library and tests.
There are two main types: Int (32 signed) & Float (64 bits)
The rest of the types are: Int8, Int16, Int32, Int64, UInt8, UInt16,
UInt32, UInt64, Float32, Float64.

Int is alias with Int32 and Float is alias with Float64

Changed the code from SizeType and DiffType to be Int.

There is no implicit conversion between numeric types anymore.
Invalid integer conversions were applied.
Properly read octal literals
Properly read floating-point numberals with exponent signs
Create a test for numeric literals
This can be a problem on Docker instances where the folder structure is
different than the one on Git.
@lucteo lucteo merged commit bfe8421 into master Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant