1.1 --- a/micropython/__init__.py Tue Oct 28 01:08:06 2008 +0100
1.2 +++ b/micropython/__init__.py Sat Nov 08 21:15:11 2008 +0100
1.3 @@ -53,17 +53,21 @@
1.4
1.5 supported_optimisations = micropython.opt.Optimiser.supported_optimisations
1.6
1.7 - def __init__(self, path=None, verbose=0):
1.8 + def __init__(self, path=None, optimisations=None, verbose=0):
1.9
1.10 """
1.11 Initialise the importer with the given search 'path' - a list of
1.12 directories to search for Python modules.
1.13
1.14 + The optional 'optimisations' cause certain techniques to be used in
1.15 + reducing program size and improving program efficiency.
1.16 +
1.17 The optional 'verbose' parameter causes output concerning the activities
1.18 of the object to be produced if set to a true value (not the default).
1.19 """
1.20
1.21 self.path = path or [os.getcwd()]
1.22 + self.optimisations = optimisations
1.23 self.verbose = verbose
1.24 self.modules = {}
1.25 self.modules_ordered = []
1.26 @@ -124,7 +128,7 @@
1.27
1.28 return self.modules.values()
1.29
1.30 - def get_image(self, with_builtins=0, optimisations=None):
1.31 + def get_image(self, with_builtins=0):
1.32
1.33 "Return a dictionary mapping modules to structures."
1.34
1.35 @@ -155,7 +159,7 @@
1.36 # Position the module in the image and make a translation.
1.37
1.38 module.location = pos
1.39 - trans = micropython.ast.Translation(module, self, optimisations)
1.40 + trans = micropython.ast.Translation(module, self)
1.41
1.42 # Add header details.
1.43