View previous topic :: View next topic |
Author |
Message |
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Sat Aug 28, 2004 1:55 pm Post subject: Re: std |
|
|
sean wrote: | I think you may have just answered your own question. If I had to hazard a guess, the things DMD depends on are in /phobos and /phobos/internal. But all that probably means are that we can't go changing interfaces and such. It would probably still be safe to move object into std if we wanted to. |
I hope and wish that you're right and I'm wrong, but look at std.asserterror: Code: | /********************************************
* Called by the compiler generated module assert function.
* Builds an AssertError exception and throws it.
*/
extern (C) static void _d_assert(char[] filename, uint line)
{
//printf("_d_assert(?s, ?d)\n", cast(char *)filename, line);
AssertError a = new AssertError(filename, line);
//printf("assertion ?p created\n", a);
throw a;
} | Sounds like something that should be located in internal, right? What am I missing here?
I think we should test the waters a little before we jump in. |
|
Back to top |
|
|
larsivi Site Admin
Joined: 27 Mar 2004 Posts: 453 Location: Trondheim, Norway
|
Posted: Sat Aug 28, 2004 2:17 pm Post subject: |
|
|
Just to clarify my position;
Having std as the namespace at one point in time, is the only thing that is more or less sure right now. Doing the switch later when we know it will happen anyway, sounds like a bad idea. Why?
- The compiler depends on stuff in phobos (actually, these dependencies should be part of the spec, or it will be become hopeless for other compiler vendors, but that is a whole other business).
- The switch from phoenix to std will break much more code if we wait until phoenix is stable and have a lot of users.
- Using std will help us identify issues where Phobos and/or DMD is poorly documented when it comes to their interaction (finding out the exact dependencies should be a fairly easy, but possibly time consuming, process, even without any documentation) |
|
Back to top |
|
|
sean
Joined: 24 Jun 2004 Posts: 609 Location: Bay Area, CA
|
Posted: Sat Aug 28, 2004 2:19 pm Post subject: |
|
|
Doh! So much for consistency.
So I tried moving object.d into /std and the experiment didn't go well. It may have something to do with a second instance of object.d defined in /internal. It's probably possible to get everything working, but it's likely not worth the trouble. But perhaps any compiler-dependent bits can go into /phobos and be taken out of /std, then Phoenix can just replace whatever it wants to from std without any worries? |
|
Back to top |
|
|
pragma
Joined: 28 May 2004 Posts: 607 Location: Washington, DC
|
Posted: Sat Aug 28, 2004 2:27 pm Post subject: Re: std |
|
|
andy wrote: | jcc7 wrote: | By the way, there is no "std.object" (that'd make too much sense). The root of the phobos directory has "object.d", "crc32.d", "errno.c", "gcstats.d", etc. I think it'd be terrific if those were moved into the "std" or "internal" directory. | These can't be moved without changes to the compiler. |
Someone is going to have to do some pretty serious hacking to find out what the minimal compilable source tree is. Just keep removing stuff from a phobos build until you can't build simple objects and scalar types anymore.
If it helps, I do know for a fact that the compiler is sensitive to what goes in phobos/src/typeinfo. I once hacked together a "ti_void.d" that allowed me to do (very evil) things with "void". I'm not at all advocating that we go adding scalar types like crazy, but it shows how dependent on that tree dmd is.
I also haven't a clue what impact this kind of hacking will have on the GCC fontend, if any. _________________ -- !Eric.t.Anderton at gmail |
|
Back to top |
|
|
regan
Joined: 21 Jun 2004 Posts: 23
|
Posted: Mon Aug 30, 2004 3:39 pm Post subject: |
|
|
Why don't we just ask Walter? He should be able to give us a minimal phobos. From there we can check what bits we want to modify that are not accessable and petition Walter to change that for us, from there we can start to add our modules etc. |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Mon Aug 30, 2004 4:25 pm Post subject: |
|
|
regan wrote: | Why don't we just ask Walter? He should be able to give us a minimal phobos. | He might, but can we wait until November 2006? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|