[Mono-list] inlining of methods using structs

Gert Kello gert.kello@mail.ee
Thu, 19 Aug 2004 12:07:10 +0300


This is a cryptographically signed message in MIME format.

--------------ms060200010102060604060609
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

>>and, according to that document, "If any of the method's formal
>>arguments are structs, the method will not be inlined."
>>
>>
>>><http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/highperfmanagedapps.asp>
 >
> Uhm, now thinking of it, if a method/property is inlined, what happens
> when the API changes? So when you use Rectangle, and the setter of
> Width is changed, won't your program still used the obsolete version
> of Rectangle.set_With? Or am I thinking totally wrong?

The inlining is runtime feature. Every time You restart Your 
application, the progarms are recompiled from the CIL (and any 
optimizations/inlining is performed) And You are propably not able to 
replace assembly during one program execution :)

What You have to remember is rthat the compilation is performed twice: 
once when compiling from high-level language (C#, for example) to CIL, 
second time when the program executes and the CIL is compiled to native 
code. Inlining is perfomed during second compilation.

-- 
Gert

--------------ms060200010102060604060609
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJEzCC
AuQwggJNoAMCAQICAwwBBjANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UE
ChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNv
bmFsIEZyZWVtYWlsIElzc3VpbmcgQ0EwHhcNMDQwMzI2MTUxOTExWhcNMDUwMzI2MTUxOTEx
WjBXMQ4wDAYDVQQEEwVLZWxsbzENMAsGA1UEKhMER2VydDETMBEGA1UEAxMKR2VydCBLZWxs
bzEhMB8GCSqGSIb3DQEJARYSZ2VydC5rZWxsb0BtYWlsLmVlMIIBIjANBgkqhkiG9w0BAQE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