[pypy-dev] Re: getting rid of compile.c?

holger krekel hpk at trillke.net
Tue Jan 14 17:17:28 CET 2003


Hi michael!

so you figured out that we've gatewayed this list through gmane :-)

[Michael Hudson Tue, Jan 14, 2003 at 11:34:46AM +0000]
> holger krekel <hpk at trillke.net> writes:
> 
> > Hi,
> > 
> > i was wondering how/if to get rid of compile.c. ASFAIK
> > it is currently needed for bootstrapping purposes. 
> > 
> > Wouldn't it be possible to deliver precompiled bytecode 
> > for the python compiler package and thus obsolete compile.c? 
> > The bytecode isn't platform dependent so this seems sensible
> > to me. 
> 
> That sounds possible, and you're always going to have issues like
> this, but as long as you're hosting your work inside of CPython 2.3,
> I wouldn't worry about it just yet...

right.  But i'd like to get a self-contained bootstrap process ASAP.

> (Doing this would make bytecode changes, erm, hairy, it seems to me).

maybe, but doing a multi-stage bootstrap should bring back
enough flexibility.  E.g. i think that something like the
following could work:
    
    - the precompiled stage1-compiler compiles the stage2-compiler
      while running on smallish C-based stage1-VM 

    - stage2-compiler (runing on stage1-VM) compiles python stage2-VM 

    - stage2-compiler (running on stage1-VM) recompiles stage2-compiler 
      (probably with different bytecodes)

    - stage2-vm takes over 

    - new stage2-compiler (running on stage2-vm) is used subsequently 

One crucial point seems to be that the stage2 python compiler code 
maps well to the stage1-VM and stage2-VM.  

does that make sense?

    holger


More information about the Pypy-dev mailing list