From f1044e136b067ad303b21c14b24f44ca62ca1977 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 9 Apr 2010 16:22:40 +0000 Subject: @inlined auxiliary typed methods to reduce stac... @inlined auxiliary typed methods to reduce stack pressure. --- src/compiler/scala/tools/nsc/typechecker/Typers.scala | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 284b12e501..99825300dd 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -4193,12 +4193,9 @@ trait Typers { self: Analyzer => * @param tree ... * @return ... */ - def typed(tree: Tree): Tree = { - val ret = typed(tree, EXPRmode, WildcardType) - ret - } + @inline final def typed(tree: Tree): Tree = typed(tree, EXPRmode, WildcardType) - def typedPos(pos: Position)(tree: Tree) = typed(atPos(pos)(tree)) + @inline final def typedPos(pos: Position)(tree: Tree) = typed(atPos(pos)(tree)) /** Types expression tree with given prototype pt. * @@ -4206,8 +4203,7 @@ trait Typers { self: Analyzer => * @param pt ... * @return ... */ - def typed(tree: Tree, pt: Type): Tree = - typed(tree, EXPRmode, pt) + @inline final def typed(tree: Tree, pt: Type): Tree = typed(tree, EXPRmode, pt) /** Types qualifier tree of a select node. * E.g. is tree occurs in a context like tree.m. -- cgit v1.2.3