diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-09-30 13:55:30 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-09-30 13:55:30 +0200 |
commit | 1904cd9dda6dadf396c1f28031346bdc035d420d (patch) | |
tree | ca0b9c637e5554446b6266b255c9e303407d3d7b /Python/compile.c | |
parent | 9a9e274a15370bb90a4856f9dabbc512fe565ce8 (diff) | |
parent | 8d799851fb876c167930eed7d0b23fada08a08d8 (diff) | |
download | cpython-1904cd9dda6dadf396c1f28031346bdc035d420d.tar.gz |
(Merge 3.4) faulthandler: test_gil_released() now uses _sigsegv() instead of
_read_null(), because _read_null() cannot be used on AIX. On AIX, reading from
NULL is allowed: the first page of memory is a mapped read-only on AIX.
_read_null() and _sigabrt() don't accept parameters.
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Python/compile.c b/Python/compile.c index 69419ecddc..e46ec6ceda 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -881,6 +881,7 @@ PyCompile_OpcodeStackEffect(int opcode, int oparg) case BINARY_POWER: case BINARY_MULTIPLY: + case BINARY_MATRIX_MULTIPLY: case BINARY_MODULO: case BINARY_ADD: case BINARY_SUBTRACT: @@ -895,6 +896,7 @@ PyCompile_OpcodeStackEffect(int opcode, int oparg) case INPLACE_ADD: case INPLACE_SUBTRACT: case INPLACE_MULTIPLY: + case INPLACE_MATRIX_MULTIPLY: case INPLACE_MODULO: return -1; case STORE_SUBSCR: @@ -1938,7 +1940,7 @@ compiler_if(struct compiler *c, stmt_ty s) } else if (constant == 1) { VISIT_SEQ(c, stmt, s->v.If.body); } else { - if (s->v.If.orelse) { + if (asdl_seq_LEN(s->v.If.orelse)) { next = compiler_new_block(c); if (next == NULL) return 0; @@ -1948,8 +1950,8 @@ compiler_if(struct compiler *c, stmt_ty s) VISIT(c, expr, s->v.If.test); ADDOP_JABS(c, POP_JUMP_IF_FALSE, next); VISIT_SEQ(c, stmt, s->v.If.body); - ADDOP_JREL(c, JUMP_FORWARD, end); - if (s->v.If.orelse) { + if (asdl_seq_LEN(s->v.If.orelse)) { + ADDOP_JREL(c, JUMP_FORWARD, end); compiler_use_next_block(c, next); VISIT_SEQ(c, stmt, s->v.If.orelse); } @@ -2625,6 +2627,8 @@ binop(struct compiler *c, operator_ty op) return BINARY_SUBTRACT; case Mult: return BINARY_MULTIPLY; + case MatMult: + return BINARY_MATRIX_MULTIPLY; case Div: return BINARY_TRUE_DIVIDE; case Mod: @@ -2689,6 +2693,8 @@ inplace_binop(struct compiler *c, operator_ty op) return INPLACE_SUBTRACT; case Mult: return INPLACE_MULTIPLY; + case MatMult: + return INPLACE_MATRIX_MULTIPLY; case Div: return INPLACE_TRUE_DIVIDE; case Mod: |