This repository has been archived by the owner on Nov 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Umbrella commit switching to delayed reference counting (still
experimental work in progress). This is a larger overhaul of HILTI's runtime memory management. Rather than generally keeping all reference counts up to date all the time (which involves a lot of pretty much uncessary operations), we now enforce correct reference counts only during explicit "safepoints". In between safepoints, HILTI is free to skip counting. For now, we trigger safepoints upon entry/exit into HILTI (either from/to C, or from/to the thread scheduler), which means that we can generally omit all reference counting operations for objects that don't persist across these boundaries, including for everything on the stack. Internally this is achieved by maintaining "nullbuffers" that record objects that need to have their reference counts checked for being zero at the next safepoint; and by adding extra code to adjust all live variables when safepoints may trigger. (Currently, that's still a bit inefficient, but should work well once we can leverage LLVM's stackmaps in the future). With this change comes a bit more baked in: - Calling conventations have changed to return values at +0 (instead of +1). With the delayed reference counting, even freshly created heap objects can be returned without increased reference counts (but are put into the nullbuffer immediately). An attribute &ref can be used for HILTI-C function that do want to return at +1. - Handling of attributes have been unified inside the HILTI compiler. Also moving regexp's attributes from type information to the values. - Heap values can now be "hoisted" to the stack if they don't need to persist longer that the stack's lifetime. That avoids having to allocate them dynamically. Currently that's triggered with a &hoist attribute and works for bytes only; however there's no correctness checks in place and must be used only if it satisfies all the constraints. Eventually HILTI will learn to identify the right situations and apply &hoist itself as suitable. - hilti-build now disables debugging when optimizions turned on. Tests turn on debugging by default now. - Starting to port HILTI to LLVM 3.5-to-be (current master). This is all still experimental (but passes the test-suite).
- Loading branch information
Showing
234 changed files
with
4,544 additions
and
2,916 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
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
Empty file.
Empty file.
Empty file.
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
Oops, something went wrong.