Skip to content
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

Dispatch improvements #1620

Merged
merged 4 commits into from
Jun 20, 2024
Merged

Dispatch improvements #1620

merged 4 commits into from
Jun 20, 2024

Conversation

housel
Copy link
Member

@housel housel commented Jun 20, 2024

These changes improve wrapper stream performance, including for LLVM bitcode steams, and make other method dispatch improvements in LLVM bitcode output.

Methods on subclasses of <wrapper-stream> often make heavy use of
inner-stream, which is an open generic function. To ensure that calls
to inner-stream are dispatched efficiently, this change adds sealing
definitions for inner-stream on <wrapper-stream> subclasses.

* sources/io/streams/wrapper-stream.dylan
  (inner-stream on <wrapper-stream>): Make method inline due to its
   simplicity and performance benefit.

* sources/io/streams/indenting-streams.dylan:
  Seal inner-stream on <indenting-stream>.

* sources/lib/coloring-stream/coloring-stream.dylan:
  Seal inner-stream on <coloring-stream>.

* sources/lib/progress-stream/progress-stream.dylan:
  Seal inner-stream on <progress-stream>.

* sources/lib/llvm/bitcode.dylan: Seal inner-stream on
  <bitcode-stream>.
* sources/lib/llvm/llvm-bitcode.dylan (write-module): Declare the
  proper type of llvm-module-functions elements.

* sources/lib/llvm/bitcode.dylan
  (stream-record-id): Add type declarations for bitcode-records
   elements.
  (write-abbrev-record): Add type declarations for
   bitcode-abbrev-definitions entries and abbrev-ops elements.
@housel housel merged commit cc38f66 into dylan-lang:master Jun 20, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants