- 16 Feb, 2014 2 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
See http://www.python.org/dev/peps/pep-0420/#specification for spec. See https://github.com/micropython/micropython/issues/298 for the discussion of the implemented behavior.
-
- 15 Feb, 2014 1 commit
-
-
Damien George authored
Each built-in exception is now a type, with base type BaseException. C exceptions are created by passing a pointer to the exception type to make an instance of. When raising an exception from the VM, an instance is created automatically if an exception type is raised (as opposed to an exception instance). Exception matching (RT_BINARY_OP_EXCEPTION_MATCH) is now proper. Handling of parse error changed to match new exceptions. mp_const_type renamed to mp_type_type for consistency.
-
- 08 Feb, 2014 1 commit
-
-
Damien George authored
Can't decide which is better for string type, char or byte pointer. Changing to char removes a few casts. Really need to do proper unicode.
-
- 06 Feb, 2014 1 commit
-
-
Damien George authored
-
- 05 Feb, 2014 1 commit
-
-
Damien George authored
-
- 04 Feb, 2014 1 commit
-
-
Paul Sokolovsky authored
sys.path is not initialized by rt_init(), that's left for platform-specific startup code. (For example, bare metal port may have some hardcoded defaults, and let user change sys.path directly; while port for OS with environment feature can take path from environment). If it's not explicitly initialized, modules will be imported only from a current directory.
-
- 03 Feb, 2014 1 commit
-
-
Paul Sokolovsky authored
-
- 25 Jan, 2014 1 commit
-
-
Damien George authored
-
- 22 Jan, 2014 1 commit
-
-
Damien George authored
-
- 21 Jan, 2014 1 commit
-
-
Damien George authored
Can now have null bytes in strings. Can define ROM qstrs per port using qstrdefsport.h
-
- 19 Jan, 2014 1 commit
-
-
Paul Sokolovsky authored
In Python, importing module several times returns same underlying module object. This also fixes import statement handling for builtin modules. There're still issues: 1. CPython exposes set of loaded modules as sys.modules, we may want to do that either. 2. Builtin modules are implicitly imported, which is not really correct. We should separate registering a (builtin) module and importing a module. CPython keeps builtin module names in sys.builtin_module_names .
-
- 18 Jan, 2014 1 commit
-
-
Damien George authored
Byte code has a map from byte-code offset to source-code line number, used to give better error messages.
-
- 15 Jan, 2014 1 commit
-
-
Damien George authored
Parser no longer prints an error, but instead returns an exception ID and message.
-
- 13 Jan, 2014 1 commit
-
-
Damien George authored
-
- 06 Jan, 2014 2 commits
- 04 Jan, 2014 1 commit
-
-
Damien George authored
Qstr's are now split into a linked-list of qstr pools. This has 2 benefits: the first pool can be in ROM (huge benefit, since we no longer use RAM for the core qstrs), and subsequent pools use m_new for the next pool instead of m_renew (thus avoiding a huge single table for all the qstrs). Still would be better to use a hash table, but this scheme takes us part of the way (eventually convert the pools to hash tables). Also fixed bug with import. Also improved the way the module code is referenced (not magic number 1 anymore).
-
- 03 Jan, 2014 2 commits
-
-
Damien George authored
-
Damien George authored
import works for simple cases. Still work to do on finding the right script, and setting globals/locals correctly when running an imported function.
-