1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 inline_operation: proc(node_pt,ref,atom) returns(bit(1) aligned);
17
18 dcl node_pt ptr,
19 ref(3) ptr,
20 atom(3) bit(1) aligned;
21
22 dcl (null,string) builtin,
23 complex_operand(3) bit(1) unaligned;
24
25 dcl compile_exp$save entry(ptr) returns(ptr);
26
27 %include reference;
28 %include symbol;
29 %include operator;
30 %include data_types;
31 %include op_codes;
32
33 string(complex_operand) = "0"b;
34
35 if ref(1) ^= null then call test(1);
36
37 call test(2);
38
39 if node_pt -> operator.number = 3 then call test(3);
40
41 if string(complex_operand)
42 then do;
43
44 if node_pt -> operator.op_code = abs_fun then goto no;
45
46 if ^ complex_operand(2)
47 then if ref(2) -> reference.data_type ^= real_flt_bin_1
48 then goto no;
49
50 if node_pt -> operator.number = 3
51 then if ^ complex_operand(3)
52 then if ref(3) -> reference.data_type ^= real_flt_bin_1
53 then goto no;
54 end;
55
56 yes: return("1"b);
57
58 no: return("0"b);
59
60 test: proc(k);
61
62 dcl k fixed bin,
63 (p,s) ptr;
64
65 p = ref(k);
66 s = p -> reference.symbol;
67
68 if s -> symbol.decimal then goto no;
69
70 if s -> symbol.complex
71 then do;
72 if p -> reference.data_type ^= complex_flt_bin_1 then goto no;
73 complex_operand(k) = "1"b;
74 if k > 1
75 then if ^ atom(k)
76 then if ^ p -> reference.aligned_ref
77 then do;
78 ref(k) = compile_exp$save((node_pt -> operand(k)));
79 atom(k) = "1"b;
80 end;
81 end;
82
83 end;
84
85 end;