Author: cesar
Date: 2005-04-08 18:58:21 -0400 (Fri, 08 Apr 2005)
New Revision: 42719
Modified:
trunk/mcs/class/Microsoft.JScript/Microsoft.JScript/Literal.cs
trunk/mcs/class/Microsoft.JScript/Microsoft.JScript/SemanticAnalizer.cs
Log:
fix the build
Modified: trunk/mcs/class/Microsoft.JScript/Microsoft.JScript/Literal.cs
===================================================================
--- trunk/mcs/class/Microsoft.JScript/Microsoft.JScript/Literal.cs
2005-04-08 22:57:17 UTC (rev 42718)
+++ trunk/mcs/class/Microsoft.JScript/Microsoft.JScript/Literal.cs
2005-04-08 22:58:21 UTC (rev 42719)
@@ -242,8 +242,7 @@
ILGenerator ig = ec.ig;
TypeBuilder type = ec.type_builder;
- //FieldBuilder field = type.DefineField
(SemanticAnalyser.NextAnonymousRegExpObj, typeof (RegExpObject),
FieldAttributes.Public | FieldAttributes.Static);
- FieldBuilder field = null;
+ FieldBuilder field = type.DefineField
(SemanticAnalyser.NextAnonymousRegExpObj, typeof (RegExpObject),
FieldAttributes.Public | FieldAttributes.Static);
Label label = ig.DefineLabel ();
Modified:
trunk/mcs/class/Microsoft.JScript/Microsoft.JScript/SemanticAnalizer.cs
===================================================================
--- trunk/mcs/class/Microsoft.JScript/Microsoft.JScript/SemanticAnalizer.cs
2005-04-08 22:57:17 UTC (rev 42718)
+++ trunk/mcs/class/Microsoft.JScript/Microsoft.JScript/SemanticAnalizer.cs
2005-04-08 22:58:21 UTC (rev 42719)
@@ -43,6 +43,8 @@
static IdentificationTable label_set;
private static Hashtable obj_ctrs;
+ private static Hashtable prototypes;
+
//
// Type to GlobalObject
//
@@ -57,6 +59,17 @@
obj_ctrs.Add ("Math", typeof (MathObject));
obj_ctrs.Add ("Number", typeof (NumberConstructor));
obj_ctrs.Add ("String", typeof (StringConstructor));
+
+ prototypes = new Hashtable ();
+ prototypes.Add (typeof (object), typeof
(ObjectPrototype));
+ prototypes.Add (typeof (FunctionObject), typeof
(FunctionPrototype));
+ prototypes.Add (typeof (ArrayObject), typeof
(ArrayPrototype));
+ prototypes.Add (typeof (StringObject), typeof
(StringPrototype));
+ prototypes.Add (typeof (BooleanObject), typeof
(BooleanPrototype));
+ prototypes.Add (typeof (NumberObject), typeof
(NumberPrototype));
+ prototypes.Add (typeof (DateObject), typeof
(DatePrototype));
+ prototypes.Add (typeof (RegExpObject), typeof
(RegExpPrototype));
+ // FIXME: Error objects missing
}
internal static string ImplementationName (string name)
@@ -85,6 +98,14 @@
}
}
+ static int anon_regExp_counter = -1;
+ internal static string NextAnonymousRegExpObj {
+ get {
+ anon_regExp_counter++;
+ return "regexp " + anon_regExp_counter;
+ }
+ }
+
internal static string CurrentAnonymousMethod {
get { return "anonymous " + anon_method_counter; }
}
@@ -160,5 +181,12 @@
}
return null;
}
+
+ internal static Type map_to_prototype (JSObject jsObj)
+ {
+ if (jsObj == null)
+ throw new Exception ("jsObj can't be null");
+ return (Type) prototypes [jsObj.GetType ()];
+ }
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches