Paul Sokolovsky
69975df3ff
vm: WITH_CLEANUP: use POP_EXC_BLOCK().
2014-03-30 01:00:51 +02:00
Paul Sokolovsky
a0ad77ba08
vm: Establish macros PUSH_EXC_BLOCK & POP_EXC_BLOCK to deal with exc stack.
...
E.g. to handle currently_in_except_block restoring properly.
2014-03-29 23:18:59 +02:00
Paul Sokolovsky
d109676ec0
py: Reraising exception possible only in except block.
2014-03-29 23:18:59 +02:00
Damien George
f4417a1f95
stmhal: Add Windows .inf file for USB CDC device.
2014-03-29 17:43:02 +00:00
Damien George
2bce0bd750
Merge branch 'master' of github.com:micropython/micropython
2014-03-29 17:28:59 +00:00
Damien George
0aa5d51cf1
py: Support mpz -op- float, mpz -op- complex, and complex -op- mpz.
2014-03-29 17:28:20 +00:00
Paul Sokolovsky
40d6d29af6
vm: Elaborate comments for WITH_CLEANUP, other cosmetic fixes.
2014-03-29 18:46:04 +02:00
Damien George
c9fd6645b0
stmhal: Factor out stdio and readline to separate files.
...
Adds readline_init() to clear readline history on soft reset. Addresses
issue #387 .
2014-03-29 14:20:05 +00:00
Damien George
c689c19471
py: Make MP_BC_SETUP_WITH use the bytecode stack for load_method.
...
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.
2014-03-29 14:06:14 +00:00
Damien George
21a07dc50f
Merge pull request #389 from pfalcon/with-statement
...
With statement implementation
2014-03-29 14:00:03 +00:00
Damien George
b04be056fe
py: Fix regress with GeneratorExit object becoming truly const.
2014-03-29 13:52:51 +00:00
Damien George
918638ec6e
unix: Fix ffi.c to compile with latest changes to API.
2014-03-29 13:48:32 +00:00
Damien George
3e1a5c10c5
py: Rename old const type objects to mp_type_* for consistency.
2014-03-29 13:43:38 +00:00
Damien George
07ddab529c
py: Change mp_const_* objects to macros.
...
Addresses issue #388 .
2014-03-29 13:15:08 +00:00
Damien George
da51a399cf
Merge pull request #383 from pfalcon/yield-from
...
Implement "yield from"
2014-03-29 12:18:14 +00:00
Damien George
75f71584a6
tests: Remove unimplemented exceptions from testing.
2014-03-29 11:43:00 +00:00
Damien George
6e54fcfd12
py: Fix typo printing complex numbers that are purely imaginary.
2014-03-29 11:41:38 +00:00
Damien George
d1e443d0bc
py: Free unique_code slot for outer module.
...
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).
2014-03-29 11:39:36 +00:00
Paul Sokolovsky
e7286ef2c7
tests: Add "with" statement testcases.
2014-03-29 04:39:31 +02:00
Paul Sokolovsky
44307d5ef8
vm: Implement "with" statement (SETUP_WITH and WITH_CLEANUP bytecodes).
2014-03-29 04:39:24 +02:00
Paul Sokolovsky
682f9e639d
vm: Make sure that exception triple is <type, instance, traceback>.
...
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.
2014-03-29 04:35:36 +02:00
Paul Sokolovsky
4fff26a35c
vm: Factor out exception block setup to a macro.
...
Will be reused in WITH bytecodes.
2014-03-29 04:35:23 +02:00
Damien George
c47fd2da8e
Merge branch 'master' of github.com:micropython/micropython
2014-03-29 01:26:02 +00:00
Damien George
1d7553311c
Merge pull request #382 from pfalcon/genexit-inst
...
objgenerator: close(): Throw instance of GeneratorExit (not type).
2014-03-29 01:25:05 +00:00
Damien George
bcc9298e5b
stmhal: Add TODO's to exti.c; fix delay in lcd.c.
2014-03-29 01:24:44 +00:00