From 58321dd9854d71a96e5db2d361e0efc05d9de8cf Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 29 Aug 2017 13:04:01 +1000 Subject: all: Convert mp_uint_t to mp_unary_op_t/mp_binary_op_t where appropriate The unary-op/binary-op enums are already defined, and there are no arithmetic tricks used with these types, so it makes sense to use the correct enum type for arguments that take these values. It also reduces code size quite a bit for nan-boxing builds. --- py/objfloat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'py/objfloat.c') diff --git a/py/objfloat.c b/py/objfloat.c index 15edd810f..b1900b236 100644 --- a/py/objfloat.c +++ b/py/objfloat.c @@ -155,7 +155,7 @@ STATIC mp_obj_t float_make_new(const mp_obj_type_t *type_in, size_t n_args, size } } -STATIC mp_obj_t float_unary_op(mp_uint_t op, mp_obj_t o_in) { +STATIC mp_obj_t float_unary_op(mp_unary_op_t op, mp_obj_t o_in) { mp_float_t val = mp_obj_float_get(o_in); switch (op) { case MP_UNARY_OP_BOOL: return mp_obj_new_bool(val != 0); @@ -166,7 +166,7 @@ STATIC mp_obj_t float_unary_op(mp_uint_t op, mp_obj_t o_in) { } } -STATIC mp_obj_t float_binary_op(mp_uint_t op, mp_obj_t lhs_in, mp_obj_t rhs_in) { +STATIC mp_obj_t float_binary_op(mp_binary_op_t op, mp_obj_t lhs_in, mp_obj_t rhs_in) { mp_float_t lhs_val = mp_obj_float_get(lhs_in); #if MICROPY_PY_BUILTINS_COMPLEX if (MP_OBJ_IS_TYPE(rhs_in, &mp_type_complex)) { @@ -239,7 +239,7 @@ STATIC void mp_obj_float_divmod(mp_float_t *x, mp_float_t *y) { *y = mod; } -mp_obj_t mp_obj_float_binary_op(mp_uint_t op, mp_float_t lhs_val, mp_obj_t rhs_in) { +mp_obj_t mp_obj_float_binary_op(mp_binary_op_t op, mp_float_t lhs_val, mp_obj_t rhs_in) { mp_float_t rhs_val = mp_obj_get_float(rhs_in); // can be any type, this function will convert to float (if possible) switch (op) { case MP_BINARY_OP_ADD: -- cgit v1.2.3 From 9950865c39044e9fef295d0676af7c5fd55289ea Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 2 Sep 2017 21:19:01 +0300 Subject: py/objfloat: Fix binary ops with incompatible objects. These are now returned as "operation not supported" instead of raising TypeError. In particular, this fixes equality for float vs incompatible types, which now properly results in False instead of exception. This also paves the road to support reverse operation (e.g. __radd__) with float objects. This is achieved by introducing mp_obj_get_float_maybe(), similar to existing mp_obj_get_int_maybe(). --- py/obj.c | 27 +++++++++++++++++++++------ py/obj.h | 1 + py/objfloat.c | 6 +++++- tests/float/float_compare.py | 22 ++++++++++++++++++++++ 4 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 tests/float/float_compare.py (limited to 'py/objfloat.c') diff --git a/py/obj.c b/py/obj.c index 0dab5f2ac..90ce47e8f 100644 --- a/py/obj.c +++ b/py/obj.c @@ -264,20 +264,33 @@ bool mp_obj_get_int_maybe(mp_const_obj_t arg, mp_int_t *value) { } #if MICROPY_PY_BUILTINS_FLOAT -mp_float_t mp_obj_get_float(mp_obj_t arg) { +bool mp_obj_get_float_maybe(mp_obj_t arg, mp_float_t *value) { + mp_float_t val; + if (arg == mp_const_false) { - return 0; + val = 0; } else if (arg == mp_const_true) { - return 1; + val = 1; } else if (MP_OBJ_IS_SMALL_INT(arg)) { - return MP_OBJ_SMALL_INT_VALUE(arg); + val = MP_OBJ_SMALL_INT_VALUE(arg); #if MICROPY_LONGINT_IMPL != MICROPY_LONGINT_IMPL_NONE } else if (MP_OBJ_IS_TYPE(arg, &mp_type_int)) { - return mp_obj_int_as_float_impl(arg); + val = mp_obj_int_as_float_impl(arg); #endif } else if (mp_obj_is_float(arg)) { - return mp_obj_float_get(arg); + val = mp_obj_float_get(arg); } else { + return false; + } + + *value = val; + return true; +} + +mp_float_t mp_obj_get_float(mp_obj_t arg) { + mp_float_t val; + + if (!mp_obj_get_float_maybe(arg, &val)) { if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) { mp_raise_TypeError("can't convert to float"); } else { @@ -285,6 +298,8 @@ mp_float_t mp_obj_get_float(mp_obj_t arg) { "can't convert %s to float", mp_obj_get_type_str(arg))); } } + + return val; } #if MICROPY_PY_BUILTINS_COMPLEX diff --git a/py/obj.h b/py/obj.h index 323423b3e..70cdd15fa 100644 --- a/py/obj.h +++ b/py/obj.h @@ -686,6 +686,7 @@ mp_int_t mp_obj_get_int_truncated(mp_const_obj_t arg); bool mp_obj_get_int_maybe(mp_const_obj_t arg, mp_int_t *value); #if MICROPY_PY_BUILTINS_FLOAT mp_float_t mp_obj_get_float(mp_obj_t self_in); +bool mp_obj_get_float_maybe(mp_obj_t arg, mp_float_t *value); void mp_obj_get_complex(mp_obj_t self_in, mp_float_t *real, mp_float_t *imag); #endif //qstr mp_obj_get_qstr(mp_obj_t arg); diff --git a/py/objfloat.c b/py/objfloat.c index b1900b236..fadbbcb79 100644 --- a/py/objfloat.c +++ b/py/objfloat.c @@ -240,7 +240,11 @@ STATIC void mp_obj_float_divmod(mp_float_t *x, mp_float_t *y) { } mp_obj_t mp_obj_float_binary_op(mp_binary_op_t op, mp_float_t lhs_val, mp_obj_t rhs_in) { - mp_float_t rhs_val = mp_obj_get_float(rhs_in); // can be any type, this function will convert to float (if possible) + mp_float_t rhs_val; + if (!mp_obj_get_float_maybe(rhs_in, &rhs_val)) { + return MP_OBJ_NULL; // op not supported + } + switch (op) { case MP_BINARY_OP_ADD: case MP_BINARY_OP_INPLACE_ADD: lhs_val += rhs_val; break; diff --git a/tests/float/float_compare.py b/tests/float/float_compare.py new file mode 100644 index 000000000..105923ac7 --- /dev/null +++ b/tests/float/float_compare.py @@ -0,0 +1,22 @@ +# Extended float comparisons + +class Foo: + pass + +foo = Foo() + +print(foo == 1.0) +print(1.0 == foo) +print(1.0 == Foo) +print(1.0 == []) +print(1.0 == {}) + +try: + print(foo < 1.0) +except TypeError: + print("TypeError") + +try: + print(1.0 < foo) +except TypeError: + print("TypeError") -- cgit v1.2.3 From 9dce823cfd0a9991350184f08a1373f3887134f4 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 18 Sep 2017 00:06:43 +0300 Subject: py/modbuiltins: Implement abs() by dispatching to MP_UNARY_OP_ABS. This allows user classes to implement __abs__ special method, and saves code size (104 bytes for x86_64), even though during refactor, an issue was fixed and few optimizations were made: * abs() of minimum (negative) small int value is calculated properly. * objint_longlong and objint_mpz avoid allocating new object is the argument is already non-negative. --- py/modbuiltins.c | 21 +-------------------- py/objcomplex.c | 5 +++++ py/objfloat.c | 9 +++++++++ py/objint.c | 10 ---------- py/objint.h | 1 - py/objint_longlong.c | 34 ++++++++++------------------------ py/objint_mpz.c | 30 +++++++++--------------------- py/runtime.c | 9 +++++++++ py/runtime0.h | 1 + tests/unix/extra_coverage.py.exp | 2 +- 10 files changed, 45 insertions(+), 77 deletions(-) (limited to 'py/objfloat.c') diff --git a/py/modbuiltins.c b/py/modbuiltins.c index 1c76b8073..0486251b6 100644 --- a/py/modbuiltins.c +++ b/py/modbuiltins.c @@ -91,26 +91,7 @@ STATIC mp_obj_t mp_builtin___build_class__(size_t n_args, const mp_obj_t *args) MP_DEFINE_CONST_FUN_OBJ_VAR(mp_builtin___build_class___obj, 2, mp_builtin___build_class__); STATIC mp_obj_t mp_builtin_abs(mp_obj_t o_in) { - #if MICROPY_PY_BUILTINS_FLOAT - if (mp_obj_is_float(o_in)) { - mp_float_t value = mp_obj_float_get(o_in); - // TODO check for NaN etc - if (value < 0) { - return mp_obj_new_float(-value); - } else { - return o_in; - } - #if MICROPY_PY_BUILTINS_COMPLEX - } else if (MP_OBJ_IS_TYPE(o_in, &mp_type_complex)) { - mp_float_t real, imag; - mp_obj_complex_get(o_in, &real, &imag); - return mp_obj_new_float(MICROPY_FLOAT_C_FUN(sqrt)(real*real + imag*imag)); - #endif - } - #endif - - // this will raise a TypeError if the argument is not integral - return mp_obj_int_abs(o_in); + return mp_unary_op(MP_UNARY_OP_ABS, o_in); } MP_DEFINE_CONST_FUN_OBJ_1(mp_builtin_abs_obj, mp_builtin_abs); diff --git a/py/objcomplex.c b/py/objcomplex.c index 07b9d5d41..e7a3c244a 100644 --- a/py/objcomplex.c +++ b/py/objcomplex.c @@ -124,6 +124,11 @@ STATIC mp_obj_t complex_unary_op(mp_unary_op_t op, mp_obj_t o_in) { case MP_UNARY_OP_HASH: return MP_OBJ_NEW_SMALL_INT(mp_float_hash(o->real) ^ mp_float_hash(o->imag)); case MP_UNARY_OP_POSITIVE: return o_in; case MP_UNARY_OP_NEGATIVE: return mp_obj_new_complex(-o->real, -o->imag); + case MP_UNARY_OP_ABS: { + mp_float_t real, imag; + mp_obj_complex_get(o_in, &real, &imag); + return mp_obj_new_float(MICROPY_FLOAT_C_FUN(sqrt)(real*real + imag*imag)); + } default: return MP_OBJ_NULL; // op not supported } } diff --git a/py/objfloat.c b/py/objfloat.c index fadbbcb79..fefd78314 100644 --- a/py/objfloat.c +++ b/py/objfloat.c @@ -162,6 +162,15 @@ STATIC mp_obj_t float_unary_op(mp_unary_op_t op, mp_obj_t o_in) { case MP_UNARY_OP_HASH: return MP_OBJ_NEW_SMALL_INT(mp_float_hash(val)); case MP_UNARY_OP_POSITIVE: return o_in; case MP_UNARY_OP_NEGATIVE: return mp_obj_new_float(-val); + case MP_UNARY_OP_ABS: { + mp_float_t value = mp_obj_float_get(o_in); + // TODO check for NaN etc + if (value < 0) { + return mp_obj_new_float(-value); + } else { + return o_in; + } + } default: return MP_OBJ_NULL; // op not supported } } diff --git a/py/objint.c b/py/objint.c index 6a73b4382..000a0404c 100644 --- a/py/objint.c +++ b/py/objint.c @@ -314,16 +314,6 @@ int mp_obj_int_sign(mp_obj_t self_in) { } } -// This must handle int and bool types, and must raise a -// TypeError if the argument is not integral -mp_obj_t mp_obj_int_abs(mp_obj_t self_in) { - mp_int_t val = mp_obj_get_int(self_in); - if (val < 0) { - val = -val; - } - return MP_OBJ_NEW_SMALL_INT(val); -} - // This is called for operations on SMALL_INT that are not handled by mp_unary_op mp_obj_t mp_obj_int_unary_op(mp_unary_op_t op, mp_obj_t o_in) { return MP_OBJ_NULL; // op not supported diff --git a/py/objint.h b/py/objint.h index a4d4ff32d..4b95acde9 100644 --- a/py/objint.h +++ b/py/objint.h @@ -57,7 +57,6 @@ mp_int_t mp_obj_int_hash(mp_obj_t self_in); mp_obj_t mp_obj_int_from_bytes_impl(bool big_endian, size_t len, const byte *buf); void mp_obj_int_to_bytes_impl(mp_obj_t self_in, bool big_endian, size_t len, byte *buf); int mp_obj_int_sign(mp_obj_t self_in); -mp_obj_t mp_obj_int_abs(mp_obj_t self_in); mp_obj_t mp_obj_int_unary_op(mp_unary_op_t op, mp_obj_t o_in); mp_obj_t mp_obj_int_binary_op(mp_binary_op_t op, mp_obj_t lhs_in, mp_obj_t rhs_in); mp_obj_t mp_obj_int_binary_op_extra_cases(mp_binary_op_t op, mp_obj_t lhs_in, mp_obj_t rhs_in); diff --git a/py/objint_longlong.c b/py/objint_longlong.c index ddfdae744..8d8ca1b2c 100644 --- a/py/objint_longlong.c +++ b/py/objint_longlong.c @@ -94,30 +94,6 @@ int mp_obj_int_sign(mp_obj_t self_in) { } } -// This must handle int and bool types, and must raise a -// TypeError if the argument is not integral -mp_obj_t mp_obj_int_abs(mp_obj_t self_in) { - if (MP_OBJ_IS_TYPE(self_in, &mp_type_int)) { - mp_obj_int_t *self = self_in; - self = mp_obj_new_int_from_ll(self->val); - if (self->val < 0) { - // TODO could overflow long long - self->val = -self->val; - } - return self; - } else { - mp_int_t val = mp_obj_get_int(self_in); - if (val == MP_SMALL_INT_MIN) { - return mp_obj_new_int_from_ll(-val); - } else { - if (val < 0) { - val = -val; - } - return MP_OBJ_NEW_SMALL_INT(val); - } - } -} - mp_obj_t mp_obj_int_unary_op(mp_unary_op_t op, mp_obj_t o_in) { mp_obj_int_t *o = o_in; switch (op) { @@ -130,6 +106,16 @@ mp_obj_t mp_obj_int_unary_op(mp_unary_op_t op, mp_obj_t o_in) { case MP_UNARY_OP_POSITIVE: return o_in; case MP_UNARY_OP_NEGATIVE: return mp_obj_new_int_from_ll(-o->val); case MP_UNARY_OP_INVERT: return mp_obj_new_int_from_ll(~o->val); + case MP_UNARY_OP_ABS: { + mp_obj_int_t *self = MP_OBJ_TO_PTR(o_in); + if (self->val >= 0) { + return o_in; + } + self = mp_obj_new_int_from_ll(self->val); + // TODO could overflow long long + self->val = -self->val; + return MP_OBJ_FROM_PTR(self); + } default: return MP_OBJ_NULL; // op not supported } } diff --git a/py/objint_mpz.c b/py/objint_mpz.c index 0e318b492..15aad1d4d 100644 --- a/py/objint_mpz.c +++ b/py/objint_mpz.c @@ -141,27 +141,6 @@ int mp_obj_int_sign(mp_obj_t self_in) { } } -// This must handle int and bool types, and must raise a -// TypeError if the argument is not integral -mp_obj_t mp_obj_int_abs(mp_obj_t self_in) { - if (MP_OBJ_IS_TYPE(self_in, &mp_type_int)) { - mp_obj_int_t *self = MP_OBJ_TO_PTR(self_in); - mp_obj_int_t *self2 = mp_obj_int_new_mpz(); - mpz_abs_inpl(&self2->mpz, &self->mpz); - return MP_OBJ_FROM_PTR(self2); - } else { - mp_int_t val = mp_obj_get_int(self_in); - if (val == MP_SMALL_INT_MIN) { - return mp_obj_new_int_from_ll(-val); - } else { - if (val < 0) { - val = -val; - } - return MP_OBJ_NEW_SMALL_INT(val); - } - } -} - mp_obj_t mp_obj_int_unary_op(mp_unary_op_t op, mp_obj_t o_in) { mp_obj_int_t *o = MP_OBJ_TO_PTR(o_in); switch (op) { @@ -170,6 +149,15 @@ mp_obj_t mp_obj_int_unary_op(mp_unary_op_t op, mp_obj_t o_in) { case MP_UNARY_OP_POSITIVE: return o_in; case MP_UNARY_OP_NEGATIVE: { mp_obj_int_t *o2 = mp_obj_int_new_mpz(); mpz_neg_inpl(&o2->mpz, &o->mpz); return MP_OBJ_FROM_PTR(o2); } case MP_UNARY_OP_INVERT: { mp_obj_int_t *o2 = mp_obj_int_new_mpz(); mpz_not_inpl(&o2->mpz, &o->mpz); return MP_OBJ_FROM_PTR(o2); } + case MP_UNARY_OP_ABS: { + mp_obj_int_t *self = MP_OBJ_TO_PTR(o_in); + if (self->mpz.neg == 0) { + return o_in; + } + mp_obj_int_t *self2 = mp_obj_int_new_mpz(); + mpz_abs_inpl(&self2->mpz, &self->mpz); + return MP_OBJ_FROM_PTR(self2); + } default: return MP_OBJ_NULL; // op not supported } } diff --git a/py/runtime.c b/py/runtime.c index c533558da..f21eed204 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -231,6 +231,15 @@ mp_obj_t mp_unary_op(mp_unary_op_t op, mp_obj_t arg) { } else { return MP_OBJ_NEW_SMALL_INT(-val); } + case MP_UNARY_OP_ABS: + if (val >= 0) { + return arg; + } else if (val == MP_SMALL_INT_MIN) { + // check for overflow + return mp_obj_new_int(-val); + } else { + return MP_OBJ_NEW_SMALL_INT(-val); + } default: assert(op == MP_UNARY_OP_INVERT); return MP_OBJ_NEW_SMALL_INT(~val); diff --git a/py/runtime0.h b/py/runtime0.h index a3e9d46b9..54bf192d3 100644 --- a/py/runtime0.h +++ b/py/runtime0.h @@ -50,6 +50,7 @@ typedef enum { MP_UNARY_OP_NEGATIVE, MP_UNARY_OP_INVERT, MP_UNARY_OP_NOT, + MP_UNARY_OP_ABS, // __abs__ MP_UNARY_OP_SIZEOF, // for sys.getsizeof() } mp_unary_op_t; diff --git a/tests/unix/extra_coverage.py.exp b/tests/unix/extra_coverage.py.exp index ab638a632..4dc421dab 100644 --- a/tests/unix/extra_coverage.py.exp +++ b/tests/unix/extra_coverage.py.exp @@ -38,7 +38,7 @@ ementation 0 0 # runtime utils -TypeError: can't convert str to int +TypeError: unsupported type for : 'str' TypeError: unsupported types for : 'str', 'str' Warning: test # format float -- cgit v1.2.3 From fdb2aa81b7c7588d94ec59932781e14759045df0 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 18 Sep 2017 14:31:03 +1000 Subject: py/{objfloat,objcomplex}: Optimise MP_UNARY_OP_ABS by reusing variables. --- py/objcomplex.c | 7 ++----- py/objfloat.c | 5 ++--- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'py/objfloat.c') diff --git a/py/objcomplex.c b/py/objcomplex.c index e7a3c244a..088ad5211 100644 --- a/py/objcomplex.c +++ b/py/objcomplex.c @@ -124,11 +124,8 @@ STATIC mp_obj_t complex_unary_op(mp_unary_op_t op, mp_obj_t o_in) { case MP_UNARY_OP_HASH: return MP_OBJ_NEW_SMALL_INT(mp_float_hash(o->real) ^ mp_float_hash(o->imag)); case MP_UNARY_OP_POSITIVE: return o_in; case MP_UNARY_OP_NEGATIVE: return mp_obj_new_complex(-o->real, -o->imag); - case MP_UNARY_OP_ABS: { - mp_float_t real, imag; - mp_obj_complex_get(o_in, &real, &imag); - return mp_obj_new_float(MICROPY_FLOAT_C_FUN(sqrt)(real*real + imag*imag)); - } + case MP_UNARY_OP_ABS: + return mp_obj_new_float(MICROPY_FLOAT_C_FUN(sqrt)(o->real*o->real + o->imag*o->imag)); default: return MP_OBJ_NULL; // op not supported } } diff --git a/py/objfloat.c b/py/objfloat.c index fefd78314..55a9379ff 100644 --- a/py/objfloat.c +++ b/py/objfloat.c @@ -163,10 +163,9 @@ STATIC mp_obj_t float_unary_op(mp_unary_op_t op, mp_obj_t o_in) { case MP_UNARY_OP_POSITIVE: return o_in; case MP_UNARY_OP_NEGATIVE: return mp_obj_new_float(-val); case MP_UNARY_OP_ABS: { - mp_float_t value = mp_obj_float_get(o_in); // TODO check for NaN etc - if (value < 0) { - return mp_obj_new_float(-value); + if (val < 0) { + return mp_obj_new_float(-val); } else { return o_in; } -- cgit v1.2.3 From bdc6e86e079dd8a82e9ead1d4041c2e17c882437 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 26 Sep 2017 12:57:51 +1000 Subject: py/objfloat: Support raising a negative number to a fractional power. This returns a complex number, following CPython behaviour. For ports that don't have complex numbers enabled this will raise a ValueError which gives a fail-safe for scripts that were written assuming complex numbers exist. --- py/objfloat.c | 7 +++++++ tests/float/complex1.py | 4 ++++ 2 files changed, 11 insertions(+) (limited to 'py/objfloat.c') diff --git a/py/objfloat.c b/py/objfloat.c index 55a9379ff..0831be3fd 100644 --- a/py/objfloat.c +++ b/py/objfloat.c @@ -298,6 +298,13 @@ mp_obj_t mp_obj_float_binary_op(mp_binary_op_t op, mp_float_t lhs_val, mp_obj_t if (lhs_val == 0 && rhs_val < 0) { goto zero_division_error; } + if (lhs_val < 0 && rhs_val != MICROPY_FLOAT_C_FUN(floor)(rhs_val)) { + #if MICROPY_PY_BUILTINS_COMPLEX + return mp_obj_complex_binary_op(MP_BINARY_OP_POWER, lhs_val, 0, rhs_in); + #else + mp_raise_ValueError("complex values not supported"); + #endif + } lhs_val = MICROPY_FLOAT_C_FUN(pow)(lhs_val, rhs_val); break; case MP_BINARY_OP_DIVMOD: { diff --git a/tests/float/complex1.py b/tests/float/complex1.py index 7f0b317b3..854410545 100644 --- a/tests/float/complex1.py +++ b/tests/float/complex1.py @@ -53,6 +53,10 @@ print(type(hash(1j))) # float on lhs should delegate to complex print(1.2 + 3j) +# negative base and fractional power should create a complex +ans = (-1) ** 2.3; print("%.5g %.5g" % (ans.real, ans.imag)) +ans = (-1.2) ** -3.4; print("%.5g %.5g" % (ans.real, ans.imag)) + # check printing of inf/nan print(float('nan') * 1j) print(float('inf') * (1 + 1j)) -- cgit v1.2.3 From a3dc1b1957d2c96d7c60c2c629c95077b03488a1 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 4 Oct 2017 12:37:50 +1100 Subject: all: Remove inclusion of internal py header files. Header files that are considered internal to the py core and should not normally be included directly are: py/nlr.h - internal nlr configuration and declarations py/bc0.h - contains bytecode macro definitions py/runtime0.h - contains basic runtime enums Instead, the top-level header files to include are one of: py/obj.h - includes runtime0.h and defines everything to use the mp_obj_t type py/runtime.h - includes mpstate.h and hence nlr.h, obj.h, runtime0.h, and defines everything to use the general runtime support functions Additional, specific headers (eg py/objlist.h) can be included if needed. --- drivers/cc3000/src/ccspi.c | 2 -- extmod/machine_mem.c | 2 +- extmod/modbtree.c | 2 -- extmod/modframebuf.c | 2 -- extmod/modlwip.c | 1 - extmod/modubinascii.c | 1 - extmod/moductypes.c | 1 - extmod/moduhashlib.c | 1 - extmod/moduheapq.c | 2 -- extmod/modujson.c | 1 - extmod/modurandom.c | 1 - extmod/modure.c | 1 - extmod/modussl_axtls.c | 1 - extmod/modussl_mbedtls.c | 2 -- extmod/modutimeq.c | 2 -- extmod/moduzlib.c | 1 - extmod/modwebrepl.c | 2 -- extmod/modwebsocket.c | 2 -- extmod/uos_dupterm.c | 1 - extmod/vfs.c | 1 - extmod/vfs_fat.c | 1 - extmod/vfs_fat_file.c | 1 - extmod/vfs_fat_misc.c | 1 - lib/netutils/netutils.c | 2 -- lib/utils/pyexec.c | 1 - mpy-cross/main.c | 1 - ports/bare-arm/main.c | 1 - ports/cc3200/ftp/ftp.c | 3 +-- ports/cc3200/hal/cc3200_hal.c | 1 - ports/cc3200/misc/mpexception.c | 1 - ports/cc3200/mods/modmachine.c | 1 - ports/cc3200/mods/modnetwork.c | 3 --- ports/cc3200/mods/modubinascii.c | 2 -- ports/cc3200/mods/moduhashlib.c | 1 - ports/cc3200/mods/moduos.c | 2 -- ports/cc3200/mods/pybadc.c | 2 -- ports/cc3200/mods/pybi2c.c | 1 - ports/cc3200/mods/pybpin.c | 3 --- ports/cc3200/mods/pybsleep.c | 1 - ports/cc3200/mods/pybspi.c | 1 - ports/cc3200/mods/pybtimer.c | 3 --- ports/cc3200/mods/pybuart.c | 3 --- ports/cc3200/mpthreadport.c | 2 -- ports/cc3200/util/gccollect.c | 2 -- ports/esp8266/esp_mphal.c | 2 -- ports/esp8266/machine_adc.c | 2 -- ports/esp8266/machine_pin.c | 1 - ports/esp8266/machine_pwm.c | 1 - ports/esp8266/machine_rtc.c | 2 -- ports/esp8266/machine_wdt.c | 2 -- ports/esp8266/main.c | 2 -- ports/esp8266/modnetwork.c | 1 - ports/esp8266/modutime.c | 2 -- ports/minimal/main.c | 1 - ports/qemu-arm/main.c | 2 -- ports/qemu-arm/test_main.c | 2 -- ports/stm32/accel.c | 1 - ports/stm32/adc.c | 1 - ports/stm32/can.c | 1 - ports/stm32/gccollect.c | 1 - ports/stm32/i2c.c | 1 - ports/stm32/irq.c | 1 - ports/stm32/lcd.c | 1 - ports/stm32/led.c | 1 - ports/stm32/modmachine.h | 2 -- ports/stm32/modnetwork.c | 1 - ports/stm32/modnwcc3k.c | 1 - ports/stm32/modnwwiznet5k.c | 1 - ports/stm32/modpyb.c | 2 -- ports/stm32/moduos.c | 1 - ports/stm32/modusocket.c | 1 - ports/stm32/mphalport.c | 1 - ports/stm32/mpthreadport.c | 2 -- ports/stm32/pendsv.c | 1 - ports/stm32/pin.c | 1 - ports/stm32/sdcard.c | 1 - ports/stm32/spi.c | 1 - ports/stm32/stm32_it.c | 1 - ports/stm32/uart.c | 1 - ports/teensy/led.c | 1 - ports/teensy/teensy_hal.c | 1 - ports/teensy/timer.c | 1 - ports/teensy/uart.c | 1 - ports/unix/file.c | 1 - ports/unix/main.c | 2 -- ports/unix/modffi.c | 1 - ports/unix/modjni.c | 2 -- ports/unix/modos.c | 1 - ports/unix/modsocket.c | 1 - ports/unix/mpthreadport.c | 1 - ports/unix/unix_mphal.c | 1 - ports/zephyr/machine_pin.c | 1 - ports/zephyr/main.c | 1 - py/argcheck.c | 1 - py/bc.c | 4 +--- py/bc.h | 1 - py/builtinevex.c | 1 - py/builtinimport.c | 1 - py/emit.h | 1 - py/emitnative.c | 1 - py/gc.c | 2 -- py/lexer.c | 1 - py/map.c | 1 - py/modbuiltins.c | 2 -- py/modmicropython.c | 1 - py/modsys.c | 3 --- py/nativeglue.c | 2 -- py/nlrthumb.c | 1 - py/nlrx64.c | 1 - py/nlrx86.c | 2 -- py/nlrxtensa.c | 1 - py/obj.c | 2 -- py/objarray.c | 2 -- py/objbool.c | 2 -- py/objcomplex.c | 3 --- py/objdict.c | 3 --- py/objexcept.c | 1 - py/objfloat.c | 2 -- py/objfun.c | 2 -- py/objgenerator.c | 2 -- py/objgetitemiter.c | 1 - py/objint.c | 2 -- py/objint_longlong.c | 2 -- py/objint_mpz.c | 2 -- py/objlist.c | 2 -- py/objmodule.c | 2 -- py/objnamedtuple.c | 1 - py/objnone.c | 2 -- py/objpolyiter.c | 1 - py/objproperty.c | 1 - py/objrange.c | 2 -- py/objreversed.c | 1 - py/objset.c | 2 -- py/objsingleton.c | 2 -- py/objslice.c | 2 -- py/objstr.c | 2 -- py/objstringio.c | 1 - py/objstrunicode.c | 2 -- py/objtuple.c | 2 -- py/objtype.c | 2 -- py/parse.c | 2 -- py/persistentcode.c | 1 - py/runtime.c | 3 --- py/runtime.h | 1 - py/runtime_utils.c | 2 -- py/sequence.c | 3 --- py/stackctrl.c | 3 --- py/stream.c | 1 - py/vm.c | 2 -- 149 files changed, 3 insertions(+), 226 deletions(-) (limited to 'py/objfloat.c') diff --git a/drivers/cc3000/src/ccspi.c b/drivers/cc3000/src/ccspi.c index 64900efe4..820be809b 100644 --- a/drivers/cc3000/src/ccspi.c +++ b/drivers/cc3000/src/ccspi.c @@ -34,8 +34,6 @@ #include -#include "py/nlr.h" -#include "py/obj.h" #include "py/runtime.h" #include "pin.h" #include "led.h" diff --git a/extmod/machine_mem.c b/extmod/machine_mem.c index af987cb7f..b9f16507c 100644 --- a/extmod/machine_mem.c +++ b/extmod/machine_mem.c @@ -24,8 +24,8 @@ * THE SOFTWARE. */ +#include "py/runtime.h" #include "extmod/machine_mem.h" -#include "py/nlr.h" #if MICROPY_PY_MACHINE diff --git a/extmod/modbtree.c b/extmod/modbtree.c index 5017079da..5c1311532 100644 --- a/extmod/modbtree.c +++ b/extmod/modbtree.c @@ -29,9 +29,7 @@ #include // for declaration of global errno variable #include -#include "py/nlr.h" #include "py/runtime.h" -#include "py/runtime0.h" #include "py/stream.h" #if MICROPY_PY_BTREE diff --git a/extmod/modframebuf.c b/extmod/modframebuf.c index 239302295..20e40d579 100644 --- a/extmod/modframebuf.c +++ b/extmod/modframebuf.c @@ -27,8 +27,6 @@ #include #include -#include "py/nlr.h" -#include "py/obj.h" #include "py/runtime.h" #if MICROPY_PY_FRAMEBUF diff --git a/extmod/modlwip.c b/extmod/modlwip.c index 6b8caa42b..f7e776af9 100644 --- a/extmod/modlwip.c +++ b/extmod/modlwip.c @@ -29,7 +29,6 @@ #include #include -#include "py/nlr.h" #include "py/objlist.h" #include "py/runtime.h" #include "py/stream.h" diff --git a/extmod/modubinascii.c b/extmod/modubinascii.c index f15efea0f..8256a50cf 100644 --- a/extmod/modubinascii.c +++ b/extmod/modubinascii.c @@ -28,7 +28,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" #include "py/binary.h" #include "extmod/modubinascii.h" diff --git a/extmod/moductypes.c b/extmod/moductypes.c index dc03f6de5..c3da083cf 100644 --- a/extmod/moductypes.c +++ b/extmod/moductypes.c @@ -28,7 +28,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" #include "py/objtuple.h" #include "py/binary.h" diff --git a/extmod/moduhashlib.c b/extmod/moduhashlib.c index f3beb3939..3fad69247 100644 --- a/extmod/moduhashlib.c +++ b/extmod/moduhashlib.c @@ -27,7 +27,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" #if MICROPY_PY_UHASHLIB diff --git a/extmod/moduheapq.c b/extmod/moduheapq.c index 4a620bad8..71c15368b 100644 --- a/extmod/moduheapq.c +++ b/extmod/moduheapq.c @@ -24,9 +24,7 @@ * THE SOFTWARE. */ -#include "py/nlr.h" #include "py/objlist.h" -#include "py/runtime0.h" #include "py/runtime.h" #if MICROPY_PY_UHEAPQ diff --git a/extmod/modujson.c b/extmod/modujson.c index 6c4aa1611..f14682d26 100644 --- a/extmod/modujson.c +++ b/extmod/modujson.c @@ -26,7 +26,6 @@ #include -#include "py/nlr.h" #include "py/objlist.h" #include "py/objstringio.h" #include "py/parsenum.h" diff --git a/extmod/modurandom.c b/extmod/modurandom.c index 4b63dace4..1512a3fd4 100644 --- a/extmod/modurandom.c +++ b/extmod/modurandom.c @@ -27,7 +27,6 @@ #include #include -//#include "py/nlr.h" #include "py/runtime.h" #if MICROPY_PY_URANDOM diff --git a/extmod/modure.c b/extmod/modure.c index 7e1c24325..78de4706d 100644 --- a/extmod/modure.c +++ b/extmod/modure.c @@ -28,7 +28,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" #include "py/binary.h" #include "py/objstr.h" diff --git a/extmod/modussl_axtls.c b/extmod/modussl_axtls.c index b5d2412d2..88a89a23d 100644 --- a/extmod/modussl_axtls.c +++ b/extmod/modussl_axtls.c @@ -27,7 +27,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" #include "py/stream.h" diff --git a/extmod/modussl_mbedtls.c b/extmod/modussl_mbedtls.c index a65470e16..d7316cb4a 100644 --- a/extmod/modussl_mbedtls.c +++ b/extmod/modussl_mbedtls.c @@ -31,10 +31,8 @@ #include #include // needed because mp_is_nonblocking_error uses system error codes -#include "py/nlr.h" #include "py/runtime.h" #include "py/stream.h" -#include "py/obj.h" // mbedtls_time_t #include "mbedtls/platform.h" diff --git a/extmod/modutimeq.c b/extmod/modutimeq.c index faa589583..94cbd20d2 100644 --- a/extmod/modutimeq.c +++ b/extmod/modutimeq.c @@ -27,9 +27,7 @@ #include -#include "py/nlr.h" #include "py/objlist.h" -#include "py/runtime0.h" #include "py/runtime.h" #include "py/smallint.h" diff --git a/extmod/moduzlib.c b/extmod/moduzlib.c index b446dba73..e9af07370 100644 --- a/extmod/moduzlib.c +++ b/extmod/moduzlib.c @@ -27,7 +27,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" #include "py/stream.h" #include "py/mperrno.h" diff --git a/extmod/modwebrepl.c b/extmod/modwebrepl.c index d618f5370..4ff282aac 100644 --- a/extmod/modwebrepl.c +++ b/extmod/modwebrepl.c @@ -28,8 +28,6 @@ #include #include -#include "py/nlr.h" -#include "py/obj.h" #include "py/runtime.h" #include "py/stream.h" #include "py/builtin.h" diff --git a/extmod/modwebsocket.c b/extmod/modwebsocket.c index 6c6e32c1a..a651164b2 100644 --- a/extmod/modwebsocket.c +++ b/extmod/modwebsocket.c @@ -28,8 +28,6 @@ #include #include -#include "py/nlr.h" -#include "py/obj.h" #include "py/runtime.h" #include "py/stream.h" #include "extmod/modwebsocket.h" diff --git a/extmod/uos_dupterm.c b/extmod/uos_dupterm.c index 233d145aa..1d6f02dce 100644 --- a/extmod/uos_dupterm.c +++ b/extmod/uos_dupterm.c @@ -27,7 +27,6 @@ #include #include "py/mpconfig.h" -#include "py/nlr.h" #include "py/runtime.h" #include "py/objtuple.h" #include "py/objarray.h" diff --git a/extmod/vfs.c b/extmod/vfs.c index 3bdce80db..a1cd8d5f6 100644 --- a/extmod/vfs.c +++ b/extmod/vfs.c @@ -27,7 +27,6 @@ #include #include -#include "py/runtime0.h" #include "py/runtime.h" #include "py/objstr.h" #include "py/mperrno.h" diff --git a/extmod/vfs_fat.c b/extmod/vfs_fat.c index b27054111..22346bdf1 100644 --- a/extmod/vfs_fat.c +++ b/extmod/vfs_fat.c @@ -33,7 +33,6 @@ #endif #include -#include "py/nlr.h" #include "py/runtime.h" #include "py/mperrno.h" #include "lib/oofatfs/ff.h" diff --git a/extmod/vfs_fat_file.c b/extmod/vfs_fat_file.c index 8fb48f01a..1fcbb253d 100644 --- a/extmod/vfs_fat_file.c +++ b/extmod/vfs_fat_file.c @@ -29,7 +29,6 @@ #include -#include "py/nlr.h" #include "py/runtime.h" #include "py/stream.h" #include "py/mperrno.h" diff --git a/extmod/vfs_fat_misc.c b/extmod/vfs_fat_misc.c index 7c16db7e5..9a26b4a2f 100644 --- a/extmod/vfs_fat_misc.c +++ b/extmod/vfs_fat_misc.c @@ -28,7 +28,6 @@ #if MICROPY_VFS_FAT #include -#include "py/nlr.h" #include "py/runtime.h" #include "lib/oofatfs/ff.h" #include "extmod/vfs_fat.h" diff --git a/lib/netutils/netutils.c b/lib/netutils/netutils.c index 15e70397c..06c3ff9b0 100644 --- a/lib/netutils/netutils.c +++ b/lib/netutils/netutils.c @@ -29,8 +29,6 @@ #include #include -#include "py/obj.h" -#include "py/nlr.h" #include "py/runtime.h" #include "lib/netutils/netutils.h" diff --git a/lib/utils/pyexec.c b/lib/utils/pyexec.c index d3500b42b..1e99aa649 100644 --- a/lib/utils/pyexec.c +++ b/lib/utils/pyexec.c @@ -29,7 +29,6 @@ #include #include -#include "py/nlr.h" #include "py/compile.h" #include "py/runtime.h" #include "py/repl.h" diff --git a/mpy-cross/main.c b/mpy-cross/main.c index 225bc4309..d819f74f1 100644 --- a/mpy-cross/main.c +++ b/mpy-cross/main.c @@ -29,7 +29,6 @@ #include #include -#include "py/mpstate.h" #include "py/compile.h" #include "py/persistentcode.h" #include "py/runtime.h" diff --git a/ports/bare-arm/main.c b/ports/bare-arm/main.c index 938414dfe..b96fb47ac 100644 --- a/ports/bare-arm/main.c +++ b/ports/bare-arm/main.c @@ -2,7 +2,6 @@ #include #include -#include "py/nlr.h" #include "py/compile.h" #include "py/runtime.h" #include "py/repl.h" diff --git a/ports/cc3200/ftp/ftp.c b/ports/cc3200/ftp/ftp.c index 5461f9180..ee80e51f5 100644 --- a/ports/cc3200/ftp/ftp.c +++ b/ports/cc3200/ftp/ftp.c @@ -27,8 +27,7 @@ #include #include -#include "py/mpstate.h" -#include "py/obj.h" +#include "py/runtime.h" #include "lib/timeutils/timeutils.h" #include "lib/oofatfs/ff.h" #include "extmod/vfs.h" diff --git a/ports/cc3200/hal/cc3200_hal.c b/ports/cc3200/hal/cc3200_hal.c index 9718980e7..0285d0585 100644 --- a/ports/cc3200/hal/cc3200_hal.c +++ b/ports/cc3200/hal/cc3200_hal.c @@ -33,7 +33,6 @@ #include -#include "py/mpstate.h" #include "py/mphal.h" #include "py/runtime.h" #include "py/objstr.h" diff --git a/ports/cc3200/misc/mpexception.c b/ports/cc3200/misc/mpexception.c index 2dfcbfdef..72d4a155f 100644 --- a/ports/cc3200/misc/mpexception.c +++ b/ports/cc3200/misc/mpexception.c @@ -28,7 +28,6 @@ #include #include -#include "py/mpstate.h" #include "mpexception.h" diff --git a/ports/cc3200/mods/modmachine.c b/ports/cc3200/mods/modmachine.c index fb0fe7f2c..6051497e3 100644 --- a/ports/cc3200/mods/modmachine.c +++ b/ports/cc3200/mods/modmachine.c @@ -27,7 +27,6 @@ #include -#include "py/mpstate.h" #include "py/runtime.h" #include "py/mphal.h" #include "irq.h" diff --git a/ports/cc3200/mods/modnetwork.c b/ports/cc3200/mods/modnetwork.c index 0234a0ccb..37dffe731 100644 --- a/ports/cc3200/mods/modnetwork.c +++ b/ports/cc3200/mods/modnetwork.c @@ -25,9 +25,6 @@ * THE SOFTWARE. */ -#include "py/mpstate.h" -#include "py/obj.h" -#include "py/nlr.h" #include "py/runtime.h" #include "py/mperrno.h" #include "py/mphal.h" diff --git a/ports/cc3200/mods/modubinascii.c b/ports/cc3200/mods/modubinascii.c index 7f51a8f3d..6b020ab39 100644 --- a/ports/cc3200/mods/modubinascii.c +++ b/ports/cc3200/mods/modubinascii.c @@ -25,8 +25,6 @@ * THE SOFTWARE. */ -#include "py/mpconfig.h" -#include "py/nlr.h" #include "py/runtime.h" #include "py/binary.h" #include "extmod/modubinascii.h" diff --git a/ports/cc3200/mods/moduhashlib.c b/ports/cc3200/mods/moduhashlib.c index bec88d7ca..96f514927 100644 --- a/ports/cc3200/mods/moduhashlib.c +++ b/ports/cc3200/mods/moduhashlib.c @@ -30,7 +30,6 @@ #include "py/mpconfig.h" #include MICROPY_HAL_H -#include "py/nlr.h" #include "py/runtime.h" #include "inc/hw_types.h" #include "inc/hw_ints.h" diff --git a/ports/cc3200/mods/moduos.c b/ports/cc3200/mods/moduos.c index ba8fd86a6..7d99c8e80 100644 --- a/ports/cc3200/mods/moduos.c +++ b/ports/cc3200/mods/moduos.c @@ -28,8 +28,6 @@ #include #include -#include "py/mpstate.h" -#include "py/nlr.h" #include "py/objtuple.h" #include "py/objstr.h" #include "py/runtime.h" diff --git a/ports/cc3200/mods/pybadc.c b/ports/cc3200/mods/pybadc.c index 850664cab..c73b8c149 100644 --- a/ports/cc3200/mods/pybadc.c +++ b/ports/cc3200/mods/pybadc.c @@ -28,8 +28,6 @@ #include #include -#include "py/mpconfig.h" -#include "py/nlr.h" #include "py/runtime.h" #include "py/binary.h" #include "py/gc.h" diff --git a/ports/cc3200/mods/pybi2c.c b/ports/cc3200/mods/pybi2c.c index efb78a44d..d08627fa4 100644 --- a/ports/cc3200/mods/pybi2c.c +++ b/ports/cc3200/mods/pybi2c.c @@ -28,7 +28,6 @@ #include #include -#include "py/mpstate.h" #include "py/runtime.h" #include "py/mperrno.h" #include "py/mphal.h" diff --git a/ports/cc3200/mods/pybpin.c b/ports/cc3200/mods/pybpin.c index 2402332d5..c877433e9 100644 --- a/ports/cc3200/mods/pybpin.c +++ b/ports/cc3200/mods/pybpin.c @@ -29,11 +29,8 @@ #include #include -#include "py/mpconfig.h" -#include "py/obj.h" #include "py/runtime.h" #include "py/gc.h" -#include "py/mpstate.h" #include "inc/hw_types.h" #include "inc/hw_gpio.h" #include "inc/hw_ints.h" diff --git a/ports/cc3200/mods/pybsleep.c b/ports/cc3200/mods/pybsleep.c index a7488c5f1..798c6538b 100644 --- a/ports/cc3200/mods/pybsleep.c +++ b/ports/cc3200/mods/pybsleep.c @@ -27,7 +27,6 @@ #include #include -#include "py/mpstate.h" #include "py/runtime.h" #include "py/mphal.h" #include "inc/hw_types.h" diff --git a/ports/cc3200/mods/pybspi.c b/ports/cc3200/mods/pybspi.c index 8537f649f..27591e4f4 100644 --- a/ports/cc3200/mods/pybspi.c +++ b/ports/cc3200/mods/pybspi.c @@ -28,7 +28,6 @@ #include #include -#include "py/mpstate.h" #include "py/runtime.h" #include "py/mperrno.h" #include "bufhelper.h" diff --git a/ports/cc3200/mods/pybtimer.c b/ports/cc3200/mods/pybtimer.c index f3a12c5e7..ea795b848 100644 --- a/ports/cc3200/mods/pybtimer.c +++ b/ports/cc3200/mods/pybtimer.c @@ -29,9 +29,6 @@ #include #include -#include "py/mpconfig.h" -#include "py/obj.h" -#include "py/nlr.h" #include "py/runtime.h" #include "py/gc.h" #include "py/mperrno.h" diff --git a/ports/cc3200/mods/pybuart.c b/ports/cc3200/mods/pybuart.c index 135e0f2a3..35c0de9f9 100644 --- a/ports/cc3200/mods/pybuart.c +++ b/ports/cc3200/mods/pybuart.c @@ -29,8 +29,6 @@ #include #include -#include "py/mpconfig.h" -#include "py/obj.h" #include "py/runtime.h" #include "py/objlist.h" #include "py/stream.h" @@ -48,7 +46,6 @@ #include "mpirq.h" #include "pybsleep.h" #include "mpexception.h" -#include "py/mpstate.h" #include "osi.h" #include "utils.h" #include "pin.h" diff --git a/ports/cc3200/mpthreadport.c b/ports/cc3200/mpthreadport.c index e77ac4ae5..9dbc518e0 100644 --- a/ports/cc3200/mpthreadport.c +++ b/ports/cc3200/mpthreadport.c @@ -26,8 +26,6 @@ #include -#include "py/mpconfig.h" -#include "py/mpstate.h" #include "py/runtime.h" #include "py/gc.h" #include "py/mpthread.h" diff --git a/ports/cc3200/util/gccollect.c b/ports/cc3200/util/gccollect.c index baee2eeef..6e2a9081c 100644 --- a/ports/cc3200/util/gccollect.c +++ b/ports/cc3200/util/gccollect.c @@ -28,8 +28,6 @@ #include #include -#include "py/mpconfig.h" -#include "py/mpstate.h" #include "py/gc.h" #include "py/mpthread.h" #include "gccollect.h" diff --git a/ports/esp8266/esp_mphal.c b/ports/esp8266/esp_mphal.c index ec4751e16..71d4c5062 100644 --- a/ports/esp8266/esp_mphal.c +++ b/ports/esp8266/esp_mphal.c @@ -31,8 +31,6 @@ #include "esp_mphal.h" #include "user_interface.h" #include "ets_alt_task.h" -#include "py/obj.h" -#include "py/mpstate.h" #include "py/runtime.h" #include "extmod/misc.h" #include "lib/utils/pyexec.h" diff --git a/ports/esp8266/machine_adc.c b/ports/esp8266/machine_adc.c index c8c08695b..b422f0f9e 100644 --- a/ports/esp8266/machine_adc.c +++ b/ports/esp8266/machine_adc.c @@ -27,8 +27,6 @@ #include #include -#include "py/nlr.h" -#include "py/obj.h" #include "py/runtime.h" #include "user_interface.h" diff --git a/ports/esp8266/machine_pin.c b/ports/esp8266/machine_pin.c index 3ead3f4c2..14505c8f0 100644 --- a/ports/esp8266/machine_pin.c +++ b/ports/esp8266/machine_pin.c @@ -33,7 +33,6 @@ #include "user_interface.h" #include "gpio.h" -#include "py/nlr.h" #include "py/runtime.h" #include "py/gc.h" #include "py/mphal.h" diff --git a/ports/esp8266/machine_pwm.c b/ports/esp8266/machine_pwm.c index 8d73e6bb1..4c5cb8727 100644 --- a/ports/esp8266/machine_pwm.c +++ b/ports/esp8266/machine_pwm.c @@ -29,7 +29,6 @@ #include "esppwm.h" -#include "py/nlr.h" #include "py/runtime.h" #include "modmachine.h" diff --git a/ports/esp8266/machine_rtc.c b/ports/esp8266/machine_rtc.c index f6a13c095..bbfc172cd 100644 --- a/ports/esp8266/machine_rtc.c +++ b/ports/esp8266/machine_rtc.c @@ -27,8 +27,6 @@ #include #include -#include "py/nlr.h" -#include "py/obj.h" #include "py/runtime.h" #include "lib/timeutils/timeutils.h" #include "user_interface.h" diff --git a/ports/esp8266/machine_wdt.c b/ports/esp8266/machine_wdt.c index 5e23ff782..04b42782e 100644 --- a/ports/esp8266/machine_wdt.c +++ b/ports/esp8266/machine_wdt.c @@ -27,8 +27,6 @@ //#include #include -#include "py/nlr.h" -#include "py/obj.h" #include "py/runtime.h" #include "user_interface.h" #include "etshal.h" diff --git a/ports/esp8266/main.c b/ports/esp8266/main.c index 957198aa0..7f5dca84e 100644 --- a/ports/esp8266/main.c +++ b/ports/esp8266/main.c @@ -27,9 +27,7 @@ #include #include -#include "py/nlr.h" #include "py/compile.h" -#include "py/runtime0.h" #include "py/runtime.h" #include "py/stackctrl.h" #include "py/mperrno.h" diff --git a/ports/esp8266/modnetwork.c b/ports/esp8266/modnetwork.c index 3acd244b8..2c61e5dcd 100644 --- a/ports/esp8266/modnetwork.c +++ b/ports/esp8266/modnetwork.c @@ -28,7 +28,6 @@ #include #include -#include "py/nlr.h" #include "py/objlist.h" #include "py/runtime.h" #include "py/mphal.h" diff --git a/ports/esp8266/modutime.c b/ports/esp8266/modutime.c index 77dbcfa1f..ab9cb7dc2 100644 --- a/ports/esp8266/modutime.c +++ b/ports/esp8266/modutime.c @@ -28,8 +28,6 @@ #include #include -#include "py/nlr.h" -#include "py/obj.h" #include "py/gc.h" #include "py/runtime.h" #include "py/mphal.h" diff --git a/ports/minimal/main.c b/ports/minimal/main.c index e28cfe45e..9d43a9cf9 100644 --- a/ports/minimal/main.c +++ b/ports/minimal/main.c @@ -2,7 +2,6 @@ #include #include -#include "py/nlr.h" #include "py/compile.h" #include "py/runtime.h" #include "py/repl.h" diff --git a/ports/qemu-arm/main.c b/ports/qemu-arm/main.c index d5fbcd84b..d23ef576f 100644 --- a/ports/qemu-arm/main.c +++ b/ports/qemu-arm/main.c @@ -4,10 +4,8 @@ #include #include -#include "py/nlr.h" #include "py/obj.h" #include "py/compile.h" -#include "py/runtime0.h" #include "py/runtime.h" #include "py/stackctrl.h" #include "py/gc.h" diff --git a/ports/qemu-arm/test_main.c b/ports/qemu-arm/test_main.c index 5c07d1607..c018ae428 100644 --- a/ports/qemu-arm/test_main.c +++ b/ports/qemu-arm/test_main.c @@ -4,10 +4,8 @@ #include #include -#include "py/nlr.h" #include "py/obj.h" #include "py/compile.h" -#include "py/runtime0.h" #include "py/runtime.h" #include "py/stackctrl.h" #include "py/gc.h" diff --git a/ports/stm32/accel.c b/ports/stm32/accel.c index 512a6e313..7b36e2082 100644 --- a/ports/stm32/accel.c +++ b/ports/stm32/accel.c @@ -28,7 +28,6 @@ #include #include "py/mphal.h" -#include "py/nlr.h" #include "py/runtime.h" #include "pin.h" #include "genhdr/pins.h" diff --git a/ports/stm32/adc.c b/ports/stm32/adc.c index 4192e7fed..9a0dc56a3 100644 --- a/ports/stm32/adc.c +++ b/ports/stm32/adc.c @@ -27,7 +27,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" #include "py/binary.h" #include "py/mphal.h" diff --git a/ports/stm32/can.c b/ports/stm32/can.c index 2fd593d58..25a608ce9 100644 --- a/ports/stm32/can.c +++ b/ports/stm32/can.c @@ -28,7 +28,6 @@ #include #include -#include "py/nlr.h" #include "py/objtuple.h" #include "py/runtime.h" #include "py/gc.h" diff --git a/ports/stm32/gccollect.c b/ports/stm32/gccollect.c index 937fb6f36..cdec2a136 100644 --- a/ports/stm32/gccollect.c +++ b/ports/stm32/gccollect.c @@ -27,7 +27,6 @@ #include #include -#include "py/mpstate.h" #include "py/obj.h" #include "py/gc.h" #include "py/mpthread.h" diff --git a/ports/stm32/i2c.c b/ports/stm32/i2c.c index fcf3cd9c3..b22787cab 100644 --- a/ports/stm32/i2c.c +++ b/ports/stm32/i2c.c @@ -27,7 +27,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" #include "py/mphal.h" #include "irq.h" diff --git a/ports/stm32/irq.c b/ports/stm32/irq.c index d6db8e83d..7298a4b50 100644 --- a/ports/stm32/irq.c +++ b/ports/stm32/irq.c @@ -24,7 +24,6 @@ * THE SOFTWARE. */ -#include "py/nlr.h" #include "py/obj.h" #include "py/mphal.h" #include "irq.h" diff --git a/ports/stm32/lcd.c b/ports/stm32/lcd.c index 559616b96..488df1699 100644 --- a/ports/stm32/lcd.c +++ b/ports/stm32/lcd.c @@ -28,7 +28,6 @@ #include #include "py/mphal.h" -#include "py/nlr.h" #include "py/runtime.h" #if MICROPY_HW_HAS_LCD diff --git a/ports/stm32/led.c b/ports/stm32/led.c index e03781bcf..9bbcaa6b3 100644 --- a/ports/stm32/led.c +++ b/ports/stm32/led.c @@ -26,7 +26,6 @@ #include -#include "py/nlr.h" #include "py/runtime.h" #include "py/mphal.h" #include "timer.h" diff --git a/ports/stm32/modmachine.h b/ports/stm32/modmachine.h index ac39f854e..77668695f 100644 --- a/ports/stm32/modmachine.h +++ b/ports/stm32/modmachine.h @@ -26,8 +26,6 @@ #ifndef MICROPY_INCLUDED_STMHAL_MODMACHINE_H #define MICROPY_INCLUDED_STMHAL_MODMACHINE_H -#include "py/mpstate.h" -#include "py/nlr.h" #include "py/obj.h" void machine_init(void); diff --git a/ports/stm32/modnetwork.c b/ports/stm32/modnetwork.c index 6b4949a0d..642174532 100644 --- a/ports/stm32/modnetwork.c +++ b/ports/stm32/modnetwork.c @@ -28,7 +28,6 @@ #include #include -#include "py/nlr.h" #include "py/objlist.h" #include "py/runtime.h" #include "modnetwork.h" diff --git a/ports/stm32/modnwcc3k.c b/ports/stm32/modnwcc3k.c index 2be5d6c22..551206da8 100644 --- a/ports/stm32/modnwcc3k.c +++ b/ports/stm32/modnwcc3k.c @@ -30,7 +30,6 @@ // CC3000 defines its own ENOBUFS (different to standard one!) #undef ENOBUFS -#include "py/nlr.h" #include "py/objtuple.h" #include "py/objlist.h" #include "py/stream.h" diff --git a/ports/stm32/modnwwiznet5k.c b/ports/stm32/modnwwiznet5k.c index 2d5a8d51a..21e4dbbbf 100644 --- a/ports/stm32/modnwwiznet5k.c +++ b/ports/stm32/modnwwiznet5k.c @@ -28,7 +28,6 @@ #include #include -#include "py/nlr.h" #include "py/objlist.h" #include "py/runtime.h" #include "py/mperrno.h" diff --git a/ports/stm32/modpyb.c b/ports/stm32/modpyb.c index 5dc28e132..176fc8466 100644 --- a/ports/stm32/modpyb.c +++ b/ports/stm32/modpyb.c @@ -27,8 +27,6 @@ #include #include -#include "py/mpstate.h" -#include "py/nlr.h" #include "py/obj.h" #include "py/gc.h" #include "py/builtin.h" diff --git a/ports/stm32/moduos.c b/ports/stm32/moduos.c index 82ee61726..f661b3b5e 100644 --- a/ports/stm32/moduos.c +++ b/ports/stm32/moduos.c @@ -27,7 +27,6 @@ #include #include -#include "py/mpstate.h" #include "py/runtime.h" #include "py/objtuple.h" #include "py/objstr.h" diff --git a/ports/stm32/modusocket.c b/ports/stm32/modusocket.c index 32dad5ced..c5ab3b6d7 100644 --- a/ports/stm32/modusocket.c +++ b/ports/stm32/modusocket.c @@ -27,7 +27,6 @@ #include #include -#include "py/nlr.h" #include "py/objtuple.h" #include "py/objlist.h" #include "py/runtime.h" diff --git a/ports/stm32/mphalport.c b/ports/stm32/mphalport.c index dff781ff2..ab3dc227a 100644 --- a/ports/stm32/mphalport.c +++ b/ports/stm32/mphalport.c @@ -1,6 +1,5 @@ #include -#include "py/mpstate.h" #include "py/runtime.h" #include "py/mperrno.h" #include "py/mphal.h" diff --git a/ports/stm32/mpthreadport.c b/ports/stm32/mpthreadport.c index d7c5b569b..11653b24c 100644 --- a/ports/stm32/mpthreadport.c +++ b/ports/stm32/mpthreadport.c @@ -26,8 +26,6 @@ #include -#include "py/mpconfig.h" -#include "py/mpstate.h" #include "py/gc.h" #include "py/mpthread.h" #include "gccollect.h" diff --git a/ports/stm32/pendsv.c b/ports/stm32/pendsv.c index 00ea12f46..0aeb1a6dc 100644 --- a/ports/stm32/pendsv.c +++ b/ports/stm32/pendsv.c @@ -26,7 +26,6 @@ #include -#include "py/mpstate.h" #include "py/runtime.h" #include "lib/utils/interrupt_char.h" #include "pendsv.h" diff --git a/ports/stm32/pin.c b/ports/stm32/pin.c index b7a2302b0..ee2d84646 100644 --- a/ports/stm32/pin.c +++ b/ports/stm32/pin.c @@ -28,7 +28,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" #include "py/mphal.h" #include "extmod/virtpin.h" diff --git a/ports/stm32/sdcard.c b/ports/stm32/sdcard.c index 27276332a..484426b84 100644 --- a/ports/stm32/sdcard.c +++ b/ports/stm32/sdcard.c @@ -26,7 +26,6 @@ #include -#include "py/nlr.h" #include "py/runtime.h" #include "py/mphal.h" #include "lib/oofatfs/ff.h" diff --git a/ports/stm32/spi.c b/ports/stm32/spi.c index 654a1327d..cfd9c2667 100644 --- a/ports/stm32/spi.c +++ b/ports/stm32/spi.c @@ -27,7 +27,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" #include "py/mphal.h" #include "extmod/machine_spi.h" diff --git a/ports/stm32/stm32_it.c b/ports/stm32/stm32_it.c index 2111da1ae..f1ac9b6b8 100644 --- a/ports/stm32/stm32_it.c +++ b/ports/stm32/stm32_it.c @@ -67,7 +67,6 @@ #include -#include "py/mpstate.h" #include "py/obj.h" #include "py/mphal.h" #include "stm32_it.h" diff --git a/ports/stm32/uart.c b/ports/stm32/uart.c index 1238b4e31..2b2f782f9 100644 --- a/ports/stm32/uart.c +++ b/ports/stm32/uart.c @@ -28,7 +28,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" #include "py/stream.h" #include "py/mperrno.h" diff --git a/ports/teensy/led.c b/ports/teensy/led.c index 9159c75ce..add052fad 100644 --- a/ports/teensy/led.c +++ b/ports/teensy/led.c @@ -2,7 +2,6 @@ #include "Arduino.h" -#include "py/nlr.h" #include "py/runtime.h" #include "py/mphal.h" #include "led.h" diff --git a/ports/teensy/teensy_hal.c b/ports/teensy/teensy_hal.c index 439e3380d..84d68cff8 100644 --- a/ports/teensy/teensy_hal.c +++ b/ports/teensy/teensy_hal.c @@ -1,7 +1,6 @@ #include #include -#include "py/mpstate.h" #include "py/runtime.h" #include "py/mphal.h" #include "usb.h" diff --git a/ports/teensy/timer.c b/ports/teensy/timer.c index cdc7a3c54..b823e6c3b 100644 --- a/ports/teensy/timer.c +++ b/ports/teensy/timer.c @@ -29,7 +29,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" #include "py/gc.h" #include "py/mphal.h" diff --git a/ports/teensy/uart.c b/ports/teensy/uart.c index 768572aff..3d5111217 100644 --- a/ports/teensy/uart.c +++ b/ports/teensy/uart.c @@ -27,7 +27,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" #include "bufhelper.h" #include "uart.h" diff --git a/ports/unix/file.c b/ports/unix/file.c index 0d65f9ca0..84e918082 100644 --- a/ports/unix/file.c +++ b/ports/unix/file.c @@ -31,7 +31,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" #include "py/stream.h" #include "py/builtin.h" diff --git a/ports/unix/main.c b/ports/unix/main.c index e861d7f11..e1cd33fc1 100644 --- a/ports/unix/main.c +++ b/ports/unix/main.c @@ -37,8 +37,6 @@ #include #include -#include "py/mpstate.h" -#include "py/nlr.h" #include "py/compile.h" #include "py/runtime.h" #include "py/builtin.h" diff --git a/ports/unix/modffi.c b/ports/unix/modffi.c index 9b514371b..78adccac1 100644 --- a/ports/unix/modffi.c +++ b/ports/unix/modffi.c @@ -32,7 +32,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" #include "py/binary.h" #include "py/mperrno.h" diff --git a/ports/unix/modjni.c b/ports/unix/modjni.c index b7ac49dc8..15b6d9cd7 100644 --- a/ports/unix/modjni.c +++ b/ports/unix/modjni.c @@ -30,8 +30,6 @@ #include #include -#include "py/nlr.h" -#include "py/runtime0.h" #include "py/runtime.h" #include "py/binary.h" diff --git a/ports/unix/modos.c b/ports/unix/modos.c index 5030fbb65..327116a0a 100644 --- a/ports/unix/modos.c +++ b/ports/unix/modos.c @@ -34,7 +34,6 @@ #include #include "py/mpconfig.h" -#include "py/nlr.h" #include "py/runtime.h" #include "py/objtuple.h" #include "py/mphal.h" diff --git a/ports/unix/modsocket.c b/ports/unix/modsocket.c index c612f870d..7e82554c7 100644 --- a/ports/unix/modsocket.c +++ b/ports/unix/modsocket.c @@ -38,7 +38,6 @@ #include #include -#include "py/nlr.h" #include "py/objtuple.h" #include "py/objstr.h" #include "py/runtime.h" diff --git a/ports/unix/mpthreadport.c b/ports/unix/mpthreadport.c index 09f5702e3..8c636a445 100644 --- a/ports/unix/mpthreadport.c +++ b/ports/unix/mpthreadport.c @@ -28,7 +28,6 @@ #include #include -#include "py/mpstate.h" #include "py/runtime.h" #include "py/mpthread.h" #include "py/gc.h" diff --git a/ports/unix/unix_mphal.c b/ports/unix/unix_mphal.c index 02cdbea11..2b273d834 100644 --- a/ports/unix/unix_mphal.c +++ b/ports/unix/unix_mphal.c @@ -29,7 +29,6 @@ #include #include -#include "py/mpstate.h" #include "py/mphal.h" #include "py/runtime.h" #include "extmod/misc.h" diff --git a/ports/zephyr/machine_pin.c b/ports/zephyr/machine_pin.c index c23ac08f0..4dcd956cf 100644 --- a/ports/zephyr/machine_pin.c +++ b/ports/zephyr/machine_pin.c @@ -32,7 +32,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" #include "py/gc.h" #include "py/mphal.h" diff --git a/ports/zephyr/main.c b/ports/zephyr/main.c index a4301629f..7255d981f 100644 --- a/ports/zephyr/main.c +++ b/ports/zephyr/main.c @@ -33,7 +33,6 @@ #include #endif -#include "py/nlr.h" #include "py/compile.h" #include "py/runtime.h" #include "py/repl.h" diff --git a/py/argcheck.c b/py/argcheck.c index 0c5c5ca95..add6f8de8 100644 --- a/py/argcheck.c +++ b/py/argcheck.c @@ -27,7 +27,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" void mp_arg_check_num(size_t n_args, size_t n_kw, size_t n_args_min, size_t n_args_max, bool takes_kw) { diff --git a/py/bc.c b/py/bc.c index 917eba57d..991b0cf26 100644 --- a/py/bc.c +++ b/py/bc.c @@ -29,9 +29,7 @@ #include #include -#include "py/nlr.h" -#include "py/objfun.h" -#include "py/runtime0.h" +#include "py/runtime.h" #include "py/bc0.h" #include "py/bc.h" diff --git a/py/bc.h b/py/bc.h index 69e213e42..ebfdeaac1 100644 --- a/py/bc.h +++ b/py/bc.h @@ -27,7 +27,6 @@ #define MICROPY_INCLUDED_PY_BC_H #include "py/runtime.h" -#include "py/obj.h" #include "py/objfun.h" // bytecode layout: diff --git a/py/builtinevex.c b/py/builtinevex.c index ba8048f70..846603f46 100644 --- a/py/builtinevex.c +++ b/py/builtinevex.c @@ -26,7 +26,6 @@ #include -#include "py/nlr.h" #include "py/objfun.h" #include "py/compile.h" #include "py/runtime.h" diff --git a/py/builtinimport.c b/py/builtinimport.c index f5bfb0d98..04ce66723 100644 --- a/py/builtinimport.c +++ b/py/builtinimport.c @@ -29,7 +29,6 @@ #include #include -#include "py/nlr.h" #include "py/compile.h" #include "py/objmodule.h" #include "py/persistentcode.h" diff --git a/py/emit.h b/py/emit.h index 2b2c904f6..270a40633 100644 --- a/py/emit.h +++ b/py/emit.h @@ -28,7 +28,6 @@ #include "py/lexer.h" #include "py/scope.h" -#include "py/runtime0.h" /* Notes on passes: * We don't know exactly the opcodes in pass 1 because they depend on the diff --git a/py/emitnative.c b/py/emitnative.c index 4608cd1e0..b2c9a7366 100644 --- a/py/emitnative.c +++ b/py/emitnative.c @@ -46,7 +46,6 @@ #include #include -#include "py/nlr.h" #include "py/emit.h" #include "py/bc.h" diff --git a/py/gc.c b/py/gc.c index 3a505e9c7..9752b3532 100644 --- a/py/gc.c +++ b/py/gc.c @@ -28,9 +28,7 @@ #include #include -#include "py/mpstate.h" #include "py/gc.h" -#include "py/obj.h" #include "py/runtime.h" #if MICROPY_ENABLE_GC diff --git a/py/lexer.c b/py/lexer.c index 074d6f356..6017d69d6 100644 --- a/py/lexer.c +++ b/py/lexer.c @@ -28,7 +28,6 @@ #include #include -#include "py/mpstate.h" #include "py/reader.h" #include "py/lexer.h" #include "py/runtime.h" diff --git a/py/map.c b/py/map.c index f07b8fbd2..4f76b9b16 100644 --- a/py/map.c +++ b/py/map.c @@ -31,7 +31,6 @@ #include "py/mpconfig.h" #include "py/misc.h" -#include "py/runtime0.h" #include "py/runtime.h" // Fixed empty map. Useful when need to call kw-receiving functions diff --git a/py/modbuiltins.c b/py/modbuiltins.c index 0486251b6..82b08cdc9 100644 --- a/py/modbuiltins.c +++ b/py/modbuiltins.c @@ -27,12 +27,10 @@ #include #include -#include "py/nlr.h" #include "py/smallint.h" #include "py/objint.h" #include "py/objstr.h" #include "py/objtype.h" -#include "py/runtime0.h" #include "py/runtime.h" #include "py/builtin.h" #include "py/stream.h" diff --git a/py/modmicropython.c b/py/modmicropython.c index 6fa3f9ad2..2aac53adc 100644 --- a/py/modmicropython.c +++ b/py/modmicropython.c @@ -26,7 +26,6 @@ #include -#include "py/mpstate.h" #include "py/builtin.h" #include "py/stackctrl.h" #include "py/runtime.h" diff --git a/py/modsys.c b/py/modsys.c index ecc0b6065..84a4eb0f4 100644 --- a/py/modsys.c +++ b/py/modsys.c @@ -25,8 +25,6 @@ * THE SOFTWARE. */ -#include "py/mpstate.h" -#include "py/nlr.h" #include "py/builtin.h" #include "py/objlist.h" #include "py/objtuple.h" @@ -35,7 +33,6 @@ #include "py/objtype.h" #include "py/stream.h" #include "py/smallint.h" -#include "py/runtime0.h" #include "py/runtime.h" #if MICROPY_PY_SYS diff --git a/py/nativeglue.c b/py/nativeglue.c index e954234c2..61b624ec7 100644 --- a/py/nativeglue.c +++ b/py/nativeglue.c @@ -28,8 +28,6 @@ #include #include -#include "py/nlr.h" -#include "py/runtime0.h" #include "py/runtime.h" #include "py/emitglue.h" #include "py/bc.h" diff --git a/py/nlrthumb.c b/py/nlrthumb.c index 8ff1bb2d2..6e7d71766 100644 --- a/py/nlrthumb.c +++ b/py/nlrthumb.c @@ -25,7 +25,6 @@ */ #include "py/mpstate.h" -#include "py/nlr.h" #if (!defined(MICROPY_NLR_SETJMP) || !MICROPY_NLR_SETJMP) && (defined(__thumb2__) || defined(__thumb__) || defined(__arm__)) diff --git a/py/nlrx64.c b/py/nlrx64.c index aeaacd50c..847d10398 100644 --- a/py/nlrx64.c +++ b/py/nlrx64.c @@ -25,7 +25,6 @@ */ #include "py/mpstate.h" -#include "py/nlr.h" #if !MICROPY_NLR_SETJMP && defined(__x86_64__) diff --git a/py/nlrx86.c b/py/nlrx86.c index a5a20f373..094dea3cc 100644 --- a/py/nlrx86.c +++ b/py/nlrx86.c @@ -24,9 +24,7 @@ * THE SOFTWARE. */ -#include "py/mpconfig.h" #include "py/mpstate.h" -#include "py/nlr.h" #if !MICROPY_NLR_SETJMP && defined(__i386__) diff --git a/py/nlrxtensa.c b/py/nlrxtensa.c index ccac3597b..4520e7e7a 100644 --- a/py/nlrxtensa.c +++ b/py/nlrxtensa.c @@ -25,7 +25,6 @@ */ #include "py/mpstate.h" -#include "py/nlr.h" #if !MICROPY_NLR_SETJMP && defined(__xtensa__) diff --git a/py/obj.c b/py/obj.c index 857fe373f..a1de89a03 100644 --- a/py/obj.c +++ b/py/obj.c @@ -29,12 +29,10 @@ #include #include -#include "py/nlr.h" #include "py/obj.h" #include "py/objtype.h" #include "py/objint.h" #include "py/objstr.h" -#include "py/runtime0.h" #include "py/runtime.h" #include "py/stackctrl.h" #include "py/stream.h" // for mp_obj_print diff --git a/py/objarray.c b/py/objarray.c index d51cc650b..8a3e7faad 100644 --- a/py/objarray.c +++ b/py/objarray.c @@ -29,8 +29,6 @@ #include #include -#include "py/nlr.h" -#include "py/runtime0.h" #include "py/runtime.h" #include "py/binary.h" #include "py/objstr.h" diff --git a/py/objbool.c b/py/objbool.c index b94c57f87..5755b188e 100644 --- a/py/objbool.c +++ b/py/objbool.c @@ -26,8 +26,6 @@ #include -#include "py/obj.h" -#include "py/runtime0.h" #include "py/runtime.h" typedef struct _mp_obj_bool_t { diff --git a/py/objcomplex.c b/py/objcomplex.c index 088ad5211..409d65666 100644 --- a/py/objcomplex.c +++ b/py/objcomplex.c @@ -28,10 +28,7 @@ #include #include -#include "py/nlr.h" -#include "py/obj.h" #include "py/parsenum.h" -#include "py/runtime0.h" #include "py/runtime.h" #if MICROPY_PY_BUILTINS_COMPLEX diff --git a/py/objdict.c b/py/objdict.c index 6bb243562..1553a83b4 100644 --- a/py/objdict.c +++ b/py/objdict.c @@ -27,9 +27,6 @@ #include #include -#include "py/nlr.h" -#include "py/obj.h" -#include "py/runtime0.h" #include "py/runtime.h" #include "py/builtin.h" #include "py/objtype.h" diff --git a/py/objexcept.c b/py/objexcept.c index 0a03df9d0..b87609a6b 100644 --- a/py/objexcept.c +++ b/py/objexcept.c @@ -29,7 +29,6 @@ #include #include -#include "py/mpstate.h" #include "py/objlist.h" #include "py/objstr.h" #include "py/objtuple.h" diff --git a/py/objfloat.c b/py/objfloat.c index 0831be3fd..743287be6 100644 --- a/py/objfloat.c +++ b/py/objfloat.c @@ -29,9 +29,7 @@ #include #include -#include "py/nlr.h" #include "py/parsenum.h" -#include "py/runtime0.h" #include "py/runtime.h" #if MICROPY_PY_BUILTINS_FLOAT diff --git a/py/objfun.c b/py/objfun.c index 5606511d8..030b3f7cb 100644 --- a/py/objfun.c +++ b/py/objfun.c @@ -28,10 +28,8 @@ #include #include -#include "py/nlr.h" #include "py/objtuple.h" #include "py/objfun.h" -#include "py/runtime0.h" #include "py/runtime.h" #include "py/bc.h" #include "py/stackctrl.h" diff --git a/py/objgenerator.c b/py/objgenerator.c index 2f39f3a52..bf0bbb0e6 100644 --- a/py/objgenerator.c +++ b/py/objgenerator.c @@ -28,8 +28,6 @@ #include #include -#include "py/nlr.h" -#include "py/obj.h" #include "py/runtime.h" #include "py/bc.h" #include "py/objgenerator.h" diff --git a/py/objgetitemiter.c b/py/objgetitemiter.c index afd6fb22b..ec41c2c5b 100644 --- a/py/objgetitemiter.c +++ b/py/objgetitemiter.c @@ -26,7 +26,6 @@ #include -#include "py/nlr.h" #include "py/runtime.h" // this is a wrapper object that turns something that has a __getitem__ method into an iterator diff --git a/py/objint.c b/py/objint.c index 000a0404c..4f2e610a5 100644 --- a/py/objint.c +++ b/py/objint.c @@ -28,12 +28,10 @@ #include #include -#include "py/nlr.h" #include "py/parsenum.h" #include "py/smallint.h" #include "py/objint.h" #include "py/objstr.h" -#include "py/runtime0.h" #include "py/runtime.h" #include "py/binary.h" diff --git a/py/objint_longlong.c b/py/objint_longlong.c index 8d8ca1b2c..2e567c572 100644 --- a/py/objint_longlong.c +++ b/py/objint_longlong.c @@ -28,10 +28,8 @@ #include #include -#include "py/nlr.h" #include "py/smallint.h" #include "py/objint.h" -#include "py/runtime0.h" #include "py/runtime.h" #if MICROPY_PY_BUILTINS_FLOAT diff --git a/py/objint_mpz.c b/py/objint_mpz.c index 15aad1d4d..7b5cb0b9d 100644 --- a/py/objint_mpz.c +++ b/py/objint_mpz.c @@ -28,11 +28,9 @@ #include #include -#include "py/nlr.h" #include "py/parsenumbase.h" #include "py/smallint.h" #include "py/objint.h" -#include "py/runtime0.h" #include "py/runtime.h" #if MICROPY_PY_BUILTINS_FLOAT diff --git a/py/objlist.c b/py/objlist.c index d70867ded..bc22d9fc3 100644 --- a/py/objlist.c +++ b/py/objlist.c @@ -27,9 +27,7 @@ #include #include -#include "py/nlr.h" #include "py/objlist.h" -#include "py/runtime0.h" #include "py/runtime.h" #include "py/stackctrl.h" diff --git a/py/objmodule.c b/py/objmodule.c index fc8507c27..f9363e379 100644 --- a/py/objmodule.c +++ b/py/objmodule.c @@ -27,8 +27,6 @@ #include #include -#include "py/mpstate.h" -#include "py/nlr.h" #include "py/objmodule.h" #include "py/runtime.h" #include "py/builtin.h" diff --git a/py/objnamedtuple.c b/py/objnamedtuple.c index fb9d9f02c..38daccdf2 100644 --- a/py/objnamedtuple.c +++ b/py/objnamedtuple.c @@ -27,7 +27,6 @@ #include -#include "py/nlr.h" #include "py/objtuple.h" #include "py/runtime.h" #include "py/objstr.h" diff --git a/py/objnone.c b/py/objnone.c index cd7319bec..da1031835 100644 --- a/py/objnone.c +++ b/py/objnone.c @@ -26,9 +26,7 @@ #include -#include "py/nlr.h" #include "py/obj.h" -#include "py/runtime0.h" typedef struct _mp_obj_none_t { mp_obj_base_t base; diff --git a/py/objpolyiter.c b/py/objpolyiter.c index 61bd1e0ac..01880bff9 100644 --- a/py/objpolyiter.c +++ b/py/objpolyiter.c @@ -26,7 +26,6 @@ #include -#include "py/nlr.h" #include "py/runtime.h" // This is universal iterator type which calls "iternext" method stored in diff --git a/py/objproperty.c b/py/objproperty.c index 0934fad05..b66d24a11 100644 --- a/py/objproperty.c +++ b/py/objproperty.c @@ -27,7 +27,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" #if MICROPY_PY_BUILTINS_PROPERTY diff --git a/py/objrange.c b/py/objrange.c index fa99c4c2d..3874adb11 100644 --- a/py/objrange.c +++ b/py/objrange.c @@ -26,8 +26,6 @@ #include -#include "py/nlr.h" -#include "py/runtime0.h" #include "py/runtime.h" /******************************************************************************/ diff --git a/py/objreversed.c b/py/objreversed.c index a596a2fde..e498b553d 100644 --- a/py/objreversed.c +++ b/py/objreversed.c @@ -27,7 +27,6 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" #if MICROPY_PY_BUILTINS_REVERSED diff --git a/py/objset.c b/py/objset.c index aefc26aac..6ed15c791 100644 --- a/py/objset.c +++ b/py/objset.c @@ -28,9 +28,7 @@ #include #include -#include "py/nlr.h" #include "py/runtime.h" -#include "py/runtime0.h" #include "py/builtin.h" #if MICROPY_PY_BUILTINS_SET diff --git a/py/objsingleton.c b/py/objsingleton.c index ea72ae38c..67535391e 100644 --- a/py/objsingleton.c +++ b/py/objsingleton.c @@ -27,9 +27,7 @@ #include #include -#include "py/nlr.h" #include "py/obj.h" -#include "py/runtime0.h" /******************************************************************************/ /* singleton objects defined by Python */ diff --git a/py/objslice.c b/py/objslice.c index 358c44d06..de996d831 100644 --- a/py/objslice.c +++ b/py/objslice.c @@ -27,9 +27,7 @@ #include #include -#include "py/nlr.h" #include "py/obj.h" -#include "py/runtime0.h" /******************************************************************************/ /* slice object */ diff --git a/py/objstr.c b/py/objstr.c index 11bfb41fc..d17b0a68c 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -28,11 +28,9 @@ #include #include -#include "py/nlr.h" #include "py/unicode.h" #include "py/objstr.h" #include "py/objlist.h" -#include "py/runtime0.h" #include "py/runtime.h" #include "py/stackctrl.h" diff --git a/py/objstringio.c b/py/objstringio.c index 61da0203e..5c50aa317 100644 --- a/py/objstringio.c +++ b/py/objstringio.c @@ -28,7 +28,6 @@ #include #include -#include "py/nlr.h" #include "py/objstr.h" #include "py/objstringio.h" #include "py/runtime.h" diff --git a/py/objstrunicode.c b/py/objstrunicode.c index 785317406..29f7695b7 100644 --- a/py/objstrunicode.c +++ b/py/objstrunicode.c @@ -28,10 +28,8 @@ #include #include -#include "py/nlr.h" #include "py/objstr.h" #include "py/objlist.h" -#include "py/runtime0.h" #include "py/runtime.h" #if MICROPY_PY_BUILTINS_STR_UNICODE diff --git a/py/objtuple.c b/py/objtuple.c index b8916a1a7..34b7664eb 100644 --- a/py/objtuple.c +++ b/py/objtuple.c @@ -27,9 +27,7 @@ #include #include -#include "py/nlr.h" #include "py/objtuple.h" -#include "py/runtime0.h" #include "py/runtime.h" /******************************************************************************/ diff --git a/py/objtype.c b/py/objtype.c index 033765a47..d7f409e30 100644 --- a/py/objtype.c +++ b/py/objtype.c @@ -30,9 +30,7 @@ #include #include -#include "py/nlr.h" #include "py/objtype.h" -#include "py/runtime0.h" #include "py/runtime.h" #if MICROPY_DEBUG_VERBOSE // print debugging info diff --git a/py/parse.c b/py/parse.c index e399aac53..8c51b0349 100644 --- a/py/parse.c +++ b/py/parse.c @@ -31,11 +31,9 @@ #include #include -#include "py/nlr.h" #include "py/lexer.h" #include "py/parse.h" #include "py/parsenum.h" -#include "py/runtime0.h" #include "py/runtime.h" #include "py/objint.h" #include "py/objstr.h" diff --git a/py/persistentcode.c b/py/persistentcode.c index f954038ae..d8b17c7e6 100644 --- a/py/persistentcode.c +++ b/py/persistentcode.c @@ -99,7 +99,6 @@ STATIC void extract_prelude(const byte **ip, const byte **ip2, bytecode_prelude_ #if MICROPY_PERSISTENT_CODE_LOAD #include "py/parsenum.h" -#include "py/bc0.h" STATIC int read_byte(mp_reader_t *reader) { return reader->readbyte(reader->data); diff --git a/py/runtime.c b/py/runtime.c index f21eed204..069548deb 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -28,8 +28,6 @@ #include #include -#include "py/mpstate.h" -#include "py/nlr.h" #include "py/parsenum.h" #include "py/compile.h" #include "py/objstr.h" @@ -38,7 +36,6 @@ #include "py/objmodule.h" #include "py/objgenerator.h" #include "py/smallint.h" -#include "py/runtime0.h" #include "py/runtime.h" #include "py/builtin.h" #include "py/stackctrl.h" diff --git a/py/runtime.h b/py/runtime.h index da12f8f04..d410b5614 100644 --- a/py/runtime.h +++ b/py/runtime.h @@ -27,7 +27,6 @@ #define MICROPY_INCLUDED_PY_RUNTIME_H #include "py/mpstate.h" -#include "py/obj.h" typedef enum { MP_VM_RETURN_NORMAL, diff --git a/py/runtime_utils.c b/py/runtime_utils.c index 56a918064..a5c5403ba 100644 --- a/py/runtime_utils.c +++ b/py/runtime_utils.c @@ -26,8 +26,6 @@ */ #include "py/runtime.h" -#include "py/obj.h" -#include "py/nlr.h" void mp_call_function_1_protected(mp_obj_t fun, mp_obj_t arg) { nlr_buf_t nlr; diff --git a/py/sequence.c b/py/sequence.c index 0752ee109..c66fde98f 100644 --- a/py/sequence.c +++ b/py/sequence.c @@ -27,9 +27,6 @@ #include -#include "py/nlr.h" -#include "py/obj.h" -#include "py/runtime0.h" #include "py/runtime.h" // Helpers for sequence types diff --git a/py/stackctrl.c b/py/stackctrl.c index 0bcd82f4f..7cd35fee2 100644 --- a/py/stackctrl.c +++ b/py/stackctrl.c @@ -24,9 +24,6 @@ * THE SOFTWARE. */ -#include "py/mpstate.h" -#include "py/nlr.h" -#include "py/obj.h" #include "py/runtime.h" #include "py/stackctrl.h" diff --git a/py/stream.c b/py/stream.c index 0adf0af06..453dee769 100644 --- a/py/stream.c +++ b/py/stream.c @@ -28,7 +28,6 @@ #include #include -#include "py/nlr.h" #include "py/objstr.h" #include "py/stream.h" #include "py/runtime.h" diff --git a/py/vm.c b/py/vm.c index 9a27b2b22..564200037 100644 --- a/py/vm.c +++ b/py/vm.c @@ -29,8 +29,6 @@ #include #include -#include "py/mpstate.h" -#include "py/nlr.h" #include "py/emitglue.h" #include "py/objtype.h" #include "py/runtime.h" -- cgit v1.2.3