Damien George
96056a6272
py: Revent some long int configuration.
11 years ago
Damien George
91f2dbf64c
Merge branch 'master' of github.com:micropython/micropython
11 years ago
Damien George
c8f78bc280
py: VM never throws an exception, instead returns a status and value.
Addresses issue #290 , and hopefully sets up things to allow generators
throwing exceptions, etc.
11 years ago
Paul Sokolovsky
ff4678c5b4
objexcept: Fix thinko with args to mp_obj_new_list().
First arg is not alloc size, but real size, so if used as
mp_obj_new_list(3, NULL), need to store items, not append.
11 years ago
Damien George
36109d246f
Small change to configuration of long int.
11 years ago
Damien George
22a0865d54
py: Improve exception bases, reduces ROM usage.
Thanks to @pfalcon for the tip!
11 years ago
Damien George
8725f8f7de
py: Pass all scope flags through to runtime.
11 years ago
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.
11 years ago
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.
11 years ago
Paul Sokolovsky
8ac72b9d00
Add testcase for failing namespace switch throwing exception from a module.
Issue #290 . This currently fails, to draw attention to the issue.
11 years ago
Damien George
9307ef46ca
Merge pull request #291 from GordonMcGregor/osx_build
OS X compatible -map syntax for LDFLAGS
11 years ago
Damien George
aa9b74fead
py: Fix IMPORT_STAR, needs to pop the stack.
11 years ago
Damien George
7ef098000a
Merge pull request #288 from pfalcon/port-builtins
Allow ports to define statically builtin functions.
11 years ago
Damien George
25735ba6d3
Merge pull request #282 from pfalcon/from-star
Implement "from mod import *"
11 years ago
Gordon McGregor
3890ec48e7
OS X compatible -map syntax for LDFLAGS
11 years ago
Paul Sokolovsky
76f8cedb52
mp_binary_get_val(): Fix value type.
11 years ago
Paul Sokolovsky
60a0d3f1db
objexcept: Fix a case of initialized object field.
11 years ago
Paul Sokolovsky
c203324e6c
objarray: Refactor to use array accessors from binary.c .
11 years ago
Paul Sokolovsky
8bc3516389
ffi: Implement ffivar.get()/set() methods.
Done by introducing another factored out helper API in binary.c. This API
can be reused also by array and struct modules.
11 years ago
Paul Sokolovsky
910843e86d
Allow ports to define statically builtin functions.
Convert unix open() to such.
11 years ago
Damien George
70d7a83c74
stm: If SD card inserted on hard reset, it is the medium for USB MSD.
11 years ago
Paul Sokolovsky
e7299b5296
Add testcase for "from module import *".
11 years ago
Paul Sokolovsky
b2e8c52298
Add testcase for "from module import sym".
11 years ago
Paul Sokolovsky
da1ce93da8
Implement "from module import *" construct.
11 years ago
Damien George
a8d404e0e1
Merge branch 'master' of github.com:micropython/micropython
11 years ago
Damien George
099a9cb575
Remove mp_obj_new_exception_msg_1_arg and _2_arg.
11 years ago
Paul Sokolovsky
2aa217b974
Implement full arg handling for exec().
11 years ago
Damien George
780ba22bb8
stm: Copy COPT style from unix port.
11 years ago
Damien George
648d9e6447
Merge pull request #279 from pfalcon/make-copt
unix Makefile: Split off optimization options to COPT variable.
11 years ago
Paul Sokolovsky
5be1b2873b
unix Makefile: Split off optimization options to COPT variable.
To allow easily try different optimization and configuration options
without patching any files.
11 years ago
Paul Sokolovsky
520e2f58a5
Replace global "static" -> "STATIC", to allow "analysis builds". Part 2.
11 years ago
Paul Sokolovsky
d5df6cd44a
Replace global "static" -> "STATIC", to allow "analysis builds". Part 1.
Some tools do not support local/static symbols (one example is GNU ld map file).
Exposing all functions will allow to do detailed size comparisons, etc.
Also, added bunch of statics where they were missing, and replaced few identity
functions with global mp_identity().
11 years ago
Damien George
1d1e38d911
Merge branch 'master' of github.com:micropython/micropython
11 years ago
Damien George
9d324b0ac7
stm: Add specific UINT_FMT and INT_FMT.
For some reason, STM port, while it's 32 bit, needs %lu and %ld for
printing machine_uint_t and machine_int_t.
11 years ago
Paul Sokolovsky
550d804d95
Add prototype for gc_dump_info().
11 years ago
Damien George
323f39a2b3
Merge pull request #278 from pfalcon/unix-gc
Enable GC for Unix port
11 years ago
Damien George
0d14d13016
Merge pull request #277 from pfalcon/link-map
Enable link map file generation.
11 years ago
Damien George
bbe39b62bc
Merge pull request #276 from dhylands/cleanup-warnings
Bah - Removed a couple of warnings for teensy that I didn't notice before.
11 years ago
Paul Sokolovsky
723a6ed371
More GC debugging improvements.
11 years ago
Paul Sokolovsky
20632e4d3f
stm: Provide malloc()/realloc()/free(), as forwarding to gc_*() functions.
Note: none of these functions are used by STM port, so they're provided
to have parity with pre gc refactor status quo, and in case they will be
needed in the future by some extension writers.
11 years ago
Paul Sokolovsky
e7db8171d8
unix: Implement garbage collection support.
11 years ago
Paul Sokolovsky
b62c30b4bc
Generalize malloc-via-gc-heap support, make it available to unix port.
11 years ago
Paul Sokolovsky
8d90a382cf
basics/enumerate.py: Don't turn enumerate test into heap test.
With range(10000), doesn't fit into 128K heap.
11 years ago
Paul Sokolovsky
4e2460852a
objstr: Mark few local symbols as static, cleanup codestyle.
Please don't submit patches with tab indentation!
11 years ago
Paul Sokolovsky
c0a8374103
gc: Don't segfault if gc_realloc() fails.
11 years ago
Paul Sokolovsky
287d9620fc
Enable link map file generation.
11 years ago
Paul Sokolovsky
a075741c90
Rename str_join -> strjoin to make it not clash with objstr's one.
11 years ago
Dave Hylands
6a6ac8e4c7
Bah - Removed a couple of warnings for teensy that I didn't notice before.
11 years ago
Paul Sokolovsky
af19cbd201
gc: Make debug output configurable, revamp test function.
Test function needs to be called by something else. Test heap size reduced so
its dump fits on a screenful of a typical terminal.
11 years ago
Paul Sokolovsky
4e836fb4ea
mp_obj_equal(): Instead of assert(), throw NotImplementedError.
With a nice traceback, helps debugging much better.
11 years ago