Skip to content

Latest commit

 

History

History
22 lines (20 loc) · 2.42 KB

ii.15.4.1-method-body.md

File metadata and controls

22 lines (20 loc) · 2.42 KB

II.15.4.1 Method body

The method body shall contain the instructions of a program. However, it can also contain labels, additional syntactic forms and many directives that provide additional information to ilasm and are helpful in the compilation of methods of some languages.

MethodBodyItem ::= Description Clause
.custom CustomDecl Definition of custom attributes. §II.21
| .data DataDecl Emits data to the data section §II.16.3
| .emitbyte Int32 Emits an unsigned byte to the code section of the method. §II.15.4.1.1
| .entrypoint Specifies that this method is the entry point to the application (only one such method is allowed). §II.15.4.1.2
| .locals [ init ] '(' LocalsSignature ')' Defines a set of local variables for this method. §II.15.4.1.3
| .maxstack Int32 The int32 specifies the maximum number of elements on the evaluation stack during the execution of the method. §II.15.4.1
| .override TypeSpec '::' MethodName Use current method as the implementation for the method specified. §II.10.3.2
| .override method CallConv Type TypeSpec '::' MethodName GenArity '(' Parameters ')' Use current method as the implementation for the method specified. §II.10.3.2
| .param '[' Int32 ']' [ '=' FieldInit ] Store a constant FieldInit value for parameter Int32 §II.15.4.1.4
| .param type '[' Int32 ']' Specifies a type parameter for a generic method §II.15.4.1.5
| ExternSourceDecl .line or #line §II.5.7
| Instr An instruction Partition VI
| Id ':' A label §II.5.4
| ScopeBlock Lexical scope of local variables §II.15.4.4
| SecurityDecl .permission or .permissionset §II.20
| SEHBlock An exception block §II.19