1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-11-17 16:05:31 +00:00

Improve performance of typing expressions

This commit is contained in:
Karol Stasiak 2020-03-25 23:51:53 +01:00
parent e3d5ce4e81
commit b8e5e71c19

View File

@ -228,7 +228,7 @@ object AbstractExpressionCompiler {
def getExpressionTypeLoosely(env: Environment, log: Logger, expr: Expression): Type = getExpressionTypeImpl(env, log, expr, loosely = true)
def getExpressionTypeImpl(env: Environment, log: Logger, expr: Expression, loosely: Boolean): Type = {
if (expr.typeCache ne null) expr.typeCache
if (expr.typeCache ne null) return expr.typeCache
val b = env.get[Type]("byte")
val bool = env.get[Type]("bool$")
val boolTrue = env.get[Type]("true$")