summaryrefslogtreecommitdiff
path: root/unix
AgeCommit message (Collapse)Author
2015-10-12unix: Add exit and paste-mode hints to shell startup banner.Damien George
Thanks to @nyov for the initial patch.
2015-10-12Rename "Micro Python" to "MicroPython" in REPL, help, readme's and misc.Damien George
2015-10-11repl: Add paste mode to friendly REPL, entered via CTRL-E.Damien George
Use CTRL-E to enter paste mode. Prompt starts with "===" and accepts all characters verbatim, echoing them back. Only control characters are CTRL-C which cancels the input and returns to normal REPL, and CTRL-D which ends the input and executes it. The input is executed as though it were a file. The input is not added to the prompt history.
2015-10-11py: Rename MP_BOOL() to mp_obj_new_bool() for consistency in naming.Paul Sokolovsky
2015-10-10unix/modsocket: Fix usage of pointers to locals outside scopeAnmol Sarma
2015-10-10unix/modjni: py2jvalue: Support bool and None values.Paul Sokolovsky
2015-10-09unix/modjni: jvalue2py() is currently not used.Paul Sokolovsky
Not remove so far, may be needed later.
2015-10-08unix/modjni: Allow to access fields of objects.Paul Sokolovsky
2015-10-07unix/modjni: After Call*Method(), Java exception should always be checked.Paul Sokolovsky
OpenJDK seemed to return NULL in case of exception, but Dalvik returns arbitrary value, so skip such "optimizations".
2015-10-06modussl: SSL socket wrapper module based on axTLS.Paul Sokolovsky
2015-10-04unix: Add support for building axtls dependency lib.Paul Sokolovsky
2015-10-04unix/modjni: jclass.__str__/__repr__: Return Java .toString() value.Paul Sokolovsky
2015-10-03unix/modjni: jobject.__str__/__repr__: Return Java .toString() value.Paul Sokolovsky
2015-10-02unix/modjni: Convert Java's IndexOutOfBoundsException to Python's IndexError.Paul Sokolovsky
2015-10-02py: Allocate parse nodes in chunks to reduce fragmentation and RAM use.Damien George
With this patch parse nodes are allocated sequentially in chunks. This reduces fragmentation of the heap and prevents waste at the end of individually allocated parse nodes. Saves roughly 20% of RAM during parse stage.
2015-10-01tests: Add further tests for mpz code.Damien George
2015-10-01unix/modjni: Propagate Java exceptions on list access.Paul Sokolovsky
2015-09-30unix/modjni: Fix method argument matching.Paul Sokolovsky
2015-09-29unix/modjni: Implement len() for objects with java.util.List interface.Paul Sokolovsky
2015-09-28unix/modjni: call_method: Delete done local references in loop.Paul Sokolovsky
To avoid local ref table overflow.
2015-09-27unix/modjni: call_method: Better resource release.Paul Sokolovsky
2015-09-26unix/modjni: call_method(): If name doesn't match, cleanup via goto next_method.Paul Sokolovsky
2015-09-26unix/modjni: Need to really use per-rettype Call*Method functions.Paul Sokolovsky
2015-09-24unix/modjni: new_jobject(): Handle null reference.Paul Sokolovsky
2015-09-23unix/modjni: Factor out is_object_type().Paul Sokolovsky
2015-09-22unix/modffi.c: cast first to intptr_t when casting from/to pointerVicente Olivert Riera
This fixes errors like these ones: modffi.c: In function 'return_ffi_value': modffi.c:143:29: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] const char *s = (const char *)val; ^ modffi.c:162:20: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] return (mp_obj_t)val; ^ modffi.c: In function 'ffifunc_call': modffi.c:358:25: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] values[i] = (ffi_arg)a; ^ modffi.c:373:25: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] values[i] = (ffi_arg)s; ^ modffi.c:381:25: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] values[i] = (ffi_arg)bufinfo.buf; ^ modffi.c:384:25: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] values[i] = (ffi_arg)p->func; ^ These errors can be highlighted when building micropython from MIPS64 n32 because ffi_arg is 64-bit wide and the pointers on MIPS64 n32 are 32-bit wide, so it's trying to case an integer to a pointer (or vice-versa) of a different size. We should cast first the pointer (or the integer) to a pointer sized integer (intptr_t) to fix that problem. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
2015-09-22unix/modjni: Move type analysis logic to new_jobject(), for reuse.Paul Sokolovsky
2015-09-21unix/modjni: Support for subscripting of Java lists (r/o so far).Paul Sokolovsky
2015-09-20unix/modjni: jvalue2py: Handle boolean.Paul Sokolovsky
2015-09-19unix: Use MICROPY_HAL_H macro for header inclusion.Alex March
Follow the same format as other ports using the macro to include the HAL header.
2015-09-19unix/modjni: py2jvalue: Pass jobject's down to Java.Paul Sokolovsky
So far, no signature check is done (TODO).
2015-09-18unix/modjni: py2jvalue: Handle both int and long java types (with TODO for ↵Paul Sokolovsky
long).
2015-09-17unix/modjni: jvalue2py: Handle class-containing jvalues.Paul Sokolovsky
2015-09-16unix/modjni: Add env() module function.Paul Sokolovsky
Useful to load native method libraries not loaded by VM (as happens on Android).
2015-09-15py/objslice: Make slice attributes (start/stop/step) readable.Tom Soulanille
Configurable with MICROPY_PY_BUILTINS_SLICE_ATTRS. Disabled by default.
2015-09-15unix/modjni: Return any object type value as a jobject.Paul Sokolovsky
2015-09-14unix/modjni: Return Java null as Python None.Paul Sokolovsky
2015-09-14unix/modjni: Support static methods.Paul Sokolovsky
2015-09-13unix/modjni: Factor out new_jobject(), jvalue2py() functions.Paul Sokolovsky
2015-09-12unix: Enable REPL auto-indent.Damien George
2015-09-12unix/modjni: Factor out py2jvalue() function.Paul Sokolovsky
2015-09-11unix/modjni: "jni" module to interface to JNI-compliant JavaVM.Paul Sokolovsky
This includes Android Dalvik VM for example. Example usage: import jni System = jni.cls("java/lang/System") System.out.println("Hello, Java!")
2015-09-03tests: Add tests to improve coverage of objstr.c.Damien George
2015-08-31modffi: dlsym() doesn't set errno, so use ENOENT for OSError.Paul Sokolovsky
This may be a bit confusing, as ENOENT is often rendered as "No such file or directory", but any other code would be only more confusing.
2015-08-30unix: Allow to build libffi from source and link against it.Paul Sokolovsky
Linking against local libffi (and other libs in future) is triggered by "make MICROPY_STANDALONE=1". Before that, dependent libs should be built with "make deplibs".
2015-08-29py: Treat -m32 flag as part of CC, LD, etc.Paul Sokolovsky
Indeed, this flag efectively selects architecture target, and must consistently apply to all compiles and links, including 3rd-party libraries, unlike CFLAGS, which have MicroPython-specific setting.
2015-08-22unix: Bump default heap size to 1MB (2MB on 64-bit systems).Paul Sokolovsky
2015-08-20py: Add MICROPY_PY_BUILTINS_FILTER, disable for minimal ports.Paul Sokolovsky
Saves 320 bytes on x86.
2015-08-13py: Add stream_tell method, and use for unix and stmhal file tell.blmorris
2015-08-05unix/mpconfigport.h: set MICROPY_PY_SYS_PLATFORM to "darwin" if compiled on OSXblmorris
This change allows micropython to return the same value as CPython for sys.platform