* expression.cs: tiny optimization, avoid calling IsConstant,
because it effectively performs the lookup twice.
svn path=/trunk/mcs/; revision=8881
+2002-11-08 Miguel de Icaza <miguel@ximian.com>
+
+ * expression.cs: tiny optimization, avoid calling IsConstant,
+ because it effectively performs the lookup twice.
+
2002-11-06 Miguel de Icaza <miguel@ximian.com>
But a bogus return here to keep the semantics of the old code
public override Expression DoResolve (EmitContext ec)
{
VariableInfo vi = VariableInfo;
-
- if (Block.IsConstant (Name)) {
- Expression e = Block.GetConstantExpression (Name);
-
+ Expression e;
+
+ e = Block.GetConstantExpression (Name);
+ if (e != null) {
vi.Used = true;
return e;
}