diff options
author | Marek Safar <marek.safar@gmail.com> | 2011-04-05 21:40:12 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2011-04-06 18:53:56 +0400 |
commit | 03682cb49e43623a4e042c1a13d1870313cc3876 (patch) | |
tree | bc32f1a0bdf87200deecaafec229bd429e2983d8 /mcs/mcs/attribute.cs | |
parent | 0837fc9cd1a6cea5d0b78610699e32eb3371dbf1 (diff) |
Allocate less temporary type expressions
Diffstat (limited to 'mcs/mcs/attribute.cs')
-rw-r--r-- | mcs/mcs/attribute.cs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/mcs/mcs/attribute.cs b/mcs/mcs/attribute.cs index a644bf9dc61..a77ef3bfcf8 100644 --- a/mcs/mcs/attribute.cs +++ b/mcs/mcs/attribute.cs @@ -245,15 +245,6 @@ namespace Mono.CSharp { } } - TypeSpec ResolvePossibleAttributeType (ATypeNameExpression expr) - { - TypeExpr te = expr.ResolveAsType (context); - if (te == null) - return null; - - return te.Type; - } - /// <summary> /// Tries to resolve the type of the attribute. Flags an error if it can't, and complain is true. /// </summary> @@ -271,7 +262,7 @@ namespace Mono.CSharp { // print on success try { - t1 = ResolvePossibleAttributeType (expression); + t1 = expression.ResolveAsType (context); if (t1 != null) t1_is_attr = t1.IsAttribute; @@ -283,7 +274,7 @@ namespace Mono.CSharp { expanded = (ATypeNameExpression) expression.Clone (null); expanded.Name += "Attribute"; - t2 = ResolvePossibleAttributeType (expanded); + t2 = expanded.ResolveAsType (context); if (t2 != null) t2_is_attr = t2.IsAttribute; } |