Attached patch fixes 4 unused local variable warnings, and possibly a bug in ExpressionTreeVisitor. For BinaryExpression node, return value of visiting node.Conversion was not passed. Isn't that a bug?
All warnings were found by Mono C# compiler. -- Seo Sanghyeon
Index: src/microsoft.scripting.core/ast/expressiontreevisitor.cs =================================================================== --- src/microsoft.scripting.core/ast/expressiontreevisitor.cs (revision 130) +++ src/microsoft.scripting.core/ast/expressiontreevisitor.cs (working copy) @@ -109,7 +109,7 @@ if (l == node.Left && r == node.Right) { return node; } - return new BinaryExpression(node.Annotations, node.NodeType, l, r, node.Type, node.Method, node.Conversion, node.BindingInfo); + return new BinaryExpression(node.Annotations, node.NodeType, l, r, node.Type, node.Method, c, node.BindingInfo); } protected virtual Expression Visit(Block node) { Index: src/microsoft.scripting.core/actions/callsite.cs =================================================================== --- src/microsoft.scripting.core/actions/callsite.cs (revision 130) +++ src/microsoft.scripting.core/actions/callsite.cs (working copy) @@ -139,8 +139,6 @@ // // Create matchmaker, its site and reflected caller. We'll need them regardless. // - Type typeofT = typeof(T); // Calculate this only once - Matchmaker mm = new Matchmaker(); CallSite site = CreateMatchmakerCallSite(mm); MatchCallerTarget<T> caller = MatchCaller.MakeCaller<T>(); Index: src/microsoft.scripting.core/compiler/LambdaCompiler.Logical.cs =================================================================== --- src/microsoft.scripting.core/compiler/LambdaCompiler.Logical.cs (revision 130) +++ src/microsoft.scripting.core/compiler/LambdaCompiler.Logical.cs (working copy) @@ -231,7 +231,6 @@ private void EmitUserdefinedLiftedAndAlso(BinaryExpression b) { Type type = b.Left.Type; Type nnType = TypeUtils.GetNonNullableType(type); - Label labReturnLeft = _ilg.DefineLabel(); Label labReturnRight = _ilg.DefineLabel(); Label labExit = _ilg.DefineLabel(); @@ -407,7 +406,6 @@ private void EmitUserdefinedLiftedOrElse(BinaryExpression b) { Type type = b.Left.Type; Type nnType = TypeUtils.GetNonNullableType(type); - Label labReturnLeft = _ilg.DefineLabel(); Label labReturnRight = _ilg.DefineLabel(); Label labExit = _ilg.DefineLabel();
_______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core