| Commit message (Collapse) | Author | Age |
|
|
|
| |
Part of code cleanup, working towards resolving issue #50.
|
|
|
|
| |
Part of code cleanup, to resolve issue #50.
|
|
|
|
| |
Addressing issue #50, still some way to go yet.
|
|
|
|
|
|
|
|
|
|
|
|
| |
These functions are generally 1 machine instruction, and are used in
critical code, so makes sense to have them inline.
Also leave these functions uninverted (ie 0 means enable, 1 means
disable) and provide macro constants if you really need to distinguish
the states. This makes for smaller code as well (combined with
inlining).
Applied to teensy port as well.
|
|
|
|
| |
Factored irq functions into a separate file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The user code should call micropython.alloc_emergency_exception_buf(size)
where size is the size of the buffer used to print the argument
passed to the exception.
With the test code from #732, and a call to
micropython.alloc_emergenncy_exception_buf(100) the following error is
now printed:
```python
>>> import heartbeat_irq
Uncaught exception in Timer(4) interrupt handler
Traceback (most recent call last):
File "0://heartbeat_irq.py", line 14, in heartbeat_cb
NameError: name 'led' is not defined
```
|
|
|
|
| |
See discussion in issue #50.
|
| |
|
|
|
|
|
|
| |
handling.
Step 1 fixes #732
|
| |
|
|
|
|
|
| |
This removes need for some casts (at least, more than it adds need
for new casts!).
|
|
|
|
| |
Addresses issue #598.
|
|\
| |
| | |
Allow compilation of unix port under clang on OS X
|
| |
| |
| |
| | |
override in vmentrytable.h
|
|/ |
|
|
|
|
|
| |
Likely there are other functions that should be renamed, but this is a
start.
|
|
|
|
|
|
|
| |
Blanket wide to all .c and .h files. Some files originating from ST are
difficult to deal with (license wise) so it was left out of those.
Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
|
|
|
|
| |
Specifically, nlr.h does.
|
| |
|
|
|
|
| |
This is ugly, just as expected.
|
|
|
|
| |
To avoid pointer-to-field GC problem.
|
| |
|
|
|
|
|
|
| |
Previously, a failed malloc/realloc would throw an exception, which was
not caught. I think it's better to keep the parser free from NLR
(exception throwing), hence this patch.
|
| |
|
|
|
|
|
|
| |
This does not affect code size or performance when debugging turned off.
To address issue #420.
|
|
|
|
| |
A malloc/realloc fail now throws MemoryError.
|
|
|
|
|
|
|
| |
One of the reason for separate "message" (besides still unfulfilled desire to
optimize memory usage) was apparent special handling of exception with
messages by CPython. Well, the message is still just an exception argument,
it just printed specially. Implement that with PRINT_EXC printing format.
|
|
|
|
|
|
|
| |
Mostly just a global search and replace. Except rt_is_true which
becomes mp_obj_is_true.
Still would like to tidy up some of the names, but this will do for now.
|
| |
|
|
|
|
| |
Addresses issue #388.
|
|
|
|
|
| |
To comply with Python semantics and allow use of mp_obj_is_subclass_fast()
for exception matching.
|
|
|
|
|
| |
Only exceptions that are actually used are left prefedined. Hierarchy
is still there, and removed exceptions are just commented out.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
This gets "value" of exceptions in the sense as it's defined for
StopIteration.value (i.e. args[0] or None).
TODO: This really should be inline function.
|
|\ \
| | |
| | |
| | | |
pfalcon-gen-close-ret-val
|
| | |
| | |
| | |
| | |
| | |
| | | |
Return with value gets converted to StopIteration(value). Implementation
keeps optimizing against creating of possibly unneeded exception objects,
so there're considerable refactoring to implement these features.
|
| |/
|/| |
|
| |
| |
| |
| |
| | |
They still exist in commented-out form in objexcept.c if they are ever
needed.
|
|/ |
|
| |
|
|
|
|
| |
arguments). Comment out the errors that aren't needed if memory becomes an issue.
|
| |
|
|
|
|
| |
Remove unnecessary includes. Add includes that improve portability.
|
| |
|
|
|
|
|
| |
Addresses issue #290, and hopefully sets up things to allow generators
throwing exceptions, etc.
|
|
|
|
| |
Thanks to @pfalcon for the tip!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Ultimately all static strings should be qstr. This entry in the type
structure is only used for printing error messages (to tell the type of
the bad argument), and printing objects that don't supply a .print method.
|
| |
|
| |
|