diff options
-rw-r--r-- | logo/vector-logo-2.png | bin | 90783 -> 92679 bytes | |||
-rw-r--r-- | logo/vector-logo-inkscape_master.svg | 14 | ||||
-rw-r--r-- | py/compile.c | 2 | ||||
-rw-r--r-- | py/emitpass1.c | 5 | ||||
-rw-r--r-- | py/runtime.c | 3 |
5 files changed, 15 insertions, 9 deletions
diff --git a/logo/vector-logo-2.png b/logo/vector-logo-2.png Binary files differindex 3ad2383ff..72ce88e1d 100644 --- a/logo/vector-logo-2.png +++ b/logo/vector-logo-2.png diff --git a/logo/vector-logo-inkscape_master.svg b/logo/vector-logo-inkscape_master.svg index 19415d41b..bbfca4780 100644 --- a/logo/vector-logo-inkscape_master.svg +++ b/logo/vector-logo-inkscape_master.svg @@ -32,13 +32,13 @@ inkscape:window-height="1086" id="namedview127" showgrid="false" - inkscape:zoom="1.1668212" - inkscape:cx="347.36024" - inkscape:cy="357.11268" + inkscape:zoom="5.4082024" + inkscape:cx="367.53099" + inkscape:cy="675.33912" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="0" - inkscape:current-layer="layer6" /> + inkscape:current-layer="layer4" /> <defs id="defs4"> <linearGradient @@ -693,6 +693,12 @@ d="m 197.35296,637.05028 26.22631,-36.06117 193.41902,1.96697 -36.06117,45.24038 -89.82511,-9.83486 7.21224,-15.08013 -43.27341,3.93395 z" id="path5039" inkscape:connector-curvature="0" /> + <path + style="fill:#ffffff;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1" + d="m 344.52579,102.27483 15.42653,-40.280383 23.99682,-15.426528 17.14059,9.427323 3.42812,11.998411 28.28197,-6.856235 14.56949,21.425734 0.85703,38.566318 -13.71247,30.85306 -21.42573,9.42732 -20.5687,-12.85544 -20.56871,8.57029 -24.98883,-23.71207 z" + id="path3253" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccccccccccccc" /> </g> <g inkscape:groupmode="layer" diff --git a/py/compile.c b/py/compile.c index 2e22d6426..b948f7aa4 100644 --- a/py/compile.c +++ b/py/compile.c @@ -1316,7 +1316,7 @@ void compile_nonlocal_stmt(compiler_t *comp, mp_parse_node_struct_t *pns) { void compile_assert_stmt(compiler_t *comp, mp_parse_node_struct_t *pns) { int l_end = comp_next_label(comp); c_if_cond(comp, pns->nodes[0], true, l_end); - EMIT(load_id, MP_QSTR_AssertionError); + EMIT(load_global, MP_QSTR_AssertionError); // we load_global instead of load_id, to be consistent with CPython if (!MP_PARSE_NODE_IS_NULL(pns->nodes[1])) { // assertion message compile_node(comp, pns->nodes[1]); diff --git a/py/emitpass1.c b/py/emitpass1.c index 2f0ecac86..60fdd0b82 100644 --- a/py/emitpass1.c +++ b/py/emitpass1.c @@ -45,10 +45,7 @@ static void emit_pass1_load_id(emit_t *emit, qstr qstr) { bool added; id_info_t *id = scope_find_or_add_id(emit->scope, qstr, &added); if (added) { - if (qstr == MP_QSTR_AssertionError) { - // TODO how much of a hack is this? - id->kind = ID_INFO_KIND_GLOBAL_EXPLICIT; - } else if (strcmp(qstr_str(qstr), "super") == 0 && emit->scope->kind == SCOPE_FUNCTION) { + if (strcmp(qstr_str(qstr), "super") == 0 && emit->scope->kind == SCOPE_FUNCTION) { // special case, super is a global, and also counts as use of __class__ id->kind = ID_INFO_KIND_GLOBAL_EXPLICIT; id_info_t *id2 = scope_find_local_in_parent(emit->scope, emit->qstr___class__); diff --git a/py/runtime.c b/py/runtime.c index 409d1d826..8d3e90028 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -90,6 +90,7 @@ void rt_init(void) { mp_map_add_qstr(&map_builtins, MP_QSTR_SyntaxError, mp_obj_new_exception(MP_QSTR_SyntaxError)); mp_map_add_qstr(&map_builtins, MP_QSTR_ValueError, mp_obj_new_exception(MP_QSTR_ValueError)); mp_map_add_qstr(&map_builtins, MP_QSTR_OSError, mp_obj_new_exception(MP_QSTR_OSError)); + mp_map_add_qstr(&map_builtins, MP_QSTR_AssertionError, mp_obj_new_exception(MP_QSTR_AssertionError)); // built-in objects mp_map_add_qstr(&map_builtins, MP_QSTR_Ellipsis, mp_const_ellipsis); @@ -553,6 +554,8 @@ mp_obj_t rt_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs) { if (fit_small_int(lhs_val)) { return MP_OBJ_NEW_SMALL_INT(lhs_val); } + // TODO: return long int + assert(0); } else if (MP_OBJ_IS_TYPE(rhs, &float_type)) { return mp_obj_float_binary_op(op, lhs_val, rhs); } else if (MP_OBJ_IS_TYPE(rhs, &complex_type)) { |