-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/topic/robin/gh-1123-ctor-express…
…ions' * origin/topic/robin/gh-1123-ctor-expressions: (23 commits) Change SafeInt repository over to a fork including a fix. Fix issue in Bison grammar. Suppress GCC warnings. Fix a couple of unit tests for Alpine. Fix clang-tidy warnings. Fix printing of ID scopes. Fix printing of enum constants. Add boolean folding. Outsource an integer range check to SafeInt. Suppress clang-tidy warnings. Remove debugging output from integer range checks. Add test to check substitution of ctor nodes. Update printer to output type constructors. Move ctor replacement from normalizer into constant folder. Add test exercising various integer out-of-range situations. Add general constant folding. Rework integer out-of-range checking. Move negation out of parser. Address review feedback. Port `port` ctor expression to new model. ...
- Loading branch information
Showing
85 changed files
with
1,408 additions
and
295 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
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
Submodule SafeInt
updated
47 files
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.7.0-dev.53 | ||
1.7.0-dev.78 |
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) 2020-2022 by the Zeek Project. See LICENSE for details. | ||
// | ||
// Wrapper around functionality from 3rdparty's safe-math that we need. This | ||
// needs to be in a separate implementation file because one cannot include | ||
// both SafeInt.h and safe-math.h at the same time. | ||
|
||
#pragma once | ||
|
||
#include <cstdint> | ||
|
||
namespace hilti::rt::integer { | ||
|
||
/** | ||
* Negates an unsigned value, returning a signed value. Will through a | ||
* `OutOfRange` if not possible. | ||
*/ | ||
extern int64_t safe_negate(uint64_t x); | ||
|
||
} // namespace hilti::rt::integer |
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
Oops, something went wrong.