en:docs:tk:som:sc:ug

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:docs:tk:som:sc:ug [2024/10/09 04:48] – [1. Appendix 1. SOM ABI] prokusheven:docs:tk:som:sc:ug [2024/11/09 13:02] (current) prokushev
Line 7: Line 7:
 somFree Compiler and Emitter Framework is a free open source binary compatible reimplementation of IBM SOM Compiler and Emitter Framework. It is tries to be as compatible as possible on API and ABI level. somFree Compiler and Emitter Framework is a free open source binary compatible reimplementation of IBM SOM Compiler and Emitter Framework. It is tries to be as compatible as possible on API and ABI level.
  
-===== Changes ===== 
  
-Changes from original somFree compiler: 
- 
-  * Most of internal structures now also present as in old IBM SOM 2.1 NT Toolkit. 
-  * New emitters: 
-    * LNK - Open Watcom WLink support. 
-    * DUMP - displays structures, available to emitter. 
-    * PAS - Pascal client support. 
-    * IPAS - Pascal implementation classes support. 
-  * SOM Compiler library now mostly documented. 
-  * SOMLINK style functions for most of SOM Compiler library added. 
-  * Emitters now IBM SOM 2.1 and IBM SOM 3.0 compatible without recompilation. 
-  * somFree Compiler supports IBM SOM 2.1, IBM SOM 3.0, and somFree 1.0 emitters. 
-  * somtShowEntry function outputs more info. 
-  * Undocumented SOMTTypes now documented. 
-  * SOMIPC now supports IDL 4.2 specification. 
-  * CORBA C Language Mapping Specification 1.0 now supported by default instead of SOM C Language mapping. 
-  * Added support of OIDL files 
  
 ===== somFree Compiler ===== ===== somFree Compiler =====
Line 141: Line 123:
 Latest IBM SOM 3.0 supports CORBA IDL mostly at level of CORBA 1.1. somFree supports CORBA IDL 4.2 with all extensions found in SOM IDL. Latest IBM SOM 3.0 supports CORBA IDL mostly at level of CORBA 1.1. somFree supports CORBA IDL 4.2 with all extensions found in SOM IDL.
  
-  * Include Directives (optional)+==== Preprocessing ==== 
 + 
 +IDL shall be preprocessed according to the specification of the preprocessor in ISO/IEC 14882:2003. The preprocessor may be implemented as a separate process or built into the IDL compiler. 
 + 
 +Lines beginning with # (also called "directives"communicate with this preprocessor. White space may appear before the #. These lines have syntax independent of the rest of IDL; they may appear anywhere and have effects that last (independent of the IDL scoping rules) until the end of the translation unit. The textual location of IDL-specific pragmas may be semantically constrained. 
 + 
 +A preprocessing directive (or any line) may be continued on the next line in a source file by placing a backslash character (\), immediately before the newline at the end of the line to be continued. The preprocessor effects the continuation by deleting the backslash and the newline. A backslash character may not be the last character in a source file. 
 + 
 +The primary use of the preprocessing facilities is to include definitions from other IDL specifications. Text in files included with a #include directive is treated as if it appeared in the including file. 
 + 
 +todo: #line 
 +todo: #pragma 
 + 
 +==== Syntax ==== 
   * Type and Constant Declarations (optional)   * Type and Constant Declarations (optional)
   * Exception Declarations (optional)   * Exception Declarations (optional)
Line 147: Line 143:
   * Module declaration (optional)   * Module declaration (optional)
  
 +==== Example ====
 Let's try to define our class interface. Let's try to define our class interface.
  
Line 366: Line 363:
   * Methods section (optional)   * Methods section (optional)
  
-==== Include section ====+==== Include section (Preprocessing) ==== 
 + 
 +Include section handled by SPP preprocessor. Preprocessor is a simple tool which includes files pointed by include section into the original file.
  
 Include section is optional and contains names of OIDL files with definition of parent class, metaclasses and private interfaces of ancestor classes. Include section is optional and contains names of OIDL files with definition of parent class, metaclasses and private interfaces of ancestor classes.
Line 378: Line 377:
 ancestor is the name of the OIDL file containing the private part of an ancestor class' interface needed in the definition of this class. If ancestor is enclosed in angle brackets (%%<>%%), the search for the file will begin in system-specific locations. If parent is enclosed in double quotation marks (%%""%%), the search for the file will begin in the local context, then move to the system-specific locations. ancestor is the name of the OIDL file containing the private part of an ancestor class' interface needed in the definition of this class. If ancestor is enclosed in angle brackets (%%<>%%), the search for the file will begin in system-specific locations. If parent is enclosed in double quotation marks (%%""%%), the search for the file will begin in the local context, then move to the system-specific locations.
  
-parent is the name of the OIDL file containing the parent class of the class for which the Include statement is provided. If parent is enclosed in angle +parent is the name of the OIDL file containing the parent class of the class for which the Include statement is provided. If parent is enclosed in angle brackets (%%<>%%), the search for the file will begin in system-specific locations. If parent is enclosed in double quotation marks (%%""%%), the search for the file will begin in the local context, then move to the system-specific locations.
-brackets (%%<>%%), the search for the file will begin in system-specific locations. If parent is enclosed in double quotation marks (%%""%%), the search for the file will begin in the local context, then move to the system-specific locations.+
  
 metaclass is the OIDL file containing the metaclass of the class for which the include statement is provided. If metaclass is enclosed in angle brackets (%%<>%%), the search for the file will begin in system-specific locations. If metaclass is enclosed in double quotation marks (%%""%%), the search for the file will begin in the local context, then move to the system-specific locations. metaclass is the OIDL file containing the metaclass of the class for which the include statement is provided. If metaclass is enclosed in angle brackets (%%<>%%), the search for the file will begin in system-specific locations. If metaclass is enclosed in double quotation marks (%%""%%), the search for the file will begin in the local context, then move to the system-specific locations.
 +
 +todo: @ line "file" "filepath"
  
 ==== Class section ==== ==== Class section ====
Line 472: Line 472:
 somFree emitters automatically switches to IBM SOM 2.1 ABI on emit call and to IBM SOM 3.0 ABI on emitSL call. somFree emitters automatically switches to IBM SOM 2.1 ABI on emit call and to IBM SOM 3.0 ABI on emitSL call.
  
-todo: add info abount internal structures like in http://www.edm2.com/index.php/OS/2_Application_Binary_Interface_for_PowerPC_(32-bit)   https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=http://www.os2site.com/sw/dev/info/abippc32.pdf+todo: add info abount internal structures like in http://www.edm2.com/index.php/OS/2_Application_Binary_Interface_for_PowerPC_(32-bit)   http://www.os2site.com/sw/dev/info/abippc32.pdf
 ====== Список литературы ====== ====== Список литературы ======
  
  
-  - Object Management Group, «C Language Mapping Specification 1.0,» [В Интернете]. Available: https://www.omg.org/spec/C/. [Дата обращения: 24 Август 2022]. +  - Object Management Group, "Language Mapping Specification 1.0, 1999" Available: https://www.omg.org/spec/C/ 
-  - IBM, OS/2 2.0 Technical Library. System Object Model Guide and Reference. First Edition., 1991https://www.os2museum.com/files/docs/os220tl/os2-2.0-som-1991.pdf +  - IBM, "OS/2 2.0 Technical Library. System Object Model Guide and Reference. First Edition, 1991 Available: https://www.os2museum.com/files/docs/os220tl/os2-2.0-som-1991.pdf 
 +  - Object Management Group, "The Common Object Request Broker: Architecture and Specification. Revision 1.1, 1991" Available: https://www.omg.org/spec/CORBA/1.1