cbysnoopy / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
0 stars 0 forks source link

Eliminate remnants of unused OBJ_TYPE_EXN #48

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. assert 0 == 1

What is the expected output? What do you see instead?
Expect AssertionError (0xE4).  Got TypeError (0xED).

Since Exceptions were rolled into real classes, their type is no longer 
OBJ_TYPE_EXN (0x0E).  They are now of type OBJ_TYPE_CLI (0x09) and inherit 
from the Exception class.

Original issue reported on code.google.com by dwhall...@gmail.com on 25 Sep 2009 at 2:47

GoogleCodeExporter commented 9 years ago
The trouble this introduces is that the assert statement needs the 
AssertionError 
exception and as exceptions become classes (rather than types), the VM will 
require 
classes in order to support the system tests.  In short, this makes 
HAVE_CLASSES a 
requirement for core functionality.  Some smaller-RAM targets will suffer.

Original comment by dwhall...@gmail.com on 18 Jan 2010 at 4:33

GoogleCodeExporter commented 9 years ago
The trouble is remedied by the existing HAVE_ASSERT definition which could be 
disabled 
for smaller targets alleviating the need for classes; however, system tests 
won't be 
able to run on such target platforms.

Original comment by dwhall...@gmail.com on 18 Jan 2010 at 3:34

GoogleCodeExporter commented 9 years ago
Removed 3 places where OBJ_TYPE_EXN was used for managing the EXN type's 
attributes.  
Edited RAISE_VARARGS bytecode to use the new class_isSubclass() function to fix 
the bug 
mentioned above.  Made various fixups where TYPE_EXN was used.  Had to create a 
new 
global "Exception" string so that builtin could be loaded from within interp(). 
 Now 
that HAVE_ASSERT requires HAVE_CLASS, it is relocated within all 
platform/*/pmfeatures.h.  Updated docs/src/AssertStatement.txt (docs build).

Original comment by dwhall...@gmail.com on 18 Jan 2010 at 10:38

GoogleCodeExporter commented 9 years ago
Tests pass.  Builds for avr, arm7 and mbed.  ipm works.

Mainlined directly, see r410

Original comment by dwhall...@gmail.com on 18 Jan 2010 at 10:46

GoogleCodeExporter commented 9 years ago
Changing Milestone-r10 to Milestone-r09

Original comment by dwhall...@gmail.com on 7 Mar 2010 at 6:26

GoogleCodeExporter commented 9 years ago
Changed r09 to R09

Original comment by dwhall...@gmail.com on 12 Mar 2010 at 8:22

GoogleCodeExporter commented 9 years ago

Original comment by dwhall...@gmail.com on 13 Mar 2010 at 1:30

GoogleCodeExporter commented 9 years ago
r517
Post mainline checkin.  Added system tests that should be enabled after 
exceptions can be handled.

Original comment by dwhall...@gmail.com on 9 Jul 2010 at 8:29