Skip to content

Conversation

@melsman
Copy link
Owner

@melsman melsman commented Dec 8, 2025

  • Improved layout of MulExp and RegionExp expressions.
  • Better ordering of arguments with deep argument flattening.
  • Improved inlining control (-max_inl_sz and -max_spec_sz).
  • Avoid constant folding on switch expressions when the -no_cfold is passed to mlkit.
  • Socket.recvVec fix
  • MLKit manual improvements.

Copilot AI review requested due to automatic review settings December 8, 2025 17:12
@melsman melsman self-assigned this Dec 8, 2025
@melsman melsman added enhancement cleanup Cleanup of source code labels Dec 8, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR performs a "Christmas cleanup" for 2025, focusing on code quality improvements and enhanced compiler control features.

Key Changes:

  • Improved layout/formatting of MulExp and RegionExp expressions with better indentation calculations
  • Enhanced inlining and specialization control through -max_inl_sz and -max_spec_sz flags
  • Added constant folding control via new -cfold flag
  • Fixed spelling errors ("aggressive_opt" vs "aggresive_opt")
  • Updated manual documentation and bibliography

Reviewed changes

Copilot reviewed 33 out of 44 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Runtime/Region.c Converted C-style comments to C++ style, fixed format specifiers, contains spelling error
src/Runtime/Profiling.c Updated format strings and added debug output for profiling info
src/Runtime/Math.c Added runtime_test1auto function for testing multi-parameter passing
src/Compiler/Regions/RegionExp.sml Improved SELECT expression layout with dynamic indentation
src/Compiler/Regions/MulExp.sml Enhanced formatting and layout of declarations, improved code readability
src/Compiler/Regions/Effect.sml Added short flag name "abbrev" for print_control_abbrev_layout
src/Compiler/Lambda/OptLambda.sml Major refactoring: separated constant folding control, improved inlining logic, fixed "aggressive" typo
src/Compiler/Backend/X64/CodeGenX64.sml Added clarifying comments about bytes vs words
src/Compiler/Backend/X64/CodeGenUtilX64.sml Reorganized code structure, moved helper function
src/Common/KitReML.sml Fixed flag name from "aggresive_opt" to "aggressive_opt"
src/Common/Flags.sml Fixed flag name consistency (aggressive_opt)
kitdemo/*.sml Formatting improvements and style cleanup across multiple demo files
doc/manual/*.tex Added SML syntax highlighting support, updated macros
doc/manual/*.pdf Regenerated PDF files with updated content
doc/manual/mlkit.bib Added 5 new bibliography entries for recent publications
NEWS.md Documented new inlining control and argument flattening features

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

allocProfNowFin=0, // Words used on object descriptors in fin. regions.
maxAllocProfFin=0, // At time maxAllocFin how much were used on object descriptors.
maxAlloc=0, // Max. allocated data in both inf. and fin. regions.
// - not nessesarily equal to maxAllocInf+maxAllocFin!!!
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed typo in comment: "nessesarily" should be "necessarily"

Copilot uses AI. Check for mistakes.
@melsman melsman merged commit 7d8b815 into master Dec 16, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Cleanup of source code enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants