File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -4000,7 +4000,13 @@ public class ProgramBuilder {
4000
4000
4001
4001
/// Returns the next free variable.
4002
4002
func nextVariable( ) -> Variable {
4003
- assert ( numVariables < Code . maxNumberOfVariables, " Too many variables " )
4003
+ // Temporarily introduce a lower limit: Programs shouldn't get exceedingly large.
4004
+ // TODO(mliedtke): Undo this once the issues are fixed.
4005
+ let maxNumberOfVariables = 10_000
4006
+ assert ( maxNumberOfVariables <= Code . maxNumberOfVariables)
4007
+ if numVariables >= maxNumberOfVariables {
4008
+ fatalError ( " Too many variables \( numVariables) . Contributors: \( contributors. map { $0. name} ) " )
4009
+ }
4004
4010
numVariables += 1
4005
4011
return Variable ( number: numVariables - 1 )
4006
4012
}
You can’t perform that action at this time.
0 commit comments