Author: jambunathan
Date: 2005-03-26 02:55:44 -0500 (Sat, 26 Mar 2005)
New Revision: 42263
Modified:
trunk/mcs/bmcs/ChangeLog
trunk/mcs/bmcs/Makefile
trunk/mcs/bmcs/cfold.cs
trunk/mcs/bmcs/expression.cs
trunk/mcs/bmcs/gen-treedump.cs
trunk/mcs/bmcs/generic.cs
trunk/mcs/bmcs/mb-parser.jay
Log:
* expression.cs (Binary.Operator): Renamed LogicalAnd/LogicalOr to
LogicalAndAlso and LogicalOrElse.
* cfold.cs, gen-treedump.cs, generic.cs, mb-parser.jay: Changes
related to the above renaming.
Modified: trunk/mcs/bmcs/ChangeLog
===================================================================
--- trunk/mcs/bmcs/ChangeLog 2005-03-25 22:12:26 UTC (rev 42262)
+++ trunk/mcs/bmcs/ChangeLog 2005-03-26 07:55:44 UTC (rev 42263)
@@ -1,3 +1,11 @@
+2005-03-26 Jambunathan K <[EMAIL PROTECTED]>
+
+ * expression.cs (Binary.Operator): Renamed LogicalAnd/LogicalOr to
+ LogicalAndAlso and LogicalOrElse.
+
+ * cfold.cs, gen-treedump.cs, generic.cs, mb-parser.jay: Changes
+ related to the above renaming.
+
2005-03-25 Jambunathan K <[EMAIL PROTECTED]>
* constant.cs (DateConstant): Added (Borrowed from mbas)
Modified: trunk/mcs/bmcs/Makefile
===================================================================
--- trunk/mcs/bmcs/Makefile 2005-03-25 22:12:26 UTC (rev 42262)
+++ trunk/mcs/bmcs/Makefile 2005-03-26 07:55:44 UTC (rev 42263)
@@ -30,15 +30,8 @@
bmcs.exe: mb-parser.cs
gmcs -d:NET_1_1 -d:ONLY_1_1 -debug /target:exe /out:bmcs.exe
mb-parser.cs @bmcs.exe.sources -nowarn:219 -nowarn:162
-install-as-mbas: all
- cp ../class/lib/default/bmcs.exe $(prefix)/lib/mono/1.0/mbas.exe
-
winstall: all
- cp ../class/lib/default/bmcs.exe
/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v1.1.4322/
+ cp bmcs.exe $(prefix)/lib/mono/2.0/
-winstall-as-mbas: all
- cp ../class/lib/default/bmcs.exe
/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v1.1.4322/
- cp ../class/lib/default/bmcs.exe
/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v1.1.4322/mbas.exe
-
diffus:
diff --exclude='.svn' --exclude='*-parser.*' --exclude='*-tokenizer.cs'
-ruN ../gmcs ../bmcs
\ No newline at end of file
Modified: trunk/mcs/bmcs/cfold.cs
===================================================================
--- trunk/mcs/bmcs/cfold.cs 2005-03-25 22:12:26 UTC (rev 42262)
+++ trunk/mcs/bmcs/cfold.cs 2005-03-26 07:55:44 UTC (rev 42263)
@@ -999,7 +999,7 @@
Binary.Error_OperatorCannotBeApplied (loc,
">>", lt, rt);
break;
- case Binary.Operator.LogicalAnd:
+ case Binary.Operator.LogicalAndAlso:
if (left is BoolConstant && right is
BoolConstant){
return new BoolConstant (
((BoolConstant) left).Value &&
@@ -1007,7 +1007,7 @@
}
break;
- case Binary.Operator.LogicalOr:
+ case Binary.Operator.LogicalOrElse:
if (left is BoolConstant && right is
BoolConstant){
return new BoolConstant (
((BoolConstant) left).Value ||
Modified: trunk/mcs/bmcs/expression.cs
===================================================================
--- trunk/mcs/bmcs/expression.cs 2005-03-25 22:12:26 UTC (rev 42262)
+++ trunk/mcs/bmcs/expression.cs 2005-03-26 07:55:44 UTC (rev 42263)
@@ -1862,8 +1862,8 @@
BitwiseAnd,
ExclusiveOr,
BitwiseOr,
- LogicalAnd,
- LogicalOr,
+ LogicalAndAlso,
+ LogicalOrElse,
TOP
}
@@ -1893,8 +1893,8 @@
oper_names [(int) Operator.BitwiseAnd] =
"op_BitwiseAnd";
oper_names [(int) Operator.BitwiseOr] = "op_BitwiseOr";
oper_names [(int) Operator.ExclusiveOr] =
"op_ExclusiveOr";
- oper_names [(int) Operator.LogicalOr] = "op_LogicalOr";
- oper_names [(int) Operator.LogicalAnd] =
"op_LogicalAnd";
+ oper_names [(int) Operator.LogicalOrElse] =
"op_LogicalOr";
+ oper_names [(int) Operator.LogicalAndAlso] =
"op_LogicalAnd";
}
public Binary (Operator oper, Expression left, Expression
right, Location loc)
@@ -1971,10 +1971,10 @@
return "|";
case Operator.ExclusiveOr:
return "^";
- case Operator.LogicalOr:
- return "||";
- case Operator.LogicalAnd:
- return "&&";
+ case Operator.LogicalOrElse:
+ return "OrElse";
+ case Operator.LogicalAndAlso:
+ return "AndAlso";
}
return oper.ToString ();
@@ -2648,7 +2648,7 @@
if (oper == Operator.LeftShift || oper ==
Operator.RightShift)
return CheckShiftArguments (ec);
- if (oper == Operator.LogicalOr || oper ==
Operator.LogicalAnd){
+ if (oper == Operator.LogicalOrElse || oper ==
Operator.LogicalAndAlso){
if (l == TypeManager.bool_type && r ==
TypeManager.bool_type) {
type = TypeManager.bool_type;
return this;
@@ -2660,7 +2660,7 @@
}
Expression e = new ConditionalLogicalOperator (
- oper == Operator.LogicalAnd, left,
right, l, loc);
+ oper == Operator.LogicalAndAlso, left,
right, l, loc);
return e.Resolve (ec);
}
@@ -2759,8 +2759,8 @@
Constant lc = left as Constant;
if (lc != null && lc.Type == TypeManager.bool_type &&
- ((oper == Operator.LogicalAnd &&
(bool)lc.GetValue () == false) ||
- (oper == Operator.LogicalOr &&
(bool)lc.GetValue () == true))) {
+ ((oper == Operator.LogicalAndAlso &&
(bool)lc.GetValue () == false) ||
+ (oper == Operator.LogicalOrElse &&
(bool)lc.GetValue () == true))) {
// TODO: make a sense to resolve unreachable
expression as we do for statement
Report.Warning (429, 4, loc, "Unreachable
expression code detected");
@@ -2835,7 +2835,7 @@
return;
}
- } else if (oper == Operator.LogicalAnd) {
+ } else if (oper == Operator.LogicalAndAlso) {
if (onTrue) {
Label tests_end =
ig.DefineLabel ();
@@ -2850,7 +2850,7 @@
return;
- } else if (oper == Operator.LogicalOr){
+ } else if (oper == Operator.LogicalOrElse){
if (onTrue) {
left.EmitBranchable (ec, target, true);
right.EmitBranchable (ec, target, true);
@@ -2960,7 +2960,7 @@
// Handle short-circuit operators differently
// than the rest
//
- if (oper == Operator.LogicalAnd) {
+ if (oper == Operator.LogicalAndAlso) {
Label load_zero = ig.DefineLabel ();
Label end = ig.DefineLabel ();
@@ -2972,7 +2972,7 @@
ig.Emit (OpCodes.Ldc_I4_0);
ig.MarkLabel (end);
return;
- } else if (oper == Operator.LogicalOr) {
+ } else if (oper == Operator.LogicalOrElse) {
Label load_one = ig.DefineLabel ();
Label end = ig.DefineLabel ();
Modified: trunk/mcs/bmcs/gen-treedump.cs
===================================================================
--- trunk/mcs/bmcs/gen-treedump.cs 2005-03-25 22:12:26 UTC (rev 42262)
+++ trunk/mcs/bmcs/gen-treedump.cs 2005-03-26 07:55:44 UTC (rev 42263)
@@ -214,13 +214,13 @@
prec = 2;
op = "|"; break;
- case Binary.Operator.LogicalAnd:
+ case Binary.Operator.LogicalAndAlso:
prec = 1;
- op = "&&"; break;
+ op = "AndAlso"; break;
- case Binary.Operator.LogicalOr:
+ case Binary.Operator.LogicalOrElse:
prec = 0;
- op = "||"; break;
+ op = "OrElse"; break;
case Binary.Operator.ExclusiveOr:
prec = 3;
Modified: trunk/mcs/bmcs/generic.cs
===================================================================
--- trunk/mcs/bmcs/generic.cs 2005-03-25 22:12:26 UTC (rev 42262)
+++ trunk/mcs/bmcs/generic.cs 2005-03-26 07:55:44 UTC (rev 42263)
@@ -2624,7 +2624,7 @@
}
if (((Oper == Binary.Operator.BitwiseAnd) ||
(Oper == Binary.Operator.BitwiseOr) ||
- (Oper == Binary.Operator.LogicalAnd) ||
(Oper == Binary.Operator.LogicalOr)) &&
+ (Oper == Binary.Operator.LogicalAndAlso)
|| (Oper == Binary.Operator.LogicalOrElse)) &&
((left.Type == TypeManager.bool_type) &&
(right.Type == TypeManager.bool_type))) {
Expression empty = new EmptyExpression
(TypeManager.bool_type);
bool_wrap = new Wrap (empty,
loc).Resolve (ec);
@@ -2685,7 +2685,7 @@
left.Emit (ec);
ig.Emit (OpCodes.Dup);
- if ((Oper == Binary.Operator.BitwiseOr) ||
(Oper == Binary.Operator.LogicalOr))
+ if ((Oper == Binary.Operator.BitwiseOr) ||
(Oper == Binary.Operator.LogicalOrElse))
ig.Emit (OpCodes.Brtrue, wrap_label);
else
ig.Emit (OpCodes.Brfalse, wrap_label);
@@ -2695,7 +2695,7 @@
ig.Emit (OpCodes.Brfalse,
right_is_null_label);
}
- if ((Oper == Binary.Operator.LogicalAnd) ||
(Oper == Binary.Operator.LogicalOr))
+ if ((Oper == Binary.Operator.LogicalAndAlso) ||
(Oper == Binary.Operator.LogicalOrElse))
ig.Emit (OpCodes.Pop);
right.Emit (ec);
@@ -2713,7 +2713,7 @@
right.Emit (ec);
ig.Emit (OpCodes.Dup);
- if ((Oper == Binary.Operator.BitwiseOr) ||
(Oper == Binary.Operator.LogicalOr))
+ if ((Oper == Binary.Operator.BitwiseOr) ||
(Oper == Binary.Operator.LogicalOrElse))
ig.Emit (OpCodes.Brtrue, wrap_label);
else
ig.Emit (OpCodes.Brfalse, wrap_label);
Modified: trunk/mcs/bmcs/mb-parser.jay
===================================================================
--- trunk/mcs/bmcs/mb-parser.jay 2005-03-25 22:12:26 UTC (rev 42262)
+++ trunk/mcs/bmcs/mb-parser.jay 2005-03-26 07:55:44 UTC (rev 42263)
@@ -4600,12 +4600,12 @@
: negation_expression
| conditional_and_expression AND negation_expression
{
- $$ = new Binary (Binary.Operator.LogicalAnd,
- (Expression) $1, (Expression) $3,
lexer.Location);
+// $$ = new Binary (Binary.Operator.LogicalAnd,
+// (Expression) $1, (Expression) $3,
lexer.Location);
}
| conditional_and_expression ANDALSO negation_expression
{ // FIXME: this is likely to be broken
- $$ = new Binary (Binary.Operator.LogicalAnd,
+ $$ = new Binary (Binary.Operator.LogicalAndAlso,
(Expression) $1, (Expression) $3,
lexer.Location);
}
;
@@ -4614,12 +4614,12 @@
: conditional_and_expression
| conditional_or_expression OR conditional_and_expression
{
- $$ = new Binary (Binary.Operator.LogicalOr,
- (Expression) $1, (Expression) $3,
lexer.Location);
+// $$ = new Binary (Binary.Operator.LogicalOr,
+// (Expression) $1, (Expression) $3,
lexer.Location);
}
| conditional_or_expression ORELSE conditional_and_expression
{ // FIXME: this is likely to be broken
- $$ = new Binary (Binary.Operator.LogicalOr,
+ $$ = new Binary (Binary.Operator.LogicalOrElse,
(Expression) $1, (Expression) $3,
lexer.Location);
}
;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches