314 Commits (de5a9d72dcdaacdd5048195cd5bab007f4b2baef)

Author SHA1 Message Date
Damien George f4df3aaa72 py: Allow bytecode/native to put iter_buf on stack for simple for loops.
6 years ago
Damien George de9cd00b39 py/compile: Add an extra pass for Xtensa inline assembler.
6 years ago
Damien George e920bab976 py/emitinline: Move common code for end of final pass to compiler.
6 years ago
Damien George dd53b12193 py/emitinline: Move inline-asm align and data methods to compiler.
6 years ago
Damien George f76b1bfa9f py: Add inline Xtensa assembler.
6 years ago
Damien George ad297a1950 py: Allow inline-assembler emitter to be generic.
6 years ago
Damien George 8e5aced1fd py: Integrate Xtensa assembler into native emitter.
6 years ago
Damien George 080a78b15e py/compile: Simplify configuration of native emitter.
6 years ago
Damien George e6cf5fb2cc py/compile: Remove comment about TODO for short circuiting for if-stmt.
6 years ago
Damien George ed9c93f0f1 py/parse: Make mp_parse_node_new_leaf an inline function.
6 years ago
Damien George b0cbfb0492 py/parse: Move function to check for const parse node to parse.[ch].
6 years ago
Damien George deaa57acf3 py/compile: Remove debugging code for compiler dispatch.
6 years ago
Damien George e49153fb98 py/compile: Remove unreachable code.
6 years ago
Damien George 216a711cd4 py/compile: Fix typo when checking for parse-node kind.
6 years ago
Damien George 0d10517a45 py/scope: Factor common code to find locals and close over them.
6 years ago
Damien George 3dea8c9e92 py/scope: Use lookup-table to determine a scope's simple name.
6 years ago
Damien George b32c01b748 py/compile: Fix async-for/async-with to work with simpler exc on stack.
6 years ago
Damien George f040685b0c py: Only store the exception instance on Py stack in bytecode try block.
6 years ago
Damien George a5624bf381 py: Combine 3 comprehension emit functions (list/dict/set) into 1.
6 years ago
Damien George 24df30c133 py/compile: Don't compile assert statements when optimisations enabled.
7 years ago
Damien George 3ff16ff52e py: Declare constant data as properly constant.
7 years ago
Damien George eacbd7aeba py: Fix constant folding and inline-asm to work with new async grammar.
7 years ago
pohmelie 81ebba7e02 py: add async/await/async for/async with syntax
7 years ago
Damien George 2c915e1ae6 py: Implement basic with support in native emitter.
7 years ago
Damien George ce8b4e8749 py: Combine continuous block of emit steps into with_cleanup emit call.
7 years ago
Damien George 3acaa28b52 py: Don't allocate an extra parse node for power exponent.
7 years ago
Damien George ea23520403 py: Add MICROPY_DYNAMIC_COMPILER option to config compiler at runtime.
7 years ago
Damien George 8f54c08691 py/inlineasm: Add ability to specify return type of asm_thumb funcs.
7 years ago
Damien George 93b3726240 py/parse: Optimise away parse node that's just parenthesis around expr.
7 years ago
Damien George dd5353a405 py: Add MICROPY_ENABLE_COMPILER and MICROPY_PY_BUILTINS_EVAL_EXEC opts.
7 years ago
Damien George a83124361e py/compile: Simplify compilation of comprehension iterators.
7 years ago
Damien George 831137b807 py/compile: Use size_t or uintptr_t instead of mp_uint_t.
7 years ago
Damien George 29e9db0c58 py: Fix compiler to handle lambdas used as default arguments.
7 years ago
Damien George 33ac0fd09f py: Don't try to optimise for+range when args are not simple expressions.
7 years ago
Damien George b8cfb0d7b2 py: Add support for 64-bit NaN-boxing object model, on 32-bit machine.
7 years ago
Damien George c3f64d9799 py: Change qstr_* functions to use size_t as the type for str len arg.
7 years ago
Damien George 9a56912ad1 py/compile: Do proper checking of * and ** in function definition.
7 years ago
Damien George d4dba88236 py/compile: Add mp_compile_to_raw_code() to return raw code object.
7 years ago
Damien George 2c83894257 py: Implement default and star args for lambdas.
7 years ago
Damien George cbd9ae5256 py/compile: Don't unnecessarily save state when compiling param list.
7 years ago
Damien George 3a3db4dcf0 py: Put all bytecode state (arg count, etc) in bytecode.
7 years ago
Damien George d7e3b36a09 py/compile: Remove unnecessary label in compilation of for statement.
7 years ago
Damien George 64f2b213bb py: Move constant folding from compiler to parser.
7 years ago
Damien George b948de36fb py: Don't generate unnecessary parse nodes for assignment or kwargs.
7 years ago
Damien George 7e12a601b8 py/compile: Fix edge case when constant-folding negation of integer.
7 years ago
Damien George 0496de26d3 py: Allow to enable inline assembler without native emitter.
7 years ago
Damien George 58e0f4ac50 py: Allocate parse nodes in chunks to reduce fragmentation and RAM use.
7 years ago
Damien George e5635f4ab3 py: Catch all cases of integer (big and small) division by zero.
7 years ago
Damien George 9d5e5c08ab py/compile: Put compiler state on the C stack.
7 years ago
Damien George fbcaf0ea18 py: Slightly simplify compile and emit of star/double-star arguments.
7 years ago
Delio Brignoli e6978a4e26 py: Fix call args when a stararg is followed by keyword args.
7 years ago
Damien George 558a016e2c py/compile: Refine SyntaxError for repeated use of global/nonlocal.
8 years ago
Damien George ea5b59bfe6 py/compile: Only compile function annotations if really needed.
8 years ago
Damien George 7f70b60f4d py: Remove unused compile scope flags, and irrelevant flag compute code.
8 years ago
Damien George 65dc960e3b unix-cpy: Remove unix-cpy. It's no longer needed.
8 years ago
Damien George cfc4c33801 py/compile: Give more precise line number for compile errors.
8 years ago
Damien George 84d59c2873 py: For viper compile errors, add traceback with function and filename.
8 years ago
Damien George 59fba2d6ea py: Remove mp_load_const_bytes and instead load precreated bytes object.
8 years ago
Damien George c8b60f013b py: Make viper codegen raise proper exception (ViperTypeError) on error.
8 years ago
Damien George 55fe92bb8f py: Remove old debugging printf's in compile.c.
8 years ago
Damien George 91bc32dc16 py: Provide typedefs for function types instead of writing them inline.
8 years ago
Damien George 4dea922610 py: Adjust some spaces in code style/format, purely for consistency.
8 years ago
Damien George 4112590a60 py, compiler: When just bytecode, make explicit calls instead of table.
8 years ago
Damien George a210c774f9 py, compiler: Remove emit_pass1 code, using emit_bc to do its job.
8 years ago
Damien George 542bd6b4a1 py, compiler: Refactor load/store/delete_id logic to reduce code size.
8 years ago
Damien George 44f65c0e2f py: Fix bug in compiler which allowed through illegal augmented assign.
8 years ago
Damien George aedf583af2 py: Simplify some logic in compiler; add comments about CPython compat.
8 years ago
Damien George 1ef26b35c1 py, extmod: Remove include of unnecessary system headers.
8 years ago
Damien George 42e0c59308 py: Add MICROPY_COMP_{DOUBLE,TRIPLE}_TUPLE_ASSIGN config options.
8 years ago
Damien George a77ffe66b2 py: In compiler, put macro guard around potentially unused asm vars.
8 years ago
Damien George 3665d0b2ff py: Simplify some inline-assembler error messages, but retain meaning.
8 years ago
Damien George 9c5cabb502 py: Give error for duplicate label in inline assembler.
8 years ago
Damien George 62a3a287d9 py: Set compiler scope before folding constants so error messages work.
8 years ago
Damien George 7711afbb4a py: Combine complie functions for or_test/and_test to reduce code size.
8 years ago
Damien George 63f3832e81 py: Combine emit functions for jump true/false to reduce code size.
8 years ago
Damien George 0b2fd91890 py: Combine logic for compiling and/or tests, to reduce code size.
8 years ago
Damien George 0bb971370b py: Transform assert logic in compiler to save code space.
8 years ago
Damien George 3d7bf5d4b1 py: More robust checking in inline assembler compiler.
8 years ago
Damien George dfe944c3e5 py: Expose compile.c:list_get as mp_parse_node_extract_list.
8 years ago
Damien George 8dfbd2d589 py: Make inline assembler raise proper SyntaxError exception on error.
8 years ago
Damien George 7d414a1b52 py: Parse big-int/float/imag constants directly in parser.
8 years ago
Damien George 0bfc7638ba py: Protect mp_parse and mp_compile with nlr push/pop block.
8 years ago
Damien George 0d3cb6726d py: Change vstr so that it doesn't null terminate buffer by default.
8 years ago
Damien George 05005f679e py: Remove mp_obj_str_builder and use vstr instead.
8 years ago
Damien George ff8dd3f486 py, unix: Allow to compile with -Wunused-parameter.
8 years ago
Damien George 50912e7f5d py, unix, stmhal: Allow to compile with -Wshadow.
8 years ago
Damien George 963a5a3e82 py, unix: Allow to compile with -Wsign-compare.
8 years ago
Damien George 0abb5609b0 py: Remove unnecessary id_flags argument from emitter's load_fast.
8 years ago
Damien George d2d64f00fb py: Add "default" to switches to allow better code flow analysis.
8 years ago
Damien George 65ef6b768c py: Only allocate strings/bytes once for load_const_obj.
8 years ago
Damien George 1e1779eacf py: Reluctantly add an extra pass to bytecode compiler.
8 years ago
Damien George c935d69f74 py: Make compiler not crash when default except is not last.
8 years ago
Damien George 4c81ba8015 py: Never intern data of large string/bytes object; add relevant tests.
8 years ago
Damien George ddd1e18801 py: Add config option MICROPY_COMP_MODULE_CONST for module consts.
8 years ago
Damien George 51dfcb4bb7 py: Move to guarded includes, everywhere in py/ core.
8 years ago
Damien George 83204f3406 py: Allow to properly disable builtin slice operation.
8 years ago
Damien George e37dcaafb4 py: Allow to properly disable builtin "set" object.
8 years ago
Damien George 01039b5bd8 py: Remove last uses of printf from compile; use proper SyntaxError.
8 years ago
Damien George 584ba6762f py: Move global/nonlocal decl code to compiler for proper SyntaxError.
8 years ago
Damien George 6efa66f125 py: Remove unnecessary RULE_none and PN_none from parser.
8 years ago