Using old temporary variable name generation for single-letter types
(e.g., i, j, k, and so on).
This commit is contained in:
parent
69942c9a81
commit
921ab3ce68
|
@ -68,7 +68,10 @@ exports.Scope = class Scope
|
||||||
|
|
||||||
# Generate a temporary variable name at the given index.
|
# Generate a temporary variable name at the given index.
|
||||||
temporary: (type, index) ->
|
temporary: (type, index) ->
|
||||||
'_' + type + if index > 1 then index else ''
|
if type.length > 1
|
||||||
|
'_' + type + if index > 1 then index else ''
|
||||||
|
else
|
||||||
|
'_' + (index + parseInt type, 36).toString(36).replace /\d/g, 'a'
|
||||||
|
|
||||||
# If we need to store an intermediate result, find an available name for a
|
# If we need to store an intermediate result, find an available name for a
|
||||||
# compiler-generated variable. `_var`, `_var2`, and so on...
|
# compiler-generated variable. `_var`, `_var2`, and so on...
|
||||||
|
|
Loading…
Reference in New Issue