[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Questions about the OpenEdge COMPILE Statement

Status
Not open for further replies.
L

Laura Stern

Guest
Answers to the things I know about, in-line. Q1. If the statement encounters an error, is the _progres client AVM that is executing the statement supposed to crash altogether? I am observing that it occasionally crashes our AVM during the COMPILE statement, and the error message in the event log seems to be pointing us to a file I/O issue. --- No. Of course the AVM should not crash when it encounters an error during compilation - or ever for that matter. It should just display an error message. Q2. ...Is it possible to compile in one operation and then use the SAVE argument in a subsequent operation to save the r-code, but avoid incurring additional CPU overhead during a subsequent COMPILE w/SAVE? ... --- No. When you use the COMPILE statement, it will compile the code even if you had compiled it before and there is an in-memory version of the r-code. Q3.a. ...When you compile a class definition file, ABL compiles the class definition file identified in the COMPILE statement and all class files in its inherited class hierarchy, by default. I'm curious about the "by default". How do we influence whether the compiled output of multiple (inherited) classes are written or just the single class that was actually the target of the COMPILE request. ... --- When you compile a child class the parent(s) will also get compiled. If you say SAVE, all levels are saved. There is no way to make it not do this. Q3.b. If multiple r-code files are going to be unexpectedly written to disk (without being requested) then is there an API for telling us (maybe before or after the fact) *what* particular files are being written to disk? --- No Q5. ... There is a MULTI-COMPILE attribute on the COMPILER handle. First I set that to TRUE. Next I would like to compile classes A, B, and C and write them all to disk. They are inheriting from each other like so : A->B->C. As a preparation I first compile them all in memory without using the "SAVE" argument. Now I want to persist the results on disk, since they are presumably stored in cached memory. If I use "COMPILE" with the "SAVE" argument on class C, then is the expected behavior that it should only write a single r-code to disk for class C? (Leaving A and B unwritten?) --- I assume C is the bottom of the hierarchy. No. Same as the answer to Q2 and Q3. It will compile all 3 and save all 3 to disk. Q6. Along the same lines as Q3.b, is there an API we can use to get the compiler to tell us (proactively) what the cls files are that it needs to work with as a dependency before it can compile the one that is ultimately requested? I suppose this might be considered a form of "reflection", but it would be used in order to request the compilations in the correct sequence (ie. in a sequence that prevents the compiler from writing multiple output files as a result of a single COMPILE statement). --- No.

Continue reading...
 
Status
Not open for further replies.
Top