Modular handling of externals
commitdbafe7e89cac14a11eb6cac93bdf42b051494bc8
authorThomas Leonard <talex5@gmail.com>
Sun, 19 Oct 2008 15:44:12 +0000 (19 16:44 +0100)
committerThomas Leonard <talex5@gmail.com>
Sun, 19 Oct 2008 16:17:25 +0000 (19 17:17 +0100)
tree8ad46e6aff629cc89885f98b16a5d9c2b6cec6b1
parent04946bcb224c5fe356b143aa744569bd005573c7
Modular handling of externals

Instead of having the main module import the single dlt._externals file, it
now imports files based on the type. For example, if you do:

import dlt.io: Printer

class Main:
in Printer stdout

Then it calls '_externals.dlt.io.stdout()' to get the object. This avoids
creating dependencies on modules and symbols we don't need, and makes it easier
to extend the library with new externals.

A related change is that SystemExit is now part of object.d and handled by the
normal D main invoker. This was being handled by a method on the old Externals
object.
dmd2/module.c
dmd2/parse.c
dmd2/statement.c
phobos2/internal/dmain2.d
phobos2/internal/object.d
phobos2/object.d