-
Notifications
You must be signed in to change notification settings - Fork 73
dfmc-optimization: Warn when inline-only inlining fails #838
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
Draft
housel
wants to merge
14
commits into
dylan-lang:master
Choose a base branch
from
housel:warn-inline-only
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or 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
If the implementation of |
* sources/dfmc/optimization/check.dylan (check-optimized-reference on <&function>, check-optimized-reference on <&cache-header-engine-node>): Emit a warning when an IEP has to be constructed for a function declared as inline-only.
* sources/dfmc/optimization/check.dylan (<calling-raw-value-function-out-of-line>): New program-error condition class. (check-optimized-reference on <&function>, check-optimized-reference on <&cache-header-engine-node>): Signal a program-error when a reference is found to a function with a signature containing raw types. (raw-value-function?): New utility function to check a function's signature for raw types.
* sources/dylan/float.dylan (decode-single-float, encode-single-float, decode-double-float, encode-double-float): Change these functions from inline-only to inline, because there is no reason not to have a graceful fallback when inlining fails.
These changes fix warnings due to inlining failures of inline-only support functions. * sources/dfmc/modeling/primitive-macros.dylan (&primitive-override-definer): Ensure that arguments declared <raw-machine-word> are mapped to <&raw-machine-word> in the override function so that the inserted extract-mw-operand-* calls can be inlined. * sources/dfmc/modeling/machine-word-primitives-support.dylan (make-raw-literal-with-overflow): Change from inline-only to inline because an adequate type bound is not always available for generic-arithmetic calls.
* sources/corba/orb/protocols/corba/typecode.dylan (CORBA/TCKind/as-symbol, CORBA/TCKind/as-integer): Remove the inline-only requirement as unnecessary.
* sources/network/unix-sockets/sockets-interfaces.dylan (accept, bind, close, connect, getpeername, getsockname, listen, setsockopt, shutdown, socket): Remove inline-only restriction. * sources/network/unix-sockets/sockets-extras.dylan (unix-recv-buffer, unix-send-buffer, unix-recv-buffer-from, unix-send-buffer-to): Remove inline-only restriction. * sources/network/unix-sockets/linux-address-data.dylan (ntohl, ntohs, htonl, htons): Remove inline-only restriction. * sources/network/unix-sockets/bsd-address-data.dylan (ntohl, ntohs, htonl, htons): Remove inline-only restriction.
These changes fix inlining failure warnings for inline-only functions. * sources/io/streams/typed-stream.dylan (typed-tsm, typed-fsm): Move to new top level definitions and add parameter type declarations. (<typed-stream>): Move out initializers for to-sequence-mapper and from-sequence-mapper.
* sources/corba/scepter/console/parse-arguments.dylan (canonicalize-arguments): Add a type declaration to ensure inlining.
* documentation/source/release-notes/2025.2.rst: Add note about new checks in the compiler.
* documentation/source/library-reference/language-extensions/inlining.rst: Add explanation for the compiler's warning when it fails to follow the inline-only adjective.
* sources/system/settings/win32-settings.dylan (*settings-default-class*): Declare as <byte-string>. (initialize-settings): Add type declarations so that the RegCreateKeyEx call can be inlined.
* sources/network/winsock2/first.dylan (import-wchar, export-wchar): Change from inline-only to inline to resolve inlining failure warnings. * sources/network/winsock2/winsock2.dylan (%-WSAFDIsSet, tv-sec-value, tv-usec-value, sin-family-value, sin-port-value, sin-addr-value, accept, bind, closesocket, connect, htonl, htons, listen, ntohl, ntohs, setsockopt, socket): Change from inline-only to inline to resolve inlining failure warnings. * sources/network/winsock2/hand.dylan (win32-recv-buffer-from, win32-send-buffer-to): Change from inline-only to inline to resolve inlining failure warnings.
* sources/duim/win32/wgadgets.dylan (<win32-collection-gadget-mixin>): Inherit from <collection-gadget> so that gadget-selection-mode, gadget-items, gadget-items-setter, gadget-selection, and gadget-selection-setter can be sealed.
* sources/ole/ole-automation/dispatch.dylan (apply-to-dispparams): Add type declarations so that an implicit call to integer-as-raw can be properly inlined.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is provided in case somebody wants to play with it, but it should probably not be merged until we have solutions for the many additional warnings this adds to the build.