- 30 Mar, 2014 1 commit
-
-
Damien George authored
Can now choose at boot up whether the USB device is CDC+MSC or CDC+HID. Choice is made by an option in boot.py, with default being CDC+MSC. HID+MSC is not currently supported, but should be easy to implement. Boot up now has ability to change the reset mode: hold down USR switch while booting and LEDs will count from 1 to 7 to indicate the boot mode. Release USR when correct mode is selected. Current modes are 1 (normal boot), 2 (safe mode), 3 (reset FS mode).
-
- 29 Mar, 2014 26 commits
-
-
Damien George authored
-
Damien George authored
The HID device must appear before the CDC in order for both to work at the same time. Whilst the code is working, it's not currently used.
-
Paul Sokolovsky authored
E.g. to handle currently_in_except_block restoring properly.
-
Paul Sokolovsky authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Paul Sokolovsky authored
-
Damien George authored
Adds readline_init() to clear readline history on soft reset. Addresses issue #387.
-
Damien George authored
The compiler allocates 7 entries on the stack for a with statement (following CPython, but probably can be reduced). This is enough for the method load and call in SETUP_WITH.
-
Damien George authored
With statement implementation
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
Addresses issue #388.
-
Damien George authored
Implement "yield from"
-
Damien George authored
-
Damien George authored
-
Damien George authored
Partly (very partly!) addresses issue #386. Most importantly, at the REPL command line, each invocation does not now lead to increased memory usage (unless you define a function/lambda).
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
This reduntant triple is one of the ugliest parts of Python, which they chickened out to fix in Python3. We really should consider passing just as single exception instance (without breaking Python-level APIs of course), but until we do, let's follow CPython layout.
-
Paul Sokolovsky authored
Will be reused in WITH bytecodes.
-
Damien George authored
-
Damien George authored
objgenerator: close(): Throw instance of GeneratorExit (not type).
-
Damien George authored
-
- 28 Mar, 2014 6 commits
-
-
Damien George authored
show_bc now decodes the prelude correctly. Moved WRITE_FILE stuff from runtime.c to emitglue.c. Addresses issue #385.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
Handling of GeneratorExit is really peculiar - it subverts normal exception propagation rules.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
To comply with Python semantics and allow use of mp_obj_is_subclass_fast() for exception matching.
-
Paul Sokolovsky authored
-
- 27 Mar, 2014 7 commits
-
-
Damien George authored
Only exceptions that are actually used are left prefedined. Hierarchy is still there, and removed exceptions are just commented out.
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
Rationale: setting up the stack (state for locals and exceptions) is really part of the "code", it's the prelude of the function. For example, native code adjusts the stack pointer on entry to the function. Native code doesn't need to know n_state for any other reason. So putting the state size in the bytecode prelude is sensible. It reduced ROM usage on STM by about 30 bytes :) And makes it easier to pass information about the bytecode between functions.
-
Damien George authored
-