protected override IMethodNode CreateUnboxingStubNode(MethodDesc method) { if (method.IsCanonicalMethod(CanonicalFormKind.Specific) && !method.HasInstantiation) { // Unboxing stubs to canonical instance methods need a special unboxing stub that unboxes // 'this' and also provides an instantiation argument (we do a calling convention conversion). // We don't do this for generic instance methods though because they don't use the EEType // for the generic context anyway. return(new WebAssemblyMethodBodyNode(TypeSystemContext.GetSpecialUnboxingThunk(method, TypeSystemContext.GeneratedAssembly))); } else { // Otherwise we just unbox 'this' and don't touch anything else. return(new WebAssemblyUnboxingThunkNode(TypeSystemContext.GetUnboxingThunk(method, TypeSystemContext.GeneratedAssembly))); } }