[svn] r6266: nemerle/trunk/ncc: generation/ILEmitter.n
generation/Typer3.n generation/Typer4.n misc/Pretty...
nazgul
svnadmin at nemerle.org
Sat May 13 15:26:45 CEST 2006
Log:
Remove NotNull TExpr node
Author: nazgul
Date: Sat May 13 15:26:41 2006
New Revision: 6266
Modified:
nemerle/trunk/ncc/generation/ILEmitter.n
nemerle/trunk/ncc/generation/Typer3.n
nemerle/trunk/ncc/generation/Typer4.n
nemerle/trunk/ncc/misc/PrettyPrint.n
nemerle/trunk/ncc/typing/TypedTree.n
nemerle/trunk/ncc/typing/Typer.n
nemerle/trunk/ncc/typing/Typer2.n
Modified: nemerle/trunk/ncc/generation/ILEmitter.n
==============================================================================
--- nemerle/trunk/ncc/generation/ILEmitter.n (original)
+++ nemerle/trunk/ncc/generation/ILEmitter.n Sat May 13 15:26:41 2006
@@ -620,19 +620,6 @@
_ilg.MarkLabel (label_condition_continue);
- /* emit a nullness check construction */
- | NotNull (val) =>
- emit (val);
- def label_condition_not_null = _ilg.DefineLabel ();
-
- Mark (expr.loc);
- _ilg.Emit (OpCodes.Brtrue_S, label_condition_not_null);
-
- _ilg.ThrowException (SystemType.NullMatchException);
-
- _ilg.MarkLabel (label_condition_not_null);
-
-
| DefaultValue =>
def ty = expr.SystemType;
if (is_void (expr.MType)) {}
Modified: nemerle/trunk/ncc/generation/Typer3.n
==============================================================================
--- nemerle/trunk/ncc/generation/Typer3.n (original)
+++ nemerle/trunk/ncc/generation/Typer3.n Sat May 13 15:26:41 2006
@@ -1808,7 +1808,6 @@
| Goto
| DefaultValue
| If
- | NotNull
| Switch =>
null
Modified: nemerle/trunk/ncc/generation/Typer4.n
==============================================================================
--- nemerle/trunk/ncc/generation/Typer4.n (original)
+++ nemerle/trunk/ncc/generation/Typer4.n Sat May 13 15:26:41 2006
@@ -325,8 +325,7 @@
false
| FieldMember (e, _)
- | TupleIndexer (e, _, _)
- | NotNull (e) =>
+ | TupleIndexer (e, _, _) =>
NoThrowPlease (e);
false
Modified: nemerle/trunk/ncc/misc/PrettyPrint.n
==============================================================================
--- nemerle/trunk/ncc/misc/PrettyPrint.n (original)
+++ nemerle/trunk/ncc/misc/PrettyPrint.n Sat May 13 15:26:41 2006
@@ -958,9 +958,6 @@
| TT.TExpr.DefaultValue =>
append ("DEFAULT")
- | TT.TExpr.NotNull (e) =>
- append ($"when ($e == null) throw NullMatchException ();")
-
| TT.TExpr.Switch (indexing, defl, cases) =>
append ($ "switch ($indexing) $defl $cases")
Modified: nemerle/trunk/ncc/typing/TypedTree.n
==============================================================================
--- nemerle/trunk/ncc/typing/TypedTree.n (original)
+++ nemerle/trunk/ncc/typing/TypedTree.n Sat May 13 15:26:41 2006
@@ -490,7 +490,6 @@
| DefaultValue
| If { cond : TExpr; e_then : TExpr; e_else : TExpr; }
| HasType { expr : TExpr; test_ty : MType; }
- | NotNull { expr : TExpr; }
| Switch { indexing_expr : TExpr;
default : option [TExpr];
cases : list [int * TExpr]; }
@@ -871,13 +870,6 @@
HasType (e, t)
- | NotNull (e) =>
- def e = null_walk (f, e);
- if (e == null) null
- else
- NotNull (walk (f, e))
-
-
| Throw (exn) =>
// exception can be null for `throw;' rethrow expression
if (exn != null) {
Modified: nemerle/trunk/ncc/typing/Typer.n
==============================================================================
--- nemerle/trunk/ncc/typing/Typer.n (original)
+++ nemerle/trunk/ncc/typing/Typer.n Sat May 13 15:26:41 2006
@@ -3321,7 +3321,6 @@
}
| TExpr.TryFault
- | TExpr.NotNull
| TExpr.Switch
| TExpr.DefaultValue
| TExpr.Goto
Modified: nemerle/trunk/ncc/typing/Typer2.n
==============================================================================
--- nemerle/trunk/ncc/typing/Typer2.n (original)
+++ nemerle/trunk/ncc/typing/Typer2.n Sat May 13 15:26:41 2006
@@ -1278,7 +1278,6 @@
| TExpr.TryFault
- | TExpr.NotNull
| TExpr.Switch
| TExpr.MultipleAssign
| TExpr.MethodAddress => assert (false)
More information about the svn
mailing list