Re: [quirks-uvm-devel] Library conception
Status: Pre-Alpha
Brought to you by:
teodor
From: Sergei L. <sl...@is...> - 2002-04-09 13:55:10
|
But you are right. Inside one module we use ProcedureId and insert it in all call instructions for internal procedures. But actually it is no problem: we can start renumeration of ProcedureId afer recognize new module header. I.e. `catted' module will consists from several parts, each of it starts with a header. So, I think it is no problem. I think think Quirks module actually can be processed "as a stream" (if I throw out some unimortant stuff from coding format which now prevents it). Sergei Lodyagin wrote: > Max wrote: > >> It depends on library architecture you choise. >> How do you intend to build it? >> For instance I need to call a procedure from other module. >> I need ProcedureId to do this. >> How can I know ProcedureId by Module Name + Procedure Name? >> All procedures from a module are numerated from 1. Right? >> If you merge two modules how can you distinguish first procedure >> from first module and from second module? > > > It seems to me the only approach we should use for linkage - finding > of procedures > by their names (in the given module). In this case we don't need > recompile > programs for use a new version of a library. By the way, most link > program s > perform lookup of procedures by names. > > Thus, I think, loading of Quirks module is a two step process: > > 1. The loading of module itself (at this stage VM assigns > ProcedureId-s to all procedures > in the module. > 2. The linking of the new modules with existing ones. At this stage we > use procedure names > for lookup procedures and make substitution for procedure Id-s in > the call instrunctions. > -- Sergei |