[svn] r7766: nemerle/trunk/ncc: generation/DecisionTreeCompiler.n
generation/ILEmitter.n generation/Typer3...
IT
svnadmin at nemerle.org
Thu Aug 23 00:53:04 CEST 2007
Log:
1. Support PExpr.TypedObject for delay typing.
2. Local variables visibility for debugger.
Author: IT
Date: Thu Aug 23 00:52:59 2007
New Revision: 7766
Modified:
nemerle/trunk/ncc/generation/DecisionTreeCompiler.n
nemerle/trunk/ncc/generation/ILEmitter.n
nemerle/trunk/ncc/generation/Typer3.n
nemerle/trunk/ncc/parsing/MainParser.n
nemerle/trunk/ncc/typing/DecisionTreeBuilder.n
nemerle/trunk/ncc/typing/LocalValue.n
nemerle/trunk/ncc/typing/Typer-DelayedTyping.n
nemerle/trunk/ncc/typing/Typer.n
Modified: nemerle/trunk/ncc/generation/DecisionTreeCompiler.n
==============================================================================
--- nemerle/trunk/ncc/generation/DecisionTreeCompiler.n (original)
+++ nemerle/trunk/ncc/generation/DecisionTreeCompiler.n Thu Aug 23 00:52:59 2007
@@ -212,7 +212,11 @@
def path_expr = get_path_expression (path);
def assign_expr = TExpr.Assign (TExpr.LocalRef (decl.Type, decl),
Cast (path_expr, decl.Type));
+
+ def loc = get_debug_loc (decision);
def expr = compile (dtree);
+ def expr = if (loc.IsEmpty) expr else TExpr.DebugInfo (loc, null, expr, null);
+
Sequence (assign_expr, expr)
| IfEq (_, DecisionTreeBuilder.Con.Guard,
@@ -260,13 +264,16 @@
get_debug_loc (decision : Decision) : Location
{
- if (Manager.Options.EmitDebug && !decision.Location.IsGeneratedOrEmpty)
+ if (Manager.Options.EmitDebug && !decision.Location.IsGeneratedOrEmpty && !decision.IsDebugMarked)
{
match (decision)
{
| Success
- | Assign => decision.Location;
- | _ => Location.Default;
+ | Assign =>
+ decision.MarkDebug();
+ decision.Location;
+ | _ =>
+ Location.Default;
}
}
else
Modified: nemerle/trunk/ncc/generation/ILEmitter.n
==============================================================================
--- nemerle/trunk/ncc/generation/ILEmitter.n (original)
+++ nemerle/trunk/ncc/generation/ILEmitter.n Thu Aug 23 00:52:59 2007
@@ -111,6 +111,7 @@
unless (body.Throws)
_ilg.Emit (OpCodes.Ret);
+
// let GC take it
_method_builder.GetHeader ().body = FunBody.ILed ();
| _ => Util.ice ($"method $_method_name is already ILed")
@@ -505,38 +506,30 @@
/* emits a local value definition */
| DefValIn (decl, let_val, let_in) =>
- def newscope =
match (let_val) {
| DefaultValue =>
- if (is_void (decl.Type))
- false
- else {
- _ = declare_val_local_slot (decl);
- true
- }
+ unless (is_void (decl.Type))
+ declare_val_local_slot_ex (decl);
| ImplicitValueTypeCtor =>
def slot = declare_val_local_slot (decl);
_ilg.Emit (OpCodes.Ldloca, slot);
_ilg.Emit (OpCodes.Initobj, let_val.SystemType);
- true
| _ =>
emit (let_val);
- if (is_void (decl.Type))
- false
- else if (!decl.EverUsed) {
+ unless (is_void (decl.Type)) {
+ if (!decl.EverUsed) {
_ilg.Emit (OpCodes.Pop);
- false
} else {
def local_slot = declare_val_local_slot (decl);
unless (let_val.Throws)
_ilg.Emit (OpCodes.Stloc, local_slot);
- true
}
}
+ }
+
emit (let_in);
- when (IsDebugEnabled && newscope) _ilg.EndScope ();
/* -- CONDITIONAL CONSTRUCTIONS ------------------------------------ */
@@ -630,17 +623,32 @@
def label_condition_else = _ilg.DefineLabel ();
def label_condition_fi = _ilg.DefineLabel ();
+ def inScope(emit)
+ {
+ _ilg.BeginScope ();
+ emit ();
+ _ilg.EndScope ();
+ }
+
+ inScope (() => {
emit_branch (cond_expr, label_condition_else, else_debug_loc);
+ inScope (() => {
emit_debug (then_debug_loc);
emit (then_expr);
+ });
+
unless (then_expr.Throws)
_ilg.Emit (OpCodes.Br, label_condition_fi);
+ inScope (() => {
_ilg.MarkLabel (label_condition_else);
emit (else_expr);
+ });
_ilg.MarkLabel (label_condition_fi);
+ });
+
/* emit a type check construction */
| HasType (expr, ty) =>
@@ -1270,8 +1278,6 @@
_ilg.Emit (OpCodes.Stloc, catch_val_local_slot);
emit (catch_expr);
- // close scope opened by declare_val_local_slot
- when (IsDebugEnabled) _ilg.EndScope ();
unless (catch_expr.Throws || ignore_try_result)
_ilg.Emit (OpCodes.Stloc, try_result);
@@ -1304,7 +1310,6 @@
_ilg.BeginCatchBlock (null);
_ilg.Emit (OpCodes.Pop); // ignore value on stack, it's already local
emit (catch_expr);
- when (IsDebugEnabled) _ilg.EndScope ();
unless (catch_expr.Throws || ignore_try_result)
_ilg.Emit (OpCodes.Stloc, try_result);
@@ -1377,13 +1382,11 @@
/* creates object of value type using implicit ctor */
| ImplicitValueTypeCtor =>
- when (IsDebugEnabled) _ilg.BeginScope ();
def t = expr.SystemType;
def local_slot = _ilg.DeclareLocal (t);
_ilg.Emit (OpCodes.Ldloca, local_slot);
_ilg.Emit (OpCodes.Initobj, t);
_ilg.Emit (OpCodes.Ldloc, local_slot);
- when (IsDebugEnabled) _ilg.EndScope ();
/* creates a new array, given a list of initializers */
@@ -1489,7 +1492,10 @@
match (di.pexpr)
{
- | Sequence => emit_debug (l.Line, l.Column, l.Line, l.Column + 1);
+ | Sequence =>
+ emit_debug (l.Line, l.Column, l.Line, l.Column + 1);
+ _ilg.BeginScope ();
+
| _ => emit_debug (l.Line, l.Column, l.EndLine, l.EndColumn);
}
@@ -1498,7 +1504,10 @@
match (di.pexpr)
{
- | Sequence => emit_debug (l.EndLine, l.EndColumn - 1, l.EndLine, l.EndColumn);
+ | Sequence =>
+ emit_debug (l.EndLine, l.EndColumn - 1, l.EndLine, l.EndColumn);
+ _ilg.EndScope ();
+
| _ => ()
}
}
@@ -1868,19 +1877,26 @@
*/
private declare_val_local_slot (val : LocalValue) : LocalBuilder
{
- when (IsDebugEnabled) _ilg.BeginScope ();
-
def ty =
if (val.IsManagedPtr)
val.Type.SystemType.MakeByRefType ()
else val.Type.SystemType;
def local_slot = _ilg.DeclareLocal (ty);
- when (IsDebugEnabled) local_slot.SetLocalSymInfo (val.Name);
+ when (IsDebugEnabled && !val.Location.IsGeneratedOrEmpty)
+ local_slot.SetLocalSymInfo (val.Name);
val.LocalSlot = local_slot;
local_slot
}
+ private declare_val_local_slot_ex (val : LocalValue) : void
+ {
+ if (val.PostponedDeclaration && IsDebugEnabled && !val.Location.IsGeneratedOrEmpty)
+ val.Declare = fun() { _ = declare_val_local_slot (val) };
+ else
+ _ = declare_val_local_slot (val)
+ }
+
/**
* Emits a STELEM instruction for a given type
*
Modified: nemerle/trunk/ncc/generation/Typer3.n
==============================================================================
--- nemerle/trunk/ncc/generation/Typer3.n (original)
+++ nemerle/trunk/ncc/generation/Typer3.n Thu Aug 23 00:52:59 2007
@@ -2010,6 +2010,7 @@
else {
// Message.Debug ($"store $decl $(decl.Id)");
decl.UseFrom (current_local_fun);
+ decl.PostponedDeclaration = true;
TExpr.DefValIn (expr.Type, decl,
TExpr.DefaultValue (decl.Type), expr)
}
Modified: nemerle/trunk/ncc/parsing/MainParser.n
==============================================================================
--- nemerle/trunk/ncc/parsing/MainParser.n (original)
+++ nemerle/trunk/ncc/parsing/MainParser.n Thu Aug 23 00:52:59 2007
@@ -528,16 +528,16 @@
def tok = get_token ();
def loc = tok.Location;
match (tok) {
- | Token.Identifier (n) => Splicable.Name (loc, mkname (n))
+ | Token.Identifier (n) => Splicable.Name (loc, mkname (n, loc))
- | Token.IdentifierToComplete (pref) => Splicable.HalfId (loc, mkname (pref))
+ | Token.IdentifierToComplete (pref) => Splicable.HalfId (loc, mkname (pref, loc))
| Token.Operator ("$") =>
def second = get_token ();
def loc = loc + second.Location;
match (second) {
| Token.Identifier (id) =>
- Splicable.Expression (loc, PExpr.Ref (loc, mkname (id)))
+ Splicable.Expression (loc, PExpr.Ref (loc, mkname (id, loc)))
| Token.RoundGroup (group) =>
push_stream (group);
@@ -558,7 +558,7 @@
| Token.Keyword ("enum" as ty)
| Token.Identifier (ty) =>
Splicable.Expression (loc, PExpr.TypeEnforcement
- (loc, expr, PExpr.Ref (loc, mkname (ty))))
+ (loc, expr, PExpr.Ref (loc, mkname (ty, tok.Location))))
| x =>
Splicable.Expression (fatal_error (x, "expecting identifier specifying splicing type"))
@@ -2387,9 +2387,9 @@
}
}
- | Token.Identifier (i) => PExpr.Ref (loc, mkname (i))
+ | Token.Identifier (i) => PExpr.Ref (loc, mkname (i, loc))
- | Token.IdentifierToComplete (i) => PExpr.ToComplete (loc, mkname (i))
+ | Token.IdentifierToComplete (i) => PExpr.ToComplete (loc, mkname (i, loc))
| Token.Keyword (k) =>
// here the expression syntax extensions are triggered, by first keyword
Modified: nemerle/trunk/ncc/typing/DecisionTreeBuilder.n
==============================================================================
--- nemerle/trunk/ncc/typing/DecisionTreeBuilder.n (original)
+++ nemerle/trunk/ncc/typing/DecisionTreeBuilder.n Thu Aug 23 00:52:59 2007
@@ -494,8 +494,13 @@
[Accessor (flags = WantSetter)]
mutable in_deg : int;
- [Accessor]
- mutable location : Location;
+ [Accessor] mutable location : Location;
+ [Accessor] mutable is_debug_marked : bool;
+
+ internal MarkDebug () : void
+ {
+ is_debug_marked = true;
+ }
public IsShared : bool
{
Modified: nemerle/trunk/ncc/typing/LocalValue.n
==============================================================================
--- nemerle/trunk/ncc/typing/LocalValue.n (original)
+++ nemerle/trunk/ncc/typing/LocalValue.n Thu Aug 23 00:52:59 2007
@@ -54,6 +54,11 @@
[Accessor (flags = WantSetter)] mutable is_managed_ptr : bool;
[Accessor (flags = WantSetter | Internal)] mutable never_closurise : bool;
+ // The declaration will be postponed to actual use.
+ // We need it to reduce the variable visible scope in the debugger.
+ [Accessor (flags = WantSetter | Internal)] mutable postponed_declaration : bool;
+ [Accessor (flags = WantSetter | Internal)] mutable declare : void -> void;
+
// Use of Kind.BlockReturn would be better,
// but it results in error at Typer2.n line 746
[Accessor (flags = WantSetter)]
@@ -152,6 +157,12 @@
CheckIL () : void
{
+ when (postponed_declaration)
+ {
+ postponed_declaration = false;
+ when (declare != null)
+ declare();
+ }
Util.cassert (! (ilkind is ILKind.None),
$ "ilkind is none for $this (id=$id)");
}
Modified: nemerle/trunk/ncc/typing/Typer-DelayedTyping.n
==============================================================================
--- nemerle/trunk/ncc/typing/Typer-DelayedTyping.n (original)
+++ nemerle/trunk/ncc/typing/Typer-DelayedTyping.n Thu Aug 23 00:52:59 2007
@@ -80,6 +80,7 @@
typer : Typer;
local_context : LocalContext;
expected : TyVar;
+ mutable pexpr : PT.PExpr;
mutable generic_specifier : list [TyVar];
[Record]
@@ -99,9 +100,8 @@
public mutable filtering_expression : TExpr.Call;
public mutable need_ref : bool;
public mutable need_write : bool;
- public mutable pexpr : object;
- public this (pexpr : object) { this.pexpr = pexpr}
+ public this () {}
}
@@ -132,6 +132,8 @@
{
match (k) {
| Kind.Resolved (expr) =>
+ when (PExpr != null)
+ PExpr.typed_object = expr;
_ = typer.Expect (expected, expr.Type, "resolved overload");
| _ => {}
}
@@ -142,15 +144,15 @@
match (meth.BuiltinKind) {
| BuiltinMethodKind.OpCode (ch, unch) =>
def opcode = if (local_context.IsChecked) ch else unch;
- Kind.Resolved (k.pexpr, TExpr.OpCode (expr.Location, expr.ty, opcode))
+ Kind.Resolved (TExpr.OpCode (expr.Location, expr.ty, opcode))
| _ => k
}
| Kind.Overloaded (lst) =>
when (expected.Hint.IsNone && List.ForAll (lst, x => x.Type is MType.Fun))
_ = expected.Unify (MType.Fun (typer.FreshTyVar (), typer.FreshTyVar ()));
- Kind.Overloaded (k.pexpr, OverloadPossibility.Unique (lst))
+ Kind.Overloaded (OverloadPossibility.Unique (lst))
| Kind.OverloadedOperator (lst, t1, t2, n, e, s) =>
- Kind.OverloadedOperator (k.pexpr, OverloadPossibility.Unique (lst), t1, t2, n, e, s)
+ Kind.OverloadedOperator (OverloadPossibility.Unique (lst), t1, t2, n, e, s)
| _ => k
}
@@ -260,7 +262,7 @@
})) {
| [] => false
| newlst =>
- SetKind (Kind.Overloaded (kind.pexpr, newlst));
+ SetKind (Kind.Overloaded (newlst));
true
}
@@ -297,7 +299,7 @@
});
if (newlst is []) {}
- else SetKind (Kind.OverloadedOperator (DtKind.pexpr, newlst, t1, t2, n, e, s));
+ else SetKind (Kind.OverloadedOperator (newlst, t1, t2, n, e, s));
}
| Kind.Overloaded (lst) =>
@@ -311,7 +313,7 @@
});
if (newlst is []) {}
- else SetKind (Kind.Overloaded (DtKind.pexpr, newlst));
+ else SetKind (Kind.Overloaded (newlst));
}
| _ => {}
@@ -414,6 +416,13 @@
}
+ public PExpr : PT.PExpr
+ {
+ get { pexpr }
+ set { pexpr = value }
+ }
+
+
public CanSetCallExpr : bool
{
get {
@@ -662,10 +671,10 @@
ReportError (messenger,
$ "there is no member named `$(name)' "
"in $(TypeOf (e)) with type $expected");
- SetKind (Kind.Error (DtKind.pexpr))
+ SetKind (Kind.Error ())
| Some (lst) =>
- SetKind (Kind.Overloaded (DtKind.pexpr, lst));
+ SetKind (Kind.Overloaded (lst));
when (DtKind.need_write && !ExpectLValue (false))
ReportError (messenger, $"needed writable value, got $lst");
@@ -691,13 +700,13 @@
when (o'.Length != overloads.Length || o'.Length == 1)
match (o') {
| [] =>
- SetKind (Kind.Error (DtKind.pexpr))
+ SetKind (Kind.Error ())
| [one] =>
- SetKind (Kind.Resolved (DtKind.pexpr, one.Compile ()))
+ SetKind (Kind.Resolved (one.Compile ()))
| lst =>
- SetKind (Kind.Overloaded (DtKind.pexpr, lst))
+ SetKind (Kind.Overloaded (lst))
}
| Kind.OverloadedOperator (overloads, t1, t2, name, env, seen) =>
def not_seen (l) {
@@ -715,7 +724,7 @@
false
else
{
- SetKind (Kind.OverloadedOperator (DtKind.pexpr, lst, t1, t2, name, env, seen));
+ SetKind (Kind.OverloadedOperator (lst, t1, t2, name, env, seen));
Resolve ();
true
}
@@ -749,10 +758,10 @@
|| typer.BadnessAllowed > 1 =>
when (expr != null) //ResolveOverload maybe wasn't called, but it should be to set stuff in expr
_ = ResolveOverload (overloads, expr.parms, expr.Type);
- SetKind (Kind.Resolved (DtKind.pexpr, one.Compile ()))
+ SetKind (Kind.Resolved (one.Compile ()))
| lst =>
- SetKind (Kind.OverloadedOperator (DtKind.pexpr, lst, t1, t2, name, env, seen));
+ SetKind (Kind.OverloadedOperator (lst, t1, t2, name, env, seen));
}
}
@@ -770,21 +779,21 @@
res = OverloadPossibility.Unique (res);
res
}
- SetKind (Kind.OverloadedOperator (DtKind.pexpr, operators, t1, t2, name, env, operators));
+ SetKind (Kind.OverloadedOperator (operators, t1, t2, name, env, operators));
Resolve ()
| Kind.Resolved (expr) =>
unless (typer.Expect (expected, expr.Type, "already resolved overload"))
- SetKind (Kind.Error (DtKind.pexpr))
+ SetKind (Kind.Error ())
| Kind.Macro (action) =>
Util.locate (Location,
match (action.Resolve (false)) {
| Some (expr) =>
if (typer.Expect (expected, expr.Type, $ "result of $action execution"))
- SetKind (Kind.Resolved (DtKind.pexpr, expr))
+ SetKind (Kind.Resolved (expr))
else
- SetKind (Kind.Error (DtKind.pexpr))
+ SetKind (Kind.Error ())
| None => {}
})
Modified: nemerle/trunk/ncc/typing/Typer.n
==============================================================================
--- nemerle/trunk/ncc/typing/Typer.n (original)
+++ nemerle/trunk/ncc/typing/Typer.n Thu Aug 23 00:52:59 2007
@@ -472,14 +472,9 @@
DefineLocal (name : PT.Name, ty : TyVar,
kind : LocalValue.Kind, is_mutable : bool) : LocalValue
{
- LocalValue (current_fun, name.Id, ty, kind, is_mutable)
+ LocalValue (current_fun, name.Id, name.Location, ty, kind, is_mutable)
}
- DefineLocal (name : PT.Name, name_location : Location, ty : TyVar,
- kind : LocalValue.Kind, is_mutable : bool) : LocalValue
- {
- LocalValue (current_fun, name.Id, name_location, ty, kind, is_mutable)
- }
public AddRedirection (name : PT.Name, subst : PT.PExpr) : void
{
@@ -591,7 +586,7 @@
internal DelayAction (expected : TyVar, action : DelayedAction) : TExpr
{
- def kind = DelayedTyping.Kind.Macro (null, action);
+ def kind = DelayedTyping.Kind.Macro (action);
def dt = DelayedTyping (this, kind, expected);
dt.Resolve ();
TExpr.Delayed (expected, dt)
@@ -616,7 +611,7 @@
(expr, o.Member)
| lst =>
- (Delay (DelayedTyping.Kind.Overloaded (null, lst), expected), null)
+ (Delay (DelayedTyping.Kind.Overloaded (lst), expected), null)
}
}
@@ -1216,11 +1211,11 @@
def is_mutable = expression is PT.PExpr.DefMutable;
if (Expect (expected, InternalType.Void, "definition ``result''"))
if (is_toplevel_in_seq)
- TypeLocalDefinition (is_mutable, name.name, name.Location, val)
+ TypeLocalDefinition (is_mutable, name.name, val)
else
try {
PushLocals ();
- TypeLocalDefinition (is_mutable, name.name, name.Location, val)
+ TypeLocalDefinition (is_mutable, name.name, val)
} finally {
PopLocals ()
}
@@ -1504,7 +1499,7 @@
}
- | PT.PExpr.Member (obj, PT.Splicable.Name as name) as mem =>
+ | PT.PExpr.Member (obj, PT.Splicable.Name as name) =>
def mem_name = name.body.Id;
if (CanBeTypeName (obj))
match (TryTyping (fun () { TypeName (expression, expected) })) {
@@ -1524,20 +1519,20 @@
TypeName (expression, expected)
else
if (messenger.InErrorMode) {
- def e = TryTyping (fun () { TypeMemberExpr (mem, obj, name, expected) });
+ def e = TryTyping (fun () { TypeMemberExpr (obj, name, expected) });
if (IsError (e))
TypeName (expression, expected)
else
- TypeMemberExpr (mem, obj, name, expected)
+ TypeMemberExpr (obj, name, expected)
} else
- TypeMemberExpr (mem, obj, name, expected)
+ TypeMemberExpr (obj, name, expected)
} else
- TypeMemberExpr (mem, obj, name, expected)
+ TypeMemberExpr (obj, name, expected)
| e => e
}
else
- TypeMemberExpr (mem, TypeExpr (obj), name, expected)
+ TypeMemberExpr (TypeExpr (obj), name, expected)
| PT.PExpr.Member (_, null) =>
ReportError (messenger, "expected member");
@@ -1573,14 +1568,14 @@
e.SkipWriteCheck = true;
e
- | PT.PExpr.Call (fnc, parms) as call =>
+ | PT.PExpr.Call (fnc, parms) =>
if (parms.Exists (fun (_) {
| <[ _ ]> => true
| _ => false
}) || fnc is <[ _ . $_ ]>)
TypeExpr (PartialApplication (expression), expected)
else
- TypeCall (call, fnc, parms, expected, is_property = false);
+ TypeCall (fnc, parms, expected, is_property = false);
| PT.PExpr.Assign (PT.PExpr.Tuple (vars), e2) =>
@@ -1801,7 +1796,14 @@
}
when (expression.typed_object == null)
+ {
expression.typed_object = texpr;
+ match (texpr)
+ {
+ | TExpr.Delayed as d => d.susp.PExpr = expression;
+ | _ => ()
+ }
+ }
if (debugLocation.IsEmpty)
texpr
@@ -1944,11 +1946,6 @@
TypeLocalDefinition (is_mutable : bool, name : PT.Name, val : PT.PExpr) : TExpr.DefValIn
{
- TypeLocalDefinition (is_mutable, name, Location.Default, val)
- }
-
- TypeLocalDefinition (is_mutable : bool, name : PT.Name, name_location : Location, val : PT.PExpr) : TExpr.DefValIn
- {
// check for mutable symbol redefinitions
match (local_context.FindLocal (name)) {
| Some (l) =>
@@ -1978,11 +1975,11 @@
tv'.ForceProvide (tv);
(ImplicitCast (val, tv'), tv')
} else (val, tv);
- def decl = DefineLocal (name, name_location, decl_ty,
+ def decl = DefineLocal (name, decl_ty,
LocalValue.Kind.Plain (),
is_mutable);
AddLocal (name, decl);
- TExpr.DefValIn (name_location.Combine(val.Location), null, decl, val, null)
+ TExpr.DefValIn (name.Location.Combine(val.Location), null, decl, val, null)
}
@@ -2046,7 +2043,6 @@
def parents = current_fun :: current_fun.GetParents ();
def local =
DefineLocal (name_obj,
- fn.header.name.Location,
fun_type,
LocalValue.Kind.Function (header, parents),
is_mutable = false);
@@ -2229,7 +2225,7 @@
| TExpr.PropertyMember (_, prop) when prop.IsIndexer
| TExpr.StaticPropertyRef (_, prop) when prop.IsIndexer
| TExpr.Delayed (DelayedTyping where (DtKind = Overloaded)) =>
- Some (TypeCall (pexpr, <[ $(obj : typed) ]>, args, expected, is_property = true))
+ Some (TypeCall (<[ $(obj : typed) ]>, args, expected, is_property = true))
| _ =>
match (obj.Type.Hint) {
@@ -2591,7 +2587,7 @@
}
- TypeMemberExpr (pexpr : PT.PExpr, obj : TExpr, name : PT.Splicable.Name, expected : TyVar) : TExpr
+ TypeMemberExpr (obj : TExpr, name : PT.Splicable.Name, expected : TyVar) : TExpr
{
def mem_name = name.body;
@@ -2612,7 +2608,7 @@
name.typed_object = mem;
expr;
| None =>
- Delay (DelayedTyping.Kind.MemberAccess (pexpr, obj, mem_name), expected)
+ Delay (DelayedTyping.Kind.MemberAccess (obj, mem_name), expected)
}
}
@@ -3084,8 +3080,7 @@
}
- TypeCall (pexpr : PT.PExpr,
- pfnc : PT.PExpr,
+ TypeCall (pfnc : PT.PExpr,
parms : list [PT.PExpr],
expected : TyVar,
is_property : bool) : TExpr
@@ -3131,8 +3126,7 @@
else name.Id;
def kind =
- DelayedTyping.Kind.Operator (pexpr,
- TypeOf (parm1.expr),
+ DelayedTyping.Kind.Operator (TypeOf (parm1.expr),
TypeOf (parm2.expr),
operator_name,
name.GetEnv (env));
@@ -3158,7 +3152,7 @@
else name.Id;
def kind =
- DelayedTyping.Kind.Operator (pexpr, TypeOf (parm1.expr), null,
+ DelayedTyping.Kind.Operator (TypeOf (parm1.expr), null,
operator_name,
name.GetEnv (env));
when (parm1.kind != ParmKind.Normal)
@@ -3201,7 +3195,7 @@
| (PT.PExpr.Ref (PT.Name where (Id = "_N_op_Decrement") as name), [parm1]) =>
def operator_name = name.Id.Substring (3);
def kind =
- DelayedTyping.Kind.Operator (pexpr, TypeOf (parm1.expr), null,
+ DelayedTyping.Kind.Operator (TypeOf (parm1.expr), null,
operator_name,
name.GetEnv (env));
when (parm1.kind != ParmKind.Normal)
More information about the svn
mailing list