Author: martin
Date: 2005-04-19 09:43:52 -0400 (Tue, 19 Apr 2005)
New Revision: 43250
Modified:
trunk/mcs/gmcs/ChangeLog
trunk/mcs/gmcs/attribute.cs
trunk/mcs/gmcs/class.cs
trunk/mcs/gmcs/codegen.cs
trunk/mcs/gmcs/cs-parser.jay
trunk/mcs/gmcs/cs-tokenizer.cs
trunk/mcs/gmcs/enum.cs
trunk/mcs/gmcs/expression.cs
trunk/mcs/gmcs/iterators.cs
trunk/mcs/gmcs/statement.cs
Log:
**** Merged r42503 from MCS ****
Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog 2005-04-19 13:27:19 UTC (rev 43249)
+++ trunk/mcs/gmcs/ChangeLog 2005-04-19 13:43:52 UTC (rev 43250)
@@ -1,3 +1,24 @@
+2005-04-04 Marek Safar <[EMAIL PROTECTED]>
+
+ * attribute.cs (Attribute.GetValue): Removed unused.
+
+ * codegen.cs (CodeGen.TrimExt): Removed unused.
+
+ * cs-parser.jay (output): Removed unused.
+
+ * cs-tokenizer.cs (hex_digits): Removed unused.
+
+ * enum.cs (MapToInternalType, GetEnumeratorName): Removed unused.
+
+ * expression.cs (Indirection.LoadExprValue): Removed unused.
+ (ArrayCreation.ExpressionToArrayArgument): Removed unused.
+
+ * iterators.cs (Iterator.param_types): Removed unused.
+
+ * statement.cs (Goto.block): Removed unused.
+ (ToplevelBlock.did): Removed unused.
+ (Switch.ResolveConstantSwitch): Removed unused.
+
2005-04-01 Ben Maurer <[EMAIL PROTECTED]>
* rootcontext.cs: Allow mcs to bootstrap with the compilation
Modified: trunk/mcs/gmcs/attribute.cs
===================================================================
--- trunk/mcs/gmcs/attribute.cs 2005-04-19 13:27:19 UTC (rev 43249)
+++ trunk/mcs/gmcs/attribute.cs 2005-04-19 13:43:52 UTC (rev 43250)
@@ -1053,15 +1053,6 @@
}
}
}
-
- object GetValue (EmitContext ec, Constant c, Type target)
- {
- if (Convert.ImplicitConversionExists (ec, c, target))
- return c.GetValue ();
-
- Convert.Error_CannotImplicitConversion (Location,
c.Type, target);
- return null;
- }
public MethodBuilder DefinePInvokeMethod (EmitContext ec,
TypeBuilder builder, string name,
MethodAttributes
flags, Type ret_type, Type [] param_types)
Modified: trunk/mcs/gmcs/class.cs
===================================================================
--- trunk/mcs/gmcs/class.cs 2005-04-19 13:27:19 UTC (rev 43249)
+++ trunk/mcs/gmcs/class.cs 2005-04-19 13:43:52 UTC (rev 43250)
@@ -4078,7 +4078,7 @@
//
if ((ModFlags & Modifiers.METHOD_YIELDS) != 0){
Iterator iterator = new Iterator (
- Parent, Name, MemberType,
ParameterTypes,
+ Parent, Name, MemberType,
ParameterInfo, ModFlags, block,
Location);
if (!iterator.DefineIterator ())
@@ -6854,7 +6854,7 @@
if ((ModFlags & Modifiers.METHOD_YIELDS) != 0){
Iterator iterator = new Iterator (
Parent, "get", MemberType,
- TypeManager.NoTypes,
Get.ParameterInfo,
+ Get.ParameterInfo,
ModFlags, Get.Block, Location);
if (!iterator.DefineIterator ())
Modified: trunk/mcs/gmcs/codegen.cs
===================================================================
--- trunk/mcs/gmcs/codegen.cs 2005-04-19 13:27:19 UTC (rev 43249)
+++ trunk/mcs/gmcs/codegen.cs 2005-04-19 13:43:52 UTC (rev 43250)
@@ -72,13 +72,6 @@
return ".";
}
- static string TrimExt (string name)
- {
- int pos = name.LastIndexOf ('.');
-
- return name.Substring (0, pos);
- }
-
static public string FileName;
//
Modified: trunk/mcs/gmcs/cs-parser.jay
===================================================================
--- trunk/mcs/gmcs/cs-parser.jay 2005-04-19 13:27:19 UTC (rev 43249)
+++ trunk/mcs/gmcs/cs-parser.jay 2005-04-19 13:43:52 UTC (rev 43250)
@@ -4416,7 +4416,7 @@
goto_statement
: GOTO IDENTIFIER SEMICOLON
{
- $$ = new Goto (current_block, (string) $2, lexer.Location);
+ $$ = new Goto ((string) $2, lexer.Location);
}
| GOTO CASE constant_expression SEMICOLON
{
@@ -5112,11 +5112,6 @@
Report.Error (1003, l, "Syntax error, " + msg);
}
-void output (string s)
-{
- Console.WriteLine (s);
-}
-
void note (string s)
{
// Used to put annotations
Modified: trunk/mcs/gmcs/cs-tokenizer.cs
===================================================================
--- trunk/mcs/gmcs/cs-tokenizer.cs 2005-04-19 13:27:19 UTC (rev 43249)
+++ trunk/mcs/gmcs/cs-tokenizer.cs 2005-04-19 13:43:52 UTC (rev 43250)
@@ -815,14 +815,7 @@
{
return (e >= '0' && e <= '9') || (e >= 'A' && e <= 'F')
|| (e >= 'a' && e <= 'f');
}
-
- void hex_digits (int c)
- {
- if (c != -1)
- number_builder [number_pos++] = (char) c;
-
- }
-
+
int real_type_suffix (int c)
{
int t;
Modified: trunk/mcs/gmcs/enum.cs
===================================================================
--- trunk/mcs/gmcs/enum.cs 2005-04-19 13:27:19 UTC (rev 43249)
+++ trunk/mcs/gmcs/enum.cs 2005-04-19 13:43:52 UTC (rev 43250)
@@ -174,38 +174,6 @@
ordered_enums.Add (name);
member_to_location.Add (name, loc);
}
-
- //
- // This is used by corlib compilation: we map from our
- // type to a type that is consumable by the DefineField
- //
- Type MapToInternalType (Type t)
- {
- if (t == TypeManager.int32_type)
- return typeof (int);
- if (t == TypeManager.int64_type)
- return typeof (long);
- if (t == TypeManager.uint32_type)
- return typeof (uint);
- if (t == TypeManager.uint64_type)
- return typeof (ulong);
- if (t == TypeManager.float_type)
- return typeof (float);
- if (t == TypeManager.double_type)
- return typeof (double);
- if (t == TypeManager.byte_type)
- return typeof (byte);
- if (t == TypeManager.sbyte_type)
- return typeof (sbyte);
- if (t == TypeManager.char_type)
- return typeof (char);
- if (t == TypeManager.short_type)
- return typeof (short);
- if (t == TypeManager.ushort_type)
- return typeof (ushort);
-
- throw new Exception ();
- }
public override TypeBuilder DefineType ()
{
@@ -715,14 +683,6 @@
return true;
}
- /// <summary>
- /// Returns full enum name.
- /// </summary>
- string GetEnumeratorName (string valueName)
- {
- return String.Concat (Name, ".", valueName);
- }
-
//
// IMemberFinder
//
Modified: trunk/mcs/gmcs/expression.cs
===================================================================
--- trunk/mcs/gmcs/expression.cs 2005-04-19 13:27:19 UTC (rev 43249)
+++ trunk/mcs/gmcs/expression.cs 2005-04-19 13:43:52 UTC (rev 43250)
@@ -674,10 +674,6 @@
eclass = ExprClass.Variable;
loc = l;
}
-
- void LoadExprValue (EmitContext ec)
- {
- }
public override void Emit (EmitContext ec)
{
@@ -810,14 +806,6 @@
"++" : "--";
}
- void Error23 (Type t)
- {
- Error (
- 23, "Operator " + OperName (mode) +
- " cannot be applied to operand of type `" +
- TypeManager.CSharpName (t) + "'");
- }
-
/// <summary>
/// Returns whether an object of type `t' can be incremented
/// or decremented with add/sub (ie, basically whether we can
@@ -6435,53 +6423,6 @@
}
//
- // Converts `source' to an int, uint, long or ulong.
- //
- Expression ExpressionToArrayArgument (EmitContext ec,
Expression source)
- {
- Expression target;
-
- bool old_checked = ec.CheckState;
- ec.CheckState = true;
-
- target = Convert.ImplicitConversion (ec, source,
TypeManager.int32_type, loc);
- if (target == null){
- target = Convert.ImplicitConversion (ec,
source, TypeManager.uint32_type, loc);
- if (target == null){
- target = Convert.ImplicitConversion
(ec, source, TypeManager.int64_type, loc);
- if (target == null){
- target =
Convert.ImplicitConversion (ec, source, TypeManager.uint64_type, loc);
- if (target == null)
-
Convert.Error_CannotImplicitConversion (loc, source.Type,
TypeManager.int32_type);
- }
- }
- }
- ec.CheckState = old_checked;
-
- //
- // Only positive constants are allowed at compile time
- //
- if (target is Constant){
- if (target is IntConstant){
- if (((IntConstant) target).Value < 0){
-
Expression.Error_NegativeArrayIndex (loc);
- return null;
- }
- }
-
- if (target is LongConstant){
- if (((LongConstant) target).Value < 0){
-
Expression.Error_NegativeArrayIndex (loc);
- return null;
- }
- }
-
- }
-
- return target;
- }
-
- //
// Creates the type of the array
//
bool LookupType (EmitContext ec)
Modified: trunk/mcs/gmcs/iterators.cs
===================================================================
--- trunk/mcs/gmcs/iterators.cs 2005-04-19 13:27:19 UTC (rev 43249)
+++ trunk/mcs/gmcs/iterators.cs 2005-04-19 13:43:52 UTC (rev 43250)
@@ -140,7 +140,6 @@
TypeExpr current_type;
Type this_type;
Type return_type;
- Type [] param_types;
InternalParameters parameters;
MethodInfo dispose_method;
@@ -363,14 +362,13 @@
// Our constructor
//
public Iterator (TypeContainer container, string name, Type
return_type,
- Type [] param_types, InternalParameters
parameters,
+ InternalParameters parameters,
int modifiers, ToplevelBlock block, Location
loc)
: base (container.NamespaceEntry, container,
MakeProxyName (name),
(modifiers & Modifiers.UNSAFE) |
Modifiers.PRIVATE, null, loc)
{
this.container = container;
this.return_type = return_type;
- this.param_types = param_types;
this.parameters = parameters;
this.original_name = name;
this.original_block = block;
Modified: trunk/mcs/gmcs/statement.cs
===================================================================
--- trunk/mcs/gmcs/statement.cs 2005-04-19 13:27:19 UTC (rev 43249)
+++ trunk/mcs/gmcs/statement.cs 2005-04-19 13:43:52 UTC (rev 43250)
@@ -642,7 +642,6 @@
public class Goto : Statement {
string target;
- Block block;
LabeledStatement label;
public override bool Resolve (EmitContext ec)
@@ -661,9 +660,8 @@
return true;
}
- public Goto (Block parent_block, string label, Location l)
+ public Goto (string label, Location l)
{
- block = parent_block;
loc = l;
target = label;
}
@@ -2112,8 +2110,6 @@
Hashtable capture_contexts;
- static int did = 0;
-
//
// The parameters for the block.
//
@@ -2949,24 +2945,6 @@
return null;
}
- bool ResolveConstantSwitch (EmitContext ec)
- {
- object key = ((Constant) new_expr).GetValue ();
- SwitchLabel label = (SwitchLabel) Elements [key];
-
- if (label == null)
- return true;
-
- constant_section = FindSection (label);
- if (constant_section == null)
- return true;
-
- if (constant_section.Block.Resolve (ec) != true)
- return false;
-
- return true;
- }
-
public override bool Resolve (EmitContext ec)
{
Expr = Expr.Resolve (ec);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches