Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert object and Exceptions to Classes instead of C types #37

Closed
GoogleCodeExporter opened this issue Oct 6, 2015 · 7 comments
Closed

Comments

@GoogleCodeExporter
Copy link

Currently, exceptions are implemented as C types: OBJ_TYPE_EXN and created by 
the builtin function _exn().

The root object can be created by: class object(): pass
and exceptions can be declared as classes.

This allows the _exn() and _clo() builtin functions to be removed and makes 
for a more cleaner implementation. 

Original issue reported on code.google.com by dwhall...@gmail.com on 20 May 2009 at 6:57

@GoogleCodeExporter
Copy link
Author

Original comment by dwhall...@gmail.com on 20 May 2009 at 6:57

  • Changed state: Started
  • Added labels: Milestone-r10

@GoogleCodeExporter
Copy link
Author

Size before:
main.elf  :
section             size      addr
.text              45104         0
.rodata             3880     45104
.rodata.str1.1        59     48984
.rodata.str1.4       136     49044
.data               2236   2097152
.bss               12708   2099388

Size after:
main.elf  :
section             size      addr
.text              44996         0
.rodata             4084     44996
.rodata.str1.1        59     49080
.rodata.str1.4       136     49140
.data               2228   2097152
.bss               12708   2099380

Summary: code changed from native functions to bytecode (readonly bytes); (so 
compare .text + 
.rodata):
before = 45104+3880 = 48984
after  = 44996+4084 = 49080
net = 96 more bytes.

I consider this increase in size is an acceptable amount for this change.

Original comment by dwhall...@gmail.com on 20 May 2009 at 11:03

@GoogleCodeExporter
Copy link
Author

Running "make check" with the code change to __bi.py revealed a bug that I 
documented 
in issue #39.  I changed system test t141.py as a permanent workaround.  The 
nature of 
the test has not changed.  With the change to t141.py, make check passes.

Also changed LOAD_NAME in interp.c so that if PM_PBUILTINS is null, it won't be 
checked 
for the name.

Original comment by dwhall...@gmail.com on 20 May 2009 at 11:12

@GoogleCodeExporter
Copy link
Author

Mainlined directly, see r369.

Original comment by dwhall...@gmail.com on 20 May 2009 at 11:14

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Changing Milestone-r10 to Milestone-r09

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

  • Added labels: Milestone-r09

@GoogleCodeExporter
Copy link
Author

Changed r09 to R09

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

@GoogleCodeExporter
Copy link
Author

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

  • Added labels: Milestone-09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant