File: c-improvements-1.txt

package info (click to toggle)
erlang 1%3A12.b.3-dfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 77,780 kB
  • ctags: 157,528
  • sloc: erlang: 664,178; ansic: 241,119; makefile: 15,725; xml: 8,378; java: 7,780; sh: 6,789; lisp: 5,396; pascal: 3,637; perl: 2,310; asm: 1,438; cpp: 975; tcl: 245; python: 21; sed: 20; awk: 15
file content (84 lines) | stat: -rw-r--r-- 2,094 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Peter Hogfeldt			2003-08-14	PA1

IC C BACK-ENDS IMPROVEMENTS

1   C CLIENT

1.1 Cast

    Each oneway operation roughly consists of the following code
    parts:

        - encoding the cast message
	    - setting index of the out buffer to zero		(1.1.1)
	    - encoding the magic				(1.1.1)
	    - encoding a tuple header of size 2			(1.1.1)
	    - encoding '$gen_cast'				(1.1.1)
	    - encoding the operation parameters  		(1.1.2)
	- sending the cast message				(1.1.3)

    Only (1.1.2) is unique for the operation in question. 

1.1.1 Todo 
	  
    Define functions:

        int oe_ei_encode_cast(CORBA_environment *) that performs (1.1.1)

	int oe_ei_cast(CORBA_environment *) that performs (1.1.3)
	  
    This will reduce code size.

    As compiler options 

       oe_ei_encode_cast(),  and 
       oe_ei_cast()
    
    may be replaced by user defined functions.

1.2 Call

    Each (non-oneway) operation roughly consists of the following code
    parts:

        - encoding the call message
	    - setting index of the out buffer to zero		(1.2.1)
	    - encoding the magic				(1.2.1)
	    - encoding a tuple header of size 3			(1.2.1)
	    - encoding '$gen_call'				(1.2.1)
	    - encoding a tuple header of size 2			(1.2.1)
	    - encoding the from pid	 			(1.2.1)
	    - encoding the unique ref				(1.2.1)
	    - encoding the operation parameters  		(1.2.2)
	- sending the call message				(1.2.3)
	- receiving the reply message				(1.2.3)
	- decoding the reply parameters				(1.2.4)

    Only (1.2.2) and (1.2.4) are unique for the operation in question. 

1.2.1 Todo 
	  
    Define functions:

        int oe_ei_encode_send(CORBA_environment *) that performs (1.2.1)

	int oe_ei_send_and_receive(CORBA_environment *) that performs (1.2.3)
	  
    This will reduce code size.

    As compiler options 

       oe_ei_encode_send(), and 
       oe_ei_send_and_receive()

    may be replaced by user defined function.


2   SERVER

    We do not provide any code for receiving operation messages, execute
    operations, and send the result back. Should we not do that?