Skip to content

Conversation

@liufengyun
Copy link
Contributor

@liufengyun liufengyun commented Dec 8, 2025

Make global object checker default to best-effort mode

  • In best-effort mode, the checker tries to be fast, useful and unobtrusive.
  • In the aggressive mode, the checker tries to be sound by spending more check time and produce more verbose warnings.

In both modes, there will be a worst-case performance guarantee based on a quota on the number of method calls in initializing a global object.

@liufengyun liufengyun marked this pull request as ready for review December 16, 2025 07:29
init(tpl, obj, classSym)
catch case _: OutOfQuotaException =>
if !BestEffort then
report.warning("Giving up checking initializatino of " + classSym + " due to exhausted budget", classSym.sourcePos)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we turn on this warning for best-effort mode?

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.

1 participant