-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #2636: Move last phase period assertion #2952
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,9 +108,14 @@ class Compiler { | |
new CollectSuperCalls, // Find classes that are called with super | ||
new DropInlined, // Drop Inlined nodes, since backend has no use for them | ||
new LabelDefs), // Converts calls to labels to jumps | ||
List(new GenBCode) // Generate JVM bytecode | ||
List(checkedIdOverflow(new GenBCode)) // Generate JVM bytecode | ||
) | ||
|
||
private def checkedIdOverflow(phase: Phase): Phase = { | ||
assert(phase.id <= Periods.MaxPossiblePhaseId) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would this ever fail? Phase.id extracts it from the period inside the phase, i.e. it reads a field which you're supposedly testing for overflow. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I propose to do the test in Phase.init instead. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know if it will ever fail, but that was the check that was there before. Probably at some point this was failing. |
||
phase | ||
} | ||
|
||
var runId = 1 | ||
def nextRunId = { | ||
runId += 1; runId | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!