[svn] r7567: nemerle/trunk/ncc/typing: Macros.n TyVar.n
VladD2
svnadmin at nemerle.org
Mon Apr 2 04:45:24 CEST 2007
Log:
Remove some FatalError (it prevent intellisence)
Author: VladD2
Date: Mon Apr 2 04:45:21 2007
New Revision: 7567
Modified:
nemerle/trunk/ncc/typing/Macros.n
nemerle/trunk/ncc/typing/TyVar.n
Modified: nemerle/trunk/ncc/typing/Macros.n
==============================================================================
--- nemerle/trunk/ncc/typing/Macros.n (original)
+++ nemerle/trunk/ncc/typing/Macros.n Mon Apr 2 04:45:21 2007
@@ -791,7 +791,8 @@
| ([], _ :: _) => convert_params ([], [], acc)
| (_ :: _, []) =>
- Message.FatalError ("number of supplied parameters is too large")
+ Message.Error ("number of supplied parameters is too large");
+ []
}
};
@@ -835,14 +836,19 @@
| None when last.EndsWith ("ExactPath") => PExpr.Wildcard ()
- | None when last.EndsWith ("TypedChoose") => Message.FatalError ("typed tree cannot be used in pattern matching")
+ | None when last.EndsWith ("TypedChoose") =>
+ Message.Error ("typed tree cannot be used in pattern matching");
+ <[ () ]>
| None when last.StartsWith ("From") =>
<[ Literal.Integer ($(last.Replace ("From", "As") : dyn)
= Some ($(patternize_quotation (List.Head (pars))))) ]>
| None =>
- Util.ice ($ "expression generated from quotation has broken constructor $exp")
+ //Util.ice ($ "expression generated from quotation has broken constructor $exp")
+ DebugStop();
+ Message.Error ($"expression generated from quotation has broken constructor $exp");
+ <[ () ]>
}
| PExpr.ListLiteral (elems) =>
@@ -860,6 +866,11 @@
Util.ice ("Bad constructed quoted expression in pattern matching")
}
+ DebugStop() : void
+ {
+
+ }
+
/**
* Allows recursive analysing and rewriting given parse tree expression easily. It calls supplied function on every
* node of tree returning its result as new node.
Modified: nemerle/trunk/ncc/typing/TyVar.n
==============================================================================
--- nemerle/trunk/ncc/typing/TyVar.n (original)
+++ nemerle/trunk/ncc/typing/TyVar.n Mon Apr 2 04:45:21 2007
@@ -1195,11 +1195,18 @@
static SumSets (s1 : array [TyVar], s2 : array [TyVar]) : array [TyVar]
{
+ if (s1 == null)
+ if (s2 == null) array(0) else s2
+ else if (s2 == null)
+ s1
+ else
+ {
def size = NormalizeAndCount (s1) + NormalizeAndCount (s2);
def res = array (size + 1);
mutable res_ptr = 0;
- if (size > 42) {
+ if (size > 42)
+ {
def ht = System.Collections.Hashtable ();
foreach (tv in s1) {
when (tv != null && !ht.Contains (tv.id)) {
@@ -1215,7 +1222,9 @@
++res_ptr
}
}
- } else {
+ }
+ else
+ {
foreach (tv in s1) {
when (tv != null && !tv.ContainedIn (res, res_ptr)) {
res [res_ptr] = tv;
@@ -1232,6 +1241,7 @@
res
}
+ }
static IntersectSets (s1 : array [TyVar], s2 : array [TyVar]) : array [TyVar]
More information about the svn
mailing list