Skip to content

Commit 99a99e9

Browse files
committed
Fix comments
1 parent 55b3672 commit 99a99e9

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

src/coreclr/tools/Common/TypeSystem/IL/Stubs/DelegateThunks.cs

+8-7
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,11 @@ public override MethodIL EmitIL()
319319
}
320320

321321
// Fill in delegateArrayLocal
322-
// Wrapper[] delegateArrayLocal = (Wrapper[])this._helperObject
322+
// Delegate.Wrapper[] delegateArrayLocal = (Delegate.Wrapper[])this._helperObject
323323

324324
// ldarg.0 (this pointer)
325-
// ldfld Delegate.HelperObjectField
326-
// castclass Wrapper[]
325+
// ldfld Delegate._helperObject
326+
// castclass Delegate.Wrapper[]
327327
// stloc delegateArrayLocal
328328
codeStream.EmitLdArg(0);
329329
codeStream.Emit(ILOpcode.ldfld, emitter.NewToken(HelperObjectField));
@@ -332,6 +332,7 @@ public override MethodIL EmitIL()
332332

333333
// Fill in invocationCountLocal
334334
// int invocationCountLocal = this._extraFunctionPointerOrData
335+
335336
// ldarg.0 (this pointer)
336337
// ldfld Delegate._extraFunctionPointerOrData
337338
// stloc invocationCountLocal
@@ -357,8 +358,8 @@ public override MethodIL EmitIL()
357358

358359
// ldloc delegateArrayLocal
359360
// ldloc iteratorLocal
360-
// ldelema System.Delegate
361-
// ldfld Wrapper.Value
361+
// ldelema Delegate.Wrapper
362+
// ldfld Delegate.Wrapper.Value
362363
// stloc delegateToCallLocal
363364
codeStream.EmitLdLoc(delegateArrayLocal);
364365
codeStream.EmitLdLoc(iteratorLocal);
@@ -370,10 +371,10 @@ public override MethodIL EmitIL()
370371
// returnValueLocal = delegateToCallLocal(...);
371372

372373
// ldloc delegateToCallLocal
373-
// ldfld System.Delegate._firstParameter
374+
// ldfld Delegate._firstParameter
374375
// ldarg 1, n
375376
// ldloc delegateToCallLocal
376-
// ldfld System.Delegate._functionPointer
377+
// ldfld Delegate._functionPointer
377378
// calli returnValueType thiscall (all the params)
378379
// IF there is a return value
379380
// stloc returnValueLocal

src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ unsafe partial class CorInfoImpl
456456
{
457457
private const CORINFO_RUNTIME_ABI TargetABI = CORINFO_RUNTIME_ABI.CORINFO_CORECLR_ABI;
458458

459-
private uint OffsetOfDelegateFirstTarget => (uint)(3 * PointerSize); // Delegate::_functionPointer
459+
private uint OffsetOfDelegateFirstTarget => (uint)(3 * PointerSize); // Delegate::_methodPtr
460460

461461
private readonly ReadyToRunCodegenCompilation _compilation;
462462
private MethodWithGCInfo _methodCodeNode;

src/coreclr/tools/aot/ILCompiler.RyuJit/JitInterface/CorInfoImpl.RyuJit.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ internal unsafe partial class CorInfoImpl
2828
{
2929
private const CORINFO_RUNTIME_ABI TargetABI = CORINFO_RUNTIME_ABI.CORINFO_NATIVEAOT_ABI;
3030

31-
private uint OffsetOfDelegateFirstTarget => (uint)(4 * PointerSize); // Delegate::_functionPointer
31+
private uint OffsetOfDelegateFirstTarget => (uint)(4 * PointerSize); // Delegate._functionPointer
3232
private int SizeOfReversePInvokeTransitionFrame => 2 * PointerSize;
3333

3434
private RyuJitCompilation _compilation;

0 commit comments

Comments
 (0)