OpenAmiga (731/959)

From:Jarno van der Linden
Date:20 Aug 2000 at 02:21:07
Subject:AMIOPEN: Retooling existing applications

Does anyone have any experience with splitting up a large, existing,
monolithic application into a number of smaller tools?

I'm working on POV-Ray, and would like to reduce its potential memory
footprint by putting parts like the parser and the renderer in separate
tools. However, I've come across several problems:

- POV-Ray uses external globals all over the place
- vpcc can't generate a tool for a function that uses non-static globals
- vpcc doesn't appear to be able to generate separate tools for each
function in a source file (only the first function is turned into a
tool)

So it looks like retooling POV-Ray would require extensive modifications
to the original source code. Does anyone have some solutions?

Why can't non-primary tools use globals? I can see a fairly easy solution
at the compiler/assembler level: pass the global pointer to the tool and
insert as the first instruction a "cpy.p p<global>, gp". The VP2.1 docs
explicitely allows such setting of the gp as long as the value points to
a global data area.

Turning each function in a source file into a tool at first appears to be
supported through the -split vpld option, but I can't get it to do anything.

---JvdL---

Subscribe/Unsubscribe: open-request@amiga.com
Amiga FAQ: http://www.amiga.com/faq.html