<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/builtinimport.c, branch 4.0.0-alpha.3</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=4.0.0-alpha.3</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=4.0.0-alpha.3'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2018-10-07T17:37:49+00:00</updated>
<entry>
<title>modsys: exc_info: Add traceback</title>
<updated>2018-10-07T17:37:49+00:00</updated>
<author>
<name>Noralf Trønnes</name>
<email>noralf@tronnes.org</email>
</author>
<published>2018-09-06T21:07:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=db4a8f5d1a4d26b36d58ab2017501f63bd1cbe03'/>
<id>urn:sha1:db4a8f5d1a4d26b36d58ab2017501f63bd1cbe03</id>
<content type='text'>
Add traceback chain to sys.exec_info()[2].
No actual frame info is added, but just enough to recreate the printed
exception traceback.

Used by the unittest module which collects errors and failures and prints
them at the end.
</content>
</entry>
<entry>
<title>py/builtinimport: Set __file__ on MPY modules</title>
<updated>2018-10-07T17:36:12+00:00</updated>
<author>
<name>Noralf Trønnes</name>
<email>noralf@tronnes.org</email>
</author>
<published>2018-10-07T13:37:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a63555abc1ce07fe4e9420b5835865282adcd1db'/>
<id>urn:sha1:a63555abc1ce07fe4e9420b5835865282adcd1db</id>
<content type='text'>
This sets the __file__ property on MPY modules like how it's done on pure python modules.
</content>
</entry>
<entry>
<title>Two fixes and translate more strings.</title>
<updated>2018-08-09T20:29:30+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2018-08-09T01:24:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=96ebf5bc3fb455162286b9bc31e763f3c4f1c457'/>
<id>urn:sha1:96ebf5bc3fb455162286b9bc31e763f3c4f1c457</id>
<content type='text'>
* Fix finding translations with escaped characters.
* Add back \r to translations since its needed by screen.
</content>
</entry>
<entry>
<title>WIP: after merge; before testing</title>
<updated>2018-07-11T20:45:30+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2018-07-11T20:45:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7c219600a246d8956d0b23ea3f5d125a820e6b6a'/>
<id>urn:sha1:7c219600a246d8956d0b23ea3f5d125a820e6b6a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Always collect after an import</title>
<updated>2018-07-03T12:45:50+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2018-06-28T17:39:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9de611c056e06684dfa9e5fb4c5fd2f4df579046'/>
<id>urn:sha1:9de611c056e06684dfa9e5fb4c5fd2f4df579046</id>
<content type='text'>
Imports generate a lot of garbage so cleaning it up immediately
reduces the likelihood longer lived data structures don't end up in
the middle of the heap.

Fixes #856
</content>
</entry>
<entry>
<title>py/builtinimport: Add compile-time option to disable external imports.</title>
<updated>2018-02-20T07:00:44+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-02-20T07:00:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=209936880df4d63730ea77cf4b6f84e5f2f56d7c'/>
<id>urn:sha1:209936880df4d63730ea77cf4b6f84e5f2f56d7c</id>
<content type='text'>
The new option is MICROPY_ENABLE_EXTERNAL_IMPORT and is enabled by default
so that the default behaviour is the same as before.  With it disabled
import is only supported for built-in modules, not for external files nor
frozen modules.  This allows to support targets that have no filesystem of
any kind and that only have access to pre-supplied built-in modules
implemented natively.
</content>
</entry>
<entry>
<title>py/objmodule: Factor common code for calling __init__ on builtin module.</title>
<updated>2018-02-20T06:56:58+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-02-20T06:56:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6e7819ee2ee20ec9f09feb40b68be5973797f874'/>
<id>urn:sha1:6e7819ee2ee20ec9f09feb40b68be5973797f874</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Introduce a long lived section of the heap.</title>
<updated>2018-01-24T18:33:46+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott.shawcroft@gmail.com</email>
</author>
<published>2018-01-24T00:22:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=416abe33ed44e44d8f75342731080217e123278b'/>
<id>urn:sha1:416abe33ed44e44d8f75342731080217e123278b</id>
<content type='text'>
This adapts the allocation process to start from either end of the heap
when searching for free space. The default behavior is identical to the
existing behavior where it starts with the lowest block and looks higher.
Now it can also look from the highest block and lower depending on the
long_lived parameter to gc_alloc. As the heap fills, the two sections may
overlap. When they overlap, a collect may be triggered in order to keep
the long lived section compact. However, free space is always eligable
for each type of allocation.

By starting from either of the end of the heap we have ability to separate
short lived objects from long lived ones. This separation reduces heap
fragmentation because long lived objects are easy to densely pack.

Most objects are short lived initially but may be made long lived when
they are referenced by a type or module. This involves copying the
memory and then letting the collect phase free the old portion.

QSTR pools and chunks are always long lived because they are never freed.

The reallocation, collection and free processes are largely unchanged. They
simply also maintain an index to the highest free block as well as the lowest.
These indices are used to speed up the allocation search until the next collect.

In practice, this change may slightly slow down import statements with the
benefit that memory is much less fragmented afterwards. For example, a test
import into a 20k heap that leaves ~6k free previously had the largest
continuous free space of ~400 bytes. After this change, the largest continuous
free space is over 3400 bytes.
</content>
</entry>
<entry>
<title>py/builtinimport: Call __init__ for modules imported via a weak link.</title>
<updated>2017-12-13T03:48:53+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-06T05:46:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=f1c9e7760d91cb141b0f03ee348b3fe36d2cf450'/>
<id>urn:sha1:f1c9e7760d91cb141b0f03ee348b3fe36d2cf450</id>
<content type='text'>
This is a bit of a clumsy way of doing it but solves the issue of __init__
not running when a module is imported via its weak-link name.  Ideally a
better solution would be found.
</content>
</entry>
<entry>
<title>py: Convert all uses of alloca() to use new scoped allocation API.</title>
<updated>2017-12-11T02:49:09+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-11-26T12:37:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1e5a33df413bbd8a8aa5bd880be445c684fc5506'/>
<id>urn:sha1:1e5a33df413bbd8a8aa5bd880be445c684fc5506</id>
<content type='text'>
</content>
</entry>
</feed>
