forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compiler: introduce size threshold for nil checks
Add a new control variable to the Gogo class that stores the size threshold for nil checks. This value can be used to control the policy for deciding when a given deference operation needs a check and when it does not. A size threshold of -1 means that every potentially faulting dereference needs an explicit check (and branch to error call). A size threshold of K (where K > 0) means that if the size of the object being dereferenced is >= K, then we need a check. Reviewed-on: https://go-review.googlesource.com/80996 * go-c.h (go_create_gogo_args): Add nil_check_size_threshold field. * go-lang.c (go_langhook_init): Set nil_check_size_threshold. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255340 138bc75d-0d04-0410-961f-82ee72b054a4
- Loading branch information
ian
committed
Dec 1, 2017
1 parent
8812925
commit f614ea8
Showing
13 changed files
with
220 additions
and
81 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
2017-12-01 Than McIntosh <[email protected]> | ||
|
||
* go-c.h (go_create_gogo_args): Add nil_check_size_threshold | ||
field. | ||
* go-lang.c (go_langhook_init): Set nil_check_size_threshold. | ||
|
||
2017-11-28 Jakub Jelinek <[email protected]> | ||
|
||
* go-gcc.cc (Gcc_backend::switch_statement): Build SWITCH_EXPR using | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
0d6b3abcbfe04949db947081651a503ceb12fe6e | ||
8cd42a3e9e0e618bb09e67be73f7d2f2477a0faa | ||
|
||
The first line of this file holds the git revision number of the last | ||
merge done from the gofrontend repository. |
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.