Professional Documents
Culture Documents
BERT MCER
IBM
121
IBM REXX Compiler
Bert Moser
c / o IBM Austria
Obere Donaustrasse 95
A - I 020 Austria
EUROPE
( + 431) 21 145-4476
May/9 1
122
Overview
123
I
REXX History
- Compilability of REXX
- Appropriaterun-time performance improvements
124
REXX Positioning w Compllsr
~ ~~~
I
COMMAND PROCESSOR TEXT EDITOR
R E x x
Program Logic
J
System Commands
\ppl ication Commands
Program Logic
HOWEVER
- Better performance desirable
yl(l
125
HOWdoes a REXX Interpreter work w Compller
i
1
REXX
Source
Interpreter
Program
12G
How does the REXX Comp iler work
u1
Compile
Comp i 1 ed
REXX
Program
Source
Program
Comp i 1 e r
Program
Documen-
t a t ion
Run
---
4
-
REXX
Library
~~~~~
127
Compiled REXX Program
Compiled Code I
Executable /370 instructions
- Reentrant and relocatable
Symbol Tree I
Descriptors for all static symbols
Upwards and downwards connected
Symbols identifiable by their name
Control Blocks I
Run-time required
Pre-allocated and pre-initialized
128
I
Forms of Compiled REXX Programs
1 EXEC-type I
Same behavior as interpreted - ”transparently” replace
Module-type I
Other HLL compilers’ object format (ESD, RLD, TXT,..)
129
Iz m
Product Components
Run-time Library
130
Usage Scenarios
Comp i 1 e Run
--e b-
Correct/Migrate
I
-__-___--.
1
rxr
REXX Interpreter De bug REXX Compiler
___
Compile
_ p _ _ _ _ _ _ - p
Run
REXX Library
- ____
131
Compiled REXX - Benefits
~~~ ~
132
- ... wars(
compllor
Improveprogramquality
Increase developer productivity
Provide programintegrity
Improved
maintainability
0 Protect REXX-coded assets
133
Source Listing Example
SAMPLE EXEC G1
CMS REXX COMPILER 1.1.0 TIME: 11:35:02 DATE: 30 May 1989
+++EAGGA00771S I n v a l i d o r m i s s i n g argumeni(s) on b u i l t - i n f u n c t i o n
6 $ = EXTFUNC(line.2)
7 C a l l INTFUNC 2
8 Exit
9
10 INTFUNK: Procedure Expose x. i
11
+++EAGGA00072S Label not found
Signal on NOVALUE NAME y-value
T
12 Do x . i
1 13 I f x . i / / 2 /= 0 then
1 1 14 say "Odd: x. i
1 15 End
Ret16 urn
17
18 my-valu: Say "NOVALUE r a i s e da t :s i g l
19 Ret urn
20
+++EAGGA00654S Unmatched
1
* end o f program SAMPLE
ql/*ll
05/91 EJM
134
rn
Cross Reference List Example
EXTFUNC E X 1 RTN 6
INTFUNC EXTRTN 7
INTFUNK LABEL 10(d)
LEFT BUILT-IN 5
MY VALU LABEL 18 (dl
MY-VALUE LABEL+++ 11(u)
TR~NSLATE BUILT-IN 4
CONSTANTS ___
135
I
Compiled REXX - Benefits
REXX Interpreter
136
Compiled REXX - Benefits m u m u m m
I 31-Bit Capability I
Compiler, Library, and Compiled Code run and
use storage above the 16 Mega-byte line
137
Why is REXX Hard to Compile
SIGNAL I
Control can be transferred to everywhere
- Even into ”procedure” and loop bodies
138
Why is REXX Hard to Compile m m m
No data types I
All data is ”character string”
No declarations 1
Variables come and go - EXECCOMM/DROP
139
Run-Time
Performance
Improvements w Compllsr
Assignments 6 - 10
0 Savings example
Interpreted
program
runs 60 times a day (12 sec's)
us i ng 12 min's CPU
assume
improvement of 6 times
runs
compiled 2 min's
140
Differences to CMS Re1 6 Interpreter
Try to avoid
141
... wars(
Compller
142
Compiled REXX Programs
143
Improvements
I ImproveBuilt-inFunctions I
~~
144
Complains
Comp i1 ed
145
Requirements
Improve Assignment
Compiler option
146
Requirements ...
I Static Binding I
Compiler option
Dualism - resolvedaddresddynamic invocation
* Compileroption XREF(S)
147
Requirements =.. OsreIoDment SOL vlenlu\
148
Requirements WBB
I Implement INTERPRET I
Long Range Consideration
140
MVS Compiler - Requirements
* Cross compile ?
150