Wykres commitów

13 Commity (ff380c25582f3e2645e9d6204d1f966619d4bdd1)

Autor SHA1 Wiadomość Data
Paul Sokolovsky f54bcbf099 py, unix: Make "mpconfig.h" be first included, as other headers depend on it.
Specifically, nlr.h does.
2014-05-02 17:48:40 +03:00
Damien George 4b01de44ba py: Add traceback info to syntax errors.
Should fix issue #463.
2014-04-13 11:56:02 +01:00
Damien George 65cad12d38 py: Add option to compiler to specify default code emitter.
Also add command line option to unix port to select emitter.
2014-04-06 11:48:15 +01:00
Damien George 7efc5b3f34 py: Make globals and locals proper dictionary objects.
Finishes addressing issue #424.

In the end this was a very neat refactor that now makes things a lot
more consistent across the py code base.  It allowed some
simplifications in certain places, now that everything is a dict object.

Also converted builtins tables to dictionaries.  This will be useful
when we need to turn builtins into a proper module.
2014-04-05 22:36:42 +01:00
Damien George ea13f407a3 py: Change nlr_jump to nlr_raise, to aid in debugging.
This does not affect code size or performance when debugging turned off.

To address issue #420.
2014-04-05 18:32:08 +01:00
Damien George df6567e634 Merge map.h into obj.h.
Pretty much everyone needs to include map.h, since it's such an integral
part of the Micro Python object implementation.  Thus, the definitions
are now in obj.h instead.  map.h is removed.
2014-03-30 13:54:02 +01:00
Damien George d17926db71 Rename rt_* to mp_*.
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.
2014-03-30 13:35:08 +01:00
xbe efe3422394 py: Clean up includes.
Remove unnecessary includes. Add includes that improve portability.
2014-03-17 02:43:40 -07:00
Damien George c5966128c7 Implement proper exception type hierarchy.
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.
2014-02-15 16:10:44 +00:00
Paul Sokolovsky 2aa217b974 Implement full arg handling for exec(). 2014-02-13 00:36:54 +02:00
Paul Sokolovsky 520e2f58a5 Replace global "static" -> "STATIC", to allow "analysis builds". Part 2. 2014-02-12 18:31:30 +02:00
Damien George 698ec21e46 Make mp_obj_str_get_data return char* instead of byte*.
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.
2014-02-08 18:17:23 +00:00
Damien George ca4767984b py: Implement builtin exec. 2014-02-03 22:44:10 +00:00