Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,6 @@ private void EndImportingInstruction()
_isReadOnly = false;
}

private void ImportJmp(int token)
{
// JMP is kind of like a tail call (with no arguments pushed on the stack).
ImportCall(ILOpcode.call, token);
}

private void ImportCasting(ILOpcode opcode, int token)
{
TypeDesc type = (TypeDesc)_methodIL.GetObject(token);
Expand Down Expand Up @@ -767,6 +761,31 @@ private void ImportLdFtn(int token, ILOpcode opCode)
ImportCall(opCode, token);
}

private void ImportJmp(int token)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just to have all call-like opcodes together.

{
// JMP is kind of like a tail call (with no arguments pushed on the stack).
ImportCall(ILOpcode.call, token);
}

private void ImportCalli(int token)
{
MethodSignature signature = (MethodSignature)_methodIL.GetObject(token);

// Managed calli
if ((signature.Flags & MethodSignatureFlags.UnmanagedCallingConventionMask) == 0)
return;

// Calli in marshaling stubs
if (_methodIL is Internal.IL.Stubs.PInvokeILStubMethodIL)
return;

MethodDesc stub = _compilation.PInvokeILProvider.GetCalliStub(
signature,
((MetadataType)_methodIL.OwningMethod.OwningType).Module);

_dependencies.Add(_factory.CanonicalEntrypoint(stub), "calli");
}

private void ImportBranch(ILOpcode opcode, BasicBlock target, BasicBlock fallthrough)
{
ImportFallthrough(target);
Expand Down Expand Up @@ -1316,7 +1335,6 @@ private void ImportStoreVar(int index, bool argument) { }
private void ImportAddressOfVar(int index, bool argument) { }
private void ImportDup() { }
private void ImportPop() { }
private void ImportCalli(int token) { }
private void ImportLoadNull() { }
private void ImportReturn() { }
private void ImportLoadInt(long value, StackValueKind kind) { }
Expand Down