-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update isEarlierThan to consider NEVER
- Loading branch information
Showing
1 changed file
with
5 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11d1dd9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the C runtime, NEVER is encoded as the largest negative number. In the Java code, however, we have this:
These look like odd definitions to me. The definition of NEVER is effectively limiting the TimeValue to 48 bits, in which case we will get overflow far sooner than the 292 years.
Anybody remember why these choices? Wouldn't it be better to encode NEVER as Long.MIN_VALUE?
11d1dd9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. I was trying to mimic the C runtime with NEVER = 0xFFFFF..... and FOREVER=0x7FFFFFF....
11d1dd9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it here, thanks for spotting this. I thought Long was unsigned....
11d1dd9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/lf-lang/lingua-franca/pull/2104/files#diff-b84e131f3aba572980acf4d3264162097f6760c90dda64d11affc31f26337c83