Commit Graph

5 Commits

Author SHA1 Message Date
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
Damien George a71c83a1d1 Change mp_obj_type_t.name from const char * to qstr.
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.
2014-02-15 11:34:50 +00:00
Paul Sokolovsky 0c59db1973 Use qstr id to create sys module. 2014-02-04 19:36:00 +02:00
Markus Siemens 7e0dee0cbf windows: Make windows/main.c independent from unix/main.c
Up to know changes unix/main.c were able to break the windows
build because windows/main.c simply included unix/main.c.

Now windows/main.c stands on it's own and won't break if
unix/main.c changes.
2014-01-30 17:13:16 +01:00
Markus Siemens 19ccc6bdc7 Added Windows port (see #233) 2014-01-28 18:21:05 +01:00