Skip to content

Add debug flag and separate type checking and inference#1394

Merged
b-studios merged 12 commits into
mainfrom
compiler-performance-3
Apr 29, 2026
Merged

Add debug flag and separate type checking and inference#1394
b-studios merged 12 commits into
mainfrom
compiler-performance-3

Conversation

@b-studios
Copy link
Copy Markdown
Collaborator

@b-studios b-studios commented Apr 28, 2026

In sbt you can now call

debug

to trigger the debug mode
and

release

to trigger the release mode.

effekt.util.Debug contains a few debugging helpers that are disabled during release:

inline def debug(inline f: => Unit): Unit =
  inline if DEBUG then f else ()

inline def debug[T](inline f: => T)(inline otherwise: => T): T =
  inline if DEBUG then f else otherwise

inline def assert(inline assertion: Boolean): Unit =
  inline if DEBUG then Predef.assert(assertion)

inline def assert(inline assertion: Boolean, inline msg: => String): Unit =
  inline if DEBUG then Predef.assert(assertion, msg)

Comment on lines +687 to +689
resets = 29,
shifts = 3,
resumes = 3
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This worries me a bit, but it might be unavoidable since the size computation changed a bit

@b-studios b-studios marked this pull request as ready for review April 29, 2026 14:58
@b-studios b-studios merged commit 736a499 into main Apr 29, 2026
7 checks passed
@b-studios b-studios deleted the compiler-performance-3 branch April 29, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants