Re: How does the bootstrap process work?
Bruce Hoult <[email protected]> Tue, 10 Jun 2014 22:04:02 +1200
| Newsgroups | gmane.comp.lang.dylan.gwydion.devel |
|---|---|
| Message-ID | <CAMU+Ekz+PjgwdVMXuziqGqwzL7LYDCHACssoASJ6rb235o33Bw@mail.gmail.com> |
--===============0367546217== Content-Type: multipart/alternative; boundary=001a113304ac809ccc04fb787218 --001a113304ac809ccc04fb787218 Content-Type: text/plain; charset=UTF-8 Presumably you're talking about Open Dylan, which unfortunately I know nothing about. However, the principles of any three stage bootstrap are pretty much the same. In the first stage, an existing compiler is used to build a compiler that understands the updated language. This new compiler is linked against the existing runtime library. In the second stage, the new compiler that understands the updated language is used to compile both itself and also the updated runtime library (which may use features that require the updated compiler). The third stage is essentially a check that the 2nd stage compiler works properly, and the output should be identical to that from the 2nd stage. Therefore, for example, syntax errors in the updated runtime library will only be detected in the 2nd stage build. As will logic errors in the updated compiler. On Tue, Jun 10, 2014 at 7:23 PM, Wim Vander Schelden <[email protected]> wrote: > Hi, > > I was playing around with some changes to the compiler, and I noticed my > errors only surfaced during the second stage. Previously, I always thought > the bootstrap compiler built the entire tree thrice, and only required > three builds to shake its dependencies on the installed compiler. > > That doesn't seem to be the case. Can someone explain the differences > between the three stages and what is built when? > > _______________________________________________ > hackers mailing list > [email protected] > https://lists.opendylan.org/mailman/listinfo/hackers > > --001a113304ac809ccc04fb787218 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Presumably you're talking about Open Dylan, which unfo= rtunately I know nothing about.<div><br></div><div>However, the principles = of any three stage bootstrap are pretty much the same.</div><div><br></div> <div>In the first stage, an existing compiler is used to build a compiler t= hat understands the updated language. This new compiler is linked against t= he existing runtime library.</div><div><br></div><div>In the second stage, = the new compiler that understands the updated language is used to compile b= oth itself and also the updated runtime library (which may use features tha= t require the updated compiler).</div> <div><br></div><div>The third stage is essentially a check that the 2nd sta= ge compiler works properly, and the output should be identical to that from= the 2nd stage.</div><div><br></div><div>Therefore, for example, syntax err= ors in the updated runtime library will only be detected in the 2nd stage b= uild. As will logic errors in the updated compiler.</div> <div><br></div></div><div class=3D"gmail_extra"><br><br><div class=3D"gmail= _quote">On Tue, Jun 10, 2014 at 7:23 PM, Wim Vander Schelden <span dir=3D"l= tr"><<a href=3D"mailto:[email protected]" target=3D"_blank">dylan@fixnum.= org</a>></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div>Hi,<br><br></div>= I was playing around with some changes to the compiler, and I noticed my errors only surfaced during the second=20 stage. Previously, I always thought the bootstrap compiler built the=20 entire tree thrice, and only required three builds to shake its=20 dependencies on the installed compiler.<br> <br></div>That doesn't seem to be the case. Can someone explain the dif= ferences between the three stages and what is built when?</div> <br>_______________________________________________<br> hackers mailing list<br> <a href=3D"mailto:[email protected]">[email protected]<= /a><br> <a href=3D"https://lists.opendylan.org/mailman/listinfo/hackers" target=3D"= _blank">https://lists.opendylan.org/mailman/listinfo/hackers</a><br> <br></blockquote></div><br></div> --001a113304ac809ccc04fb787218-- --===============0367546217== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ hackers mailing list [email protected] https://lists.opendylan.org/mailman/listinfo/hackers --===============0367546217==--