Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2013-07-05 16:13:17 +0400
committerMarek Safar <marek.safar@gmail.com>2013-07-10 17:42:32 +0400
commitfbfd2ab4068167810e2676f60652810adc8b8979 (patch)
tree718a7a1dedd0758573821848cb67aa4f1412ced0 /mcs
parent9601199486f40a3c53922684ce274e553027831e (diff)
Emit additional sequence points for call entry when needed. Fixes #10782 and similars
Diffstat (limited to 'mcs')
-rw-r--r--mcs/mcs/async.cs56
-rw-r--r--mcs/mcs/codegen.cs21
-rw-r--r--mcs/mcs/delegate.cs2
-rw-r--r--mcs/mcs/expression.cs7
-rw-r--r--mcs/tests/test-debug-10-ref.xml1
-rw-r--r--mcs/tests/test-debug-11-ref.xml24
-rw-r--r--mcs/tests/test-debug-14-ref.xml7
-rw-r--r--mcs/tests/test-debug-15-ref.xml2
-rw-r--r--mcs/tests/test-debug-16-ref.xml6
-rw-r--r--mcs/tests/test-debug-17-ref.xml7
-rw-r--r--mcs/tests/test-debug-18-ref.xml4
-rw-r--r--mcs/tests/test-debug-19-ref.xml5
-rw-r--r--mcs/tests/test-debug-21-ref.xml2
-rw-r--r--mcs/tests/test-debug-22-ref.xml3
-rw-r--r--mcs/tests/test-debug-23-ref.xml3
-rw-r--r--mcs/tests/test-debug-24-ref.xml4
-rw-r--r--mcs/tests/test-debug-27-ref.xml125
-rw-r--r--mcs/tests/test-debug-27.cs68
-rw-r--r--mcs/tests/ver-il-net_4_5.xml42
19 files changed, 343 insertions, 46 deletions
diff --git a/mcs/mcs/async.cs b/mcs/mcs/async.cs
index 6997d7ca850..bb3f0f6608d 100644
--- a/mcs/mcs/async.cs
+++ b/mcs/mcs/async.cs
@@ -195,7 +195,9 @@ namespace Mono.CSharp
protected override void DoEmit (EmitContext ec)
{
- GetResultExpression (ec).Emit (ec);
+ using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
+ GetResultExpression (ec).Emit (ec);
+ }
}
public Expression GetResultExpression (EmitContext ec)
@@ -224,34 +226,34 @@ namespace Mono.CSharp
var fe_awaiter = new FieldExpr (awaiter, loc);
fe_awaiter.InstanceExpression = new CompilerGeneratedThis (ec.CurrentType, loc);
- //
- // awaiter = expr.GetAwaiter ();
- //
+ Label skip_continuation = ec.DefineLabel ();
+
using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
+ //
+ // awaiter = expr.GetAwaiter ();
+ //
fe_awaiter.EmitAssign (ec, expr, false, false);
- }
- Label skip_continuation = ec.DefineLabel ();
+ Expression completed_expr;
+ if (IsDynamic) {
+ var rc = new ResolveContext (ec.MemberContext);
- Expression completed_expr;
- if (IsDynamic) {
- var rc = new ResolveContext (ec.MemberContext);
+ Arguments dargs = new Arguments (1);
+ dargs.Add (new Argument (fe_awaiter));
+ completed_expr = new DynamicMemberBinder ("IsCompleted", dargs, loc).Resolve (rc);
- Arguments dargs = new Arguments (1);
- dargs.Add (new Argument (fe_awaiter));
- completed_expr = new DynamicMemberBinder ("IsCompleted", dargs, loc).Resolve (rc);
+ dargs = new Arguments (1);
+ dargs.Add (new Argument (completed_expr));
+ completed_expr = new DynamicConversion (ec.Module.Compiler.BuiltinTypes.Bool, 0, dargs, loc).Resolve (rc);
+ } else {
+ var pe = PropertyExpr.CreatePredefined (awaiter_definition.IsCompleted, loc);
+ pe.InstanceExpression = fe_awaiter;
+ completed_expr = pe;
+ }
- dargs = new Arguments (1);
- dargs.Add (new Argument (completed_expr));
- completed_expr = new DynamicConversion (ec.Module.Compiler.BuiltinTypes.Bool, 0, dargs, loc).Resolve (rc);
- } else {
- var pe = PropertyExpr.CreatePredefined (awaiter_definition.IsCompleted, loc);
- pe.InstanceExpression = fe_awaiter;
- completed_expr = pe;
+ completed_expr.EmitBranchable (ec, skip_continuation, true);
}
- completed_expr.EmitBranchable (ec, skip_continuation, true);
-
base.DoEmit (ec);
//
@@ -741,7 +743,9 @@ namespace Mono.CSharp
var args = new Arguments (2);
args.Add (new Argument (awaiter, Argument.AType.Ref));
args.Add (new Argument (new CompilerGeneratedThis (CurrentType, Location), Argument.AType.Ref));
- mg.EmitCall (ec, args);
+ using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
+ mg.EmitCall (ec, args);
+ }
}
public void EmitInitializer (EmitContext ec)
@@ -817,7 +821,9 @@ namespace Mono.CSharp
Arguments args = new Arguments (1);
args.Add (new Argument (exceptionVariable));
- mg.EmitCall (ec, args);
+ using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
+ mg.EmitCall (ec, args);
+ }
}
public void EmitSetResult (EmitContext ec)
@@ -839,7 +845,9 @@ namespace Mono.CSharp
args.Add (new Argument (new LocalVariableReference (hoisted_return, Location)));
}
- mg.EmitCall (ec, args);
+ using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
+ mg.EmitCall (ec, args);
+ }
}
protected override TypeSpec[] ResolveBaseTypes (out FullNamedExpression base_class)
diff --git a/mcs/mcs/codegen.cs b/mcs/mcs/codegen.cs
index f2b22b9547c..f190cc941cd 100644
--- a/mcs/mcs/codegen.cs
+++ b/mcs/mcs/codegen.cs
@@ -248,6 +248,21 @@ namespace Mono.CSharp
return true;
}
+ public void MarkCallEntry (Location loc)
+ {
+ if (!EmitAccurateDebugInfo)
+ return;
+
+ //
+ // TODO: This should emit different kind of sequence point to make
+ // step-over work for statement over multiple lines
+ //
+ // Debugging experience for Foo (A () + B ()) where A and B are
+ // on separate lines is not great
+ //
+ Mark (loc);
+ }
+
public void DefineLocalVariable (string name, LocalBuilder builder)
{
if ((flags & Options.OmitDebugInfo) != 0)
@@ -1014,11 +1029,7 @@ namespace Mono.CSharp
// Emit explicit sequence point for expressions like Foo.Bar () to help debugger to
// break at right place when LHS expression can be stepped-into
//
- // TODO: The list is probably not comprehensive, need to do more testing
- //
- if (InstanceExpression is PropertyExpr || InstanceExpression is Invocation || InstanceExpression is IndexerExpr ||
- InstanceExpression is New || InstanceExpression is DelegateInvocation)
- ec.Mark (loc.Value);
+ ec.MarkCallEntry (loc.Value);
}
//
diff --git a/mcs/mcs/delegate.cs b/mcs/mcs/delegate.cs
index 329e04eec3c..e371f3be0f4 100644
--- a/mcs/mcs/delegate.cs
+++ b/mcs/mcs/delegate.cs
@@ -857,7 +857,7 @@ namespace Mono.CSharp {
//
var call = new CallEmitter ();
call.InstanceExpression = InstanceExpr;
- call.EmitPredefined (ec, method, arguments);
+ call.EmitPredefined (ec, method, arguments, loc);
}
public override void EmitStatement (EmitContext ec)
diff --git a/mcs/mcs/expression.cs b/mcs/mcs/expression.cs
index 14776484844..2ceffa328bc 100644
--- a/mcs/mcs/expression.cs
+++ b/mcs/mcs/expression.cs
@@ -80,7 +80,7 @@ namespace Mono.CSharp
public override void Emit (EmitContext ec)
{
var call = new CallEmitter ();
- call.EmitPredefined (ec, oper, arguments);
+ call.EmitPredefined (ec, oper, arguments, loc);
}
public override SLE.Expression MakeExpression (BuilderContext ctx)
@@ -6533,14 +6533,16 @@ namespace Mono.CSharp
}
if (vr != null) {
+ ec.MarkCallEntry (loc);
ec.Emit (OpCodes.Call, method);
return false;
}
}
if (type is TypeParameterSpec)
- return DoEmitTypeParameter (ec);
+ return DoEmitTypeParameter (ec);
+ ec.MarkCallEntry (loc);
ec.Emit (OpCodes.Newobj, method);
return true;
}
@@ -10037,6 +10039,7 @@ namespace Mono.CSharp
public override void Emit (EmitContext ec)
{
source.Emit (ec);
+ ec.MarkCallEntry (loc);
ec.Emit (OpCodes.Call, method);
}
diff --git a/mcs/tests/test-debug-10-ref.xml b/mcs/tests/test-debug-10-ref.xml
index 4181816941a..031aecb8fac 100644
--- a/mcs/tests/test-debug-10-ref.xml
+++ b/mcs/tests/test-debug-10-ref.xml
@@ -44,6 +44,7 @@
<sequencepoints>
<entry il="0x0" row="4" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="5" col="3" file_ref="1" hidden="false" />
+ <entry il="0x2" row="5" col="3" file_ref="1" hidden="false" />
<entry il="0x7" row="6" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals />
diff --git a/mcs/tests/test-debug-11-ref.xml b/mcs/tests/test-debug-11-ref.xml
index e524e16c296..60ce461555d 100644
--- a/mcs/tests/test-debug-11-ref.xml
+++ b/mcs/tests/test-debug-11-ref.xml
@@ -15,7 +15,7 @@
<method token="0x6000002">
<sequencepoints>
<entry il="0x0" row="12" col="2" file_ref="1" hidden="false" />
- <entry il="0x1" row="13" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1" row="13" col="10" file_ref="1" hidden="false" />
<entry il="0x6" row="13" col="26" file_ref="1" hidden="false" />
<entry il="0x16" row="14" col="2" file_ref="1" hidden="false" />
</sequencepoints>
@@ -41,6 +41,7 @@
<entry il="0x1" row="25" col="10" file_ref="1" hidden="false" />
<entry il="0x9" row="26" col="3" file_ref="1" hidden="false" />
<entry il="0xa" row="27" col="3" file_ref="1" hidden="false" />
+ <entry il="0x18" row="25" col="14" file_ref="1" hidden="false" />
<entry il="0x1e" row="28" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
@@ -58,6 +59,8 @@
<entry il="0x9" row="32" col="26" file_ref="1" hidden="false" />
<entry il="0x11" row="33" col="3" file_ref="1" hidden="false" />
<entry il="0x12" row="34" col="3" file_ref="1" hidden="false" />
+ <entry il="0x20" row="32" col="26" file_ref="1" hidden="false" />
+ <entry il="0x33" row="32" col="12" file_ref="1" hidden="false" />
<entry il="0x39" row="35" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
@@ -75,6 +78,7 @@
<entry il="0x1" row="39" col="10" file_ref="1" hidden="false" />
<entry il="0x10" row="40" col="3" file_ref="1" hidden="false" />
<entry il="0x11" row="41" col="3" file_ref="1" hidden="false" />
+ <entry il="0x2e" row="39" col="13" file_ref="1" hidden="false" />
<entry il="0x34" row="42" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
@@ -88,10 +92,12 @@
<method token="0x6000008">
<sequencepoints>
<entry il="0x0" row="45" col="2" file_ref="1" hidden="false" />
- <entry il="0x1" row="46" col="10" file_ref="1" hidden="false" />
+ <entry il="0x1" row="46" col="19" file_ref="1" hidden="false" />
<entry il="0x7" row="47" col="3" file_ref="1" hidden="false" />
<entry il="0x8" row="48" col="4" file_ref="1" hidden="false" />
+ <entry il="0xd" row="48" col="12" file_ref="1" hidden="false" />
<entry il="0x12" row="49" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1f" row="46" col="14" file_ref="1" hidden="false" />
<entry il="0x25" row="50" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
@@ -167,6 +173,7 @@
<sequencepoints>
<entry il="0x0" row="103" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="105" col="3" file_ref="1" hidden="false" />
+ <entry il="0x86" row="104" col="3" file_ref="1" hidden="false" />
<entry il="0xb3" row="107" col="5" file_ref="1" hidden="false" />
<entry il="0xb8" row="109" col="4" file_ref="1" hidden="false" />
<entry il="0xb9" row="110" col="5" file_ref="1" hidden="false" />
@@ -255,6 +262,7 @@
<entry il="0x1" row="175" col="3" file_ref="1" hidden="false" />
<entry il="0x2" row="176" col="3" file_ref="1" hidden="false" />
<entry il="0x3" row="177" col="4" file_ref="1" hidden="false" />
+ <entry il="0x8" row="177" col="12" file_ref="1" hidden="false" />
<entry il="0xd" row="178" col="3" file_ref="1" hidden="false" />
</sequencepoints>
<locals />
@@ -266,6 +274,7 @@
<sequencepoints>
<entry il="0x0" row="182" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="183" col="3" file_ref="1" hidden="false" />
+ <entry il="0x7" row="183" col="7" file_ref="1" hidden="false" />
<entry il="0x11" row="184" col="3" file_ref="1" hidden="false" />
<entry il="0x12" row="185" col="3" file_ref="1" hidden="false" />
<entry il="0x18" row="187" col="3" file_ref="1" hidden="false" />
@@ -282,9 +291,11 @@
<sequencepoints>
<entry il="0x0" row="192" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="193" col="3" file_ref="1" hidden="false" />
+ <entry il="0x7" row="193" col="7" file_ref="1" hidden="false" />
<entry il="0x11" row="194" col="3" file_ref="1" hidden="false" />
<entry il="0x12" row="195" col="3" file_ref="1" hidden="false" />
<entry il="0x18" row="196" col="8" file_ref="1" hidden="false" />
+ <entry il="0x1e" row="196" col="12" file_ref="1" hidden="false" />
<entry il="0x28" row="197" col="3" file_ref="1" hidden="false" />
<entry il="0x29" row="198" col="3" file_ref="1" hidden="false" />
<entry il="0x2f" row="200" col="3" file_ref="1" hidden="false" />
@@ -375,9 +386,13 @@
<entry il="0x0" row="246" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="247" col="3" file_ref="1" hidden="false" />
<entry il="0x2" row="250" col="3" file_ref="1" hidden="false" />
+ <entry il="0x3" row="250" col="3" file_ref="1" hidden="false" />
<entry il="0xe" row="248" col="4" file_ref="1" hidden="false" />
+ <entry il="0x10" row="250" col="3" file_ref="1" hidden="false" />
<entry il="0x16" row="251" col="3" file_ref="1" hidden="false" />
<entry il="0x17" row="252" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1a" row="250" col="3" file_ref="1" hidden="false" />
+ <entry il="0x31" row="250" col="3" file_ref="1" hidden="false" />
<entry il="0x37" row="253" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
@@ -393,9 +408,12 @@
<entry il="0x0" row="256" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="257" col="3" file_ref="1" hidden="false" />
<entry il="0x2" row="260" col="3" file_ref="1" hidden="false" />
+ <entry il="0x4" row="260" col="3" file_ref="1" hidden="false" />
<entry il="0xf" row="258" col="4" file_ref="1" hidden="false" />
+ <entry il="0x10" row="260" col="3" file_ref="1" hidden="false" />
<entry il="0x16" row="261" col="3" file_ref="1" hidden="false" />
<entry il="0x17" row="262" col="3" file_ref="1" hidden="false" />
+ <entry il="0x19" row="260" col="3" file_ref="1" hidden="false" />
<entry il="0x3c" row="263" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
@@ -411,6 +429,8 @@
<entry il="0x0" row="266" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="267" col="3" file_ref="1" hidden="false" />
<entry il="0x2" row="269" col="6" file_ref="1" hidden="false" />
+ <entry il="0x6" row="269" col="6" file_ref="1" hidden="false" />
+ <entry il="0xe" row="269" col="6" file_ref="1" hidden="false" />
<entry il="0x24" row="268" col="3" file_ref="1" hidden="false" />
<entry il="0x2f" row="270" col="3" file_ref="1" hidden="false" />
<entry il="0x30" row="271" col="3" file_ref="1" hidden="false" />
diff --git a/mcs/tests/test-debug-14-ref.xml b/mcs/tests/test-debug-14-ref.xml
index e9d76ccc380..9bae89796d0 100644
--- a/mcs/tests/test-debug-14-ref.xml
+++ b/mcs/tests/test-debug-14-ref.xml
@@ -52,6 +52,7 @@
</method>
<method token="0x6000006">
<sequencepoints>
+ <entry il="0x0" row="34" col="2" file_ref="1" hidden="false" />
<entry il="0xd" row="34" col="2" file_ref="1" hidden="false" />
<entry il="0xe" row="35" col="3" file_ref="1" hidden="false" />
<entry il="0x1b" row="37" col="2" file_ref="1" hidden="false" />
@@ -63,7 +64,7 @@
</method>
<method token="0x6000007">
<sequencepoints>
- <entry il="0x0" row="13" col="3" file_ref="1" hidden="false" />
+ <entry il="0x0" row="13" col="11" file_ref="1" hidden="false" />
</sequencepoints>
<locals />
<scopes />
@@ -71,7 +72,7 @@
<method token="0x6000008">
<sequencepoints>
<entry il="0x0" row="20" col="3" file_ref="1" hidden="false" />
- <entry il="0x1" row="21" col="4" file_ref="1" hidden="false" />
+ <entry il="0x1" row="21" col="12" file_ref="1" hidden="false" />
<entry il="0x6" row="22" col="3" file_ref="1" hidden="false" />
</sequencepoints>
<locals />
@@ -80,7 +81,7 @@
<method token="0x6000009">
<sequencepoints>
<entry il="0x0" row="28" col="3" file_ref="1" hidden="false" />
- <entry il="0x1" row="29" col="4" file_ref="1" hidden="false" />
+ <entry il="0x1" row="29" col="12" file_ref="1" hidden="false" />
<entry il="0x6" row="30" col="3" file_ref="1" hidden="false" />
</sequencepoints>
<locals />
diff --git a/mcs/tests/test-debug-15-ref.xml b/mcs/tests/test-debug-15-ref.xml
index 48404440a0d..323939003d5 100644
--- a/mcs/tests/test-debug-15-ref.xml
+++ b/mcs/tests/test-debug-15-ref.xml
@@ -13,6 +13,8 @@
<sequencepoints>
<entry il="0x0" row="6" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="7" col="3" file_ref="1" hidden="false" />
+ <entry il="0xb" row="7" col="21" file_ref="1" hidden="false" />
+ <entry il="0x16" row="5" col="6" file_ref="1" hidden="false" />
<entry il="0x1c" row="8" col="5" file_ref="1" hidden="false" />
</sequencepoints>
<locals />
diff --git a/mcs/tests/test-debug-16-ref.xml b/mcs/tests/test-debug-16-ref.xml
index 6c9c492e40a..083ef56c2c0 100644
--- a/mcs/tests/test-debug-16-ref.xml
+++ b/mcs/tests/test-debug-16-ref.xml
@@ -20,9 +20,11 @@
<method token="0x6000003">
<sequencepoints>
<entry il="0x0" row="14" col="2" file_ref="1" hidden="false" />
- <entry il="0x1" row="15" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1" row="15" col="11" file_ref="1" hidden="false" />
<entry il="0x7" row="17" col="4" file_ref="1" hidden="false" />
+ <entry il="0xe" row="17" col="4" file_ref="1" hidden="false" />
<entry il="0x13" row="20" col="4" file_ref="1" hidden="false" />
+ <entry il="0x1a" row="20" col="4" file_ref="1" hidden="false" />
<entry il="0x21" row="24" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
@@ -33,7 +35,7 @@
<method token="0x6000004">
<sequencepoints>
<entry il="0x0" row="27" col="2" file_ref="1" hidden="false" />
- <entry il="0x1" row="28" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1" row="28" col="14" file_ref="1" hidden="false" />
<entry il="0x7" row="30" col="4" file_ref="1" hidden="false" />
<entry il="0x12" row="31" col="4" file_ref="1" hidden="false" />
<entry il="0x1b" row="33" col="2" file_ref="1" hidden="false" />
diff --git a/mcs/tests/test-debug-17-ref.xml b/mcs/tests/test-debug-17-ref.xml
index cf51ed208c7..8c966ef91e8 100644
--- a/mcs/tests/test-debug-17-ref.xml
+++ b/mcs/tests/test-debug-17-ref.xml
@@ -19,8 +19,12 @@
</method>
<method token="0x6000003">
<sequencepoints>
+ <entry il="0xf" row="13" col="5" file_ref="1" hidden="false" />
+ <entry il="0x24" row="13" col="8" file_ref="1" hidden="false" />
<entry il="0x2a" row="11" col="2" file_ref="1" hidden="false" />
<entry il="0x2b" row="12" col="3" file_ref="1" hidden="false" />
+ <entry il="0x2d" row="14" col="4" file_ref="1" hidden="false" />
+ <entry il="0x40" row="13" col="4" file_ref="1" hidden="false" />
<entry il="0x46" row="16" col="3" file_ref="1" hidden="false" />
<entry il="0x4b" row="17" col="2" file_ref="1" hidden="false" />
</sequencepoints>
@@ -33,6 +37,9 @@
<sequencepoints>
<entry il="0x0" row="20" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="21" col="3" file_ref="1" hidden="false" />
+ <entry il="0x11" row="21" col="59" file_ref="1" hidden="false" />
+ <entry il="0x1c" row="21" col="53" file_ref="1" hidden="false" />
+ <entry il="0x2c" row="21" col="47" file_ref="1" hidden="false" />
<entry il="0x32" row="22" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
diff --git a/mcs/tests/test-debug-18-ref.xml b/mcs/tests/test-debug-18-ref.xml
index 7961bca8a06..df5bd3c1056 100644
--- a/mcs/tests/test-debug-18-ref.xml
+++ b/mcs/tests/test-debug-18-ref.xml
@@ -67,7 +67,7 @@
<entry il="0x0" row="30" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="31" col="3" file_ref="1" hidden="false" />
<entry il="0x7" row="32" col="3" file_ref="1" hidden="false" />
- <entry il="0xe" row="33" col="3" file_ref="1" hidden="false" />
+ <entry il="0xe" row="33" col="15" file_ref="1" hidden="false" />
<entry il="0x14" row="34" col="3" file_ref="1" hidden="false" />
<entry il="0x81" row="35" col="2" file_ref="1" hidden="false" />
</sequencepoints>
@@ -81,7 +81,7 @@
<method token="0x6000009">
<sequencepoints>
<entry il="0x0" row="38" col="2" file_ref="1" hidden="false" />
- <entry il="0x1" row="39" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1" row="39" col="15" file_ref="1" hidden="false" />
<entry il="0x7" row="40" col="3" file_ref="1" hidden="false" />
<entry il="0x1e4" row="41" col="2" file_ref="1" hidden="false" />
</sequencepoints>
diff --git a/mcs/tests/test-debug-19-ref.xml b/mcs/tests/test-debug-19-ref.xml
index 9e557b6733f..5c426ff09e8 100644
--- a/mcs/tests/test-debug-19-ref.xml
+++ b/mcs/tests/test-debug-19-ref.xml
@@ -25,7 +25,7 @@
<method token="0x6000004">
<sequencepoints>
<entry il="0x0" row="16" col="2" file_ref="1" hidden="false" />
- <entry il="0x1" row="17" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1" row="17" col="15" file_ref="1" hidden="false" />
<entry il="0x23" row="17" col="23" file_ref="1" hidden="false" />
<entry il="0x2e" row="21" col="2" file_ref="1" hidden="false" />
</sequencepoints>
@@ -40,7 +40,7 @@
<method token="0x6000006">
<sequencepoints>
<entry il="0x0" row="29" col="2" file_ref="1" hidden="false" />
- <entry il="0x1" row="30" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1" row="30" col="15" file_ref="1" hidden="false" />
<entry il="0x23" row="30" col="23" file_ref="1" hidden="false" />
<entry il="0x2e" row="31" col="2" file_ref="1" hidden="false" />
</sequencepoints>
@@ -99,6 +99,7 @@
<sequencepoints>
<entry il="0x21" row="34" col="2" file_ref="1" hidden="false" />
<entry il="0x22" row="35" col="3" file_ref="1" hidden="false" />
+ <entry il="0x23" row="35" col="15" file_ref="1" hidden="false" />
<entry il="0x2d" row="36" col="3" file_ref="1" hidden="false" />
<entry il="0x8b" row="37" col="3" file_ref="1" hidden="false" />
<entry il="0x3ab" row="38" col="3" file_ref="1" hidden="false" />
diff --git a/mcs/tests/test-debug-21-ref.xml b/mcs/tests/test-debug-21-ref.xml
index a6af337137c..287791e7eb2 100644
--- a/mcs/tests/test-debug-21-ref.xml
+++ b/mcs/tests/test-debug-21-ref.xml
@@ -41,6 +41,7 @@
<sequencepoints>
<entry il="0x27" row="7" col="2" file_ref="1" hidden="false" />
<entry il="0x28" row="8" col="3" file_ref="1" hidden="false" />
+ <entry il="0x2d" row="8" col="11" file_ref="1" hidden="false" />
<entry il="0x32" row="9" col="3" file_ref="1" hidden="false" />
<entry il="0x41" row="10" col="3" file_ref="1" hidden="false" />
<entry il="0x42" row="11" col="4" file_ref="1" hidden="false" />
@@ -77,6 +78,7 @@
<sequencepoints>
<entry il="0x0" row="14" col="3" file_ref="1" hidden="false" />
<entry il="0x1" row="15" col="4" file_ref="1" hidden="false" />
+ <entry il="0x6" row="15" col="12" file_ref="1" hidden="false" />
<entry il="0xb" row="16" col="3" file_ref="1" hidden="false" />
</sequencepoints>
<locals />
diff --git a/mcs/tests/test-debug-22-ref.xml b/mcs/tests/test-debug-22-ref.xml
index 75fe231b6a5..c380f599bb1 100644
--- a/mcs/tests/test-debug-22-ref.xml
+++ b/mcs/tests/test-debug-22-ref.xml
@@ -31,7 +31,7 @@
<method token="0x6000005">
<sequencepoints>
<entry il="0x0" row="20" col="2" file_ref="1" hidden="false" />
- <entry il="0x1" row="21" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1" row="21" col="9" file_ref="1" hidden="false" />
</sequencepoints>
<locals />
<scopes />
@@ -68,6 +68,7 @@
<sequencepoints>
<entry il="0x21" row="15" col="2" file_ref="1" hidden="false" />
<entry il="0x22" row="16" col="3" file_ref="1" hidden="false" />
+ <entry il="0x29" row="16" col="21" file_ref="1" hidden="false" />
<entry il="0x47" row="17" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals />
diff --git a/mcs/tests/test-debug-23-ref.xml b/mcs/tests/test-debug-23-ref.xml
index c1fba7edd1a..5c15ce75a80 100644
--- a/mcs/tests/test-debug-23-ref.xml
+++ b/mcs/tests/test-debug-23-ref.xml
@@ -22,6 +22,7 @@
<sequencepoints>
<entry il="0x0" row="8" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="9" col="3" file_ref="1" hidden="false" />
+ <entry il="0x2" row="9" col="3" file_ref="1" hidden="false" />
<entry il="0x7" row="9" col="8" file_ref="1" hidden="false" />
<entry il="0xd" row="10" col="2" file_ref="1" hidden="false" />
</sequencepoints>
@@ -32,6 +33,7 @@
<sequencepoints>
<entry il="0x0" row="13" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="14" col="3" file_ref="1" hidden="false" />
+ <entry il="0x2" row="14" col="3" file_ref="1" hidden="false" />
<entry il="0x7" row="14" col="11" file_ref="1" hidden="false" />
<entry il="0xd" row="15" col="2" file_ref="1" hidden="false" />
</sequencepoints>
@@ -53,6 +55,7 @@
<entry il="0x0" row="23" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="24" col="3" file_ref="1" hidden="false" />
<entry il="0x1f" row="25" col="3" file_ref="1" hidden="false" />
+ <entry il="0x20" row="25" col="3" file_ref="1" hidden="false" />
<entry il="0x25" row="25" col="8" file_ref="1" hidden="false" />
<entry il="0x2b" row="26" col="2" file_ref="1" hidden="false" />
</sequencepoints>
diff --git a/mcs/tests/test-debug-24-ref.xml b/mcs/tests/test-debug-24-ref.xml
index 6a0622205d9..11ff400fed5 100644
--- a/mcs/tests/test-debug-24-ref.xml
+++ b/mcs/tests/test-debug-24-ref.xml
@@ -12,8 +12,8 @@
<method token="0x6000002">
<sequencepoints>
<entry il="0x0" row="6" col="2" file_ref="1" hidden="false" />
- <entry il="0x1" row="7" col="3" file_ref="1" hidden="false" />
- <entry il="0x7" row="7" col="30" file_ref="1" hidden="false" />
+ <entry il="0x1" row="7" col="14" file_ref="1" hidden="false" />
+ <entry il="0x7" row="7" col="34" file_ref="1" hidden="false" />
<entry il="0xd" row="8" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
diff --git a/mcs/tests/test-debug-27-ref.xml b/mcs/tests/test-debug-27-ref.xml
new file mode 100644
index 00000000000..7025340003c
--- /dev/null
+++ b/mcs/tests/test-debug-27-ref.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="utf-8"?>
+<symbols>
+ <files>
+ <file id="1" name="test-debug-27.cs" checksum="a14fe1107e45236d0519cb2c2c65cd46" />
+ </files>
+ <methods>
+ <method token="0x6000001">
+ <sequencepoints>
+ <entry il="0x0" row="6" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="8" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000002">
+ <sequencepoints>
+ <entry il="0x0" row="11" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="12" col="3" file_ref="1" hidden="false" />
+ <entry il="0x8" row="13" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000003">
+ <sequencepoints />
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000004">
+ <sequencepoints>
+ <entry il="0x0" row="19" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="20" col="3" file_ref="1" hidden="false" />
+ <entry il="0x8" row="21" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000005">
+ <sequencepoints>
+ <entry il="0x0" row="24" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="25" col="3" file_ref="1" hidden="false" />
+ <entry il="0x8" row="26" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000006">
+ <sequencepoints>
+ <entry il="0x0" row="29" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="30" col="10" file_ref="1" hidden="false" />
+ <entry il="0xc" row="31" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000007">
+ <sequencepoints>
+ <entry il="0x0" row="34" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="35" col="3" file_ref="1" hidden="false" />
+ <entry il="0x8" row="36" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000008">
+ <sequencepoints>
+ <entry il="0x0" row="39" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="40" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1f" row="42" col="3" file_ref="1" hidden="false" />
+ <entry il="0x20" row="42" col="13" file_ref="1" hidden="false" />
+ <entry il="0x26" row="42" col="20" file_ref="1" hidden="false" />
+ <entry il="0x2d" row="43" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals>
+ <entry name="f" il_index="0" scope_ref="0" />
+ <entry name="res" il_index="1" scope_ref="0" />
+ </locals>
+ <scopes />
+ </method>
+ <method token="0x6000009">
+ <sequencepoints>
+ <entry il="0x0" row="46" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="47" col="3" file_ref="1" hidden="false" />
+ <entry il="0x4" row="47" col="11" file_ref="1" hidden="false" />
+ <entry il="0x9" row="48" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals>
+ <entry name="s" il_index="0" scope_ref="0" />
+ </locals>
+ <scopes />
+ </method>
+ <method token="0x600000a">
+ <sequencepoints>
+ <entry il="0x0" row="51" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="52" col="3" file_ref="1" hidden="false" />
+ <entry il="0xa" row="52" col="11" file_ref="1" hidden="false" />
+ <entry il="0x18" row="52" col="22" file_ref="1" hidden="false" />
+ <entry il="0x1f" row="53" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals>
+ <entry name="i" il_index="0" scope_ref="0" />
+ </locals>
+ <scopes />
+ </method>
+ <method token="0x600000b">
+ <sequencepoints>
+ <entry il="0x0" row="56" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="57" col="3" file_ref="1" hidden="false" />
+ <entry il="0x6" row="57" col="11" file_ref="1" hidden="false" />
+ <entry il="0xc" row="58" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x600000c">
+ <sequencepoints>
+ <entry il="0x0" row="61" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="62" col="3" file_ref="1" hidden="false" />
+ <entry il="0x8" row="63" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ </methods>
+</symbols> \ No newline at end of file
diff --git a/mcs/tests/test-debug-27.cs b/mcs/tests/test-debug-27.cs
new file mode 100644
index 00000000000..982b42c9c5f
--- /dev/null
+++ b/mcs/tests/test-debug-27.cs
@@ -0,0 +1,68 @@
+using System;
+
+// Tests for explicit call sequence point
+
+struct S
+{
+ public S (int i)
+ {
+
+ }
+
+ public static implicit operator int (S s)
+ {
+ return 1;
+ }
+}
+
+class C
+{
+ public static int A ()
+ {
+ return 1;
+ }
+
+ public static int B (C c)
+ {
+ return 2;
+ }
+
+ public static C Test ()
+ {
+ return new C ();
+ }
+
+ public string Foo ()
+ {
+ return null;
+ }
+
+ void Test_1 ()
+ {
+ Func<int> f = A;
+
+ var res = f () + f ();
+ }
+
+ void Test_2 ()
+ {
+ var s = new S (0);
+ }
+
+ void Test_3 ()
+ {
+ int i = new S () + new S ();
+ }
+
+ void Test_4 ()
+ {
+ Test ().Foo ();
+ }
+
+ static int Main ()
+ {
+ return 0;
+ }
+}
+
+
diff --git a/mcs/tests/ver-il-net_4_5.xml b/mcs/tests/ver-il-net_4_5.xml
index 7ed9370e03d..70906f33b41 100644
--- a/mcs/tests/ver-il-net_4_5.xml
+++ b/mcs/tests/ver-il-net_4_5.xml
@@ -60320,6 +60320,48 @@
</method>
</type>
</test>
+ <test name="test-debug-27.cs">
+ <type name="S">
+ <method name="Int32 op_Implicit(S)" attrs="2198">
+ <size>10</size>
+ </method>
+ <method name="Void .ctor(Int32)" attrs="6278">
+ <size>2</size>
+ </method>
+ </type>
+ <type name="C">
+ <method name="Int32 A()" attrs="150">
+ <size>10</size>
+ </method>
+ <method name="Int32 B(C)" attrs="150">
+ <size>10</size>
+ </method>
+ <method name="C Test()" attrs="150">
+ <size>14</size>
+ </method>
+ <method name="System.String Foo()" attrs="134">
+ <size>10</size>
+ </method>
+ <method name="Void Test_1()" attrs="129">
+ <size>46</size>
+ </method>
+ <method name="Void Test_2()" attrs="129">
+ <size>10</size>
+ </method>
+ <method name="Void Test_3()" attrs="129">
+ <size>32</size>
+ </method>
+ <method name="Void Test_4()" attrs="129">
+ <size>13</size>
+ </method>
+ <method name="Int32 Main()" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="test-externalias-01.cs">
<type name="Test">
<method name="Int32 Main()" attrs="150">