cpython: 1eee26b74e4b (original) (raw)

Mercurial > cpython

changeset 94656:1eee26b74e4b

Issue #23450: Silenced compiler warnings and added asserts in peephole optimizer. [#23450]

Serhiy Storchaka storchaka@gmail.com
date Mon, 16 Feb 2015 21:13:24 +0200
parents c0e79e080307
children f47d683b6c9e
files Python/peephole.c
diffstat 1 files changed, 9 insertions(+), 3 deletions(-)[+] [-] Python/peephole.c 12

line wrap: on

line diff

--- a/Python/peephole.c +++ b/Python/peephole.c @@ -18,7 +18,11 @@ || op==JUMP_IF_FALSE_OR_POP || op==JUMP_IF_TRUE_OR_POP) #define JUMPS_ON_TRUE(op) (op==POP_JUMP_IF_TRUE || op==JUMP_IF_TRUE_OR_POP) #define GETJUMPTGT(arr, i) (GETARG(arr,i) + (ABSOLUTE_JUMP(arr[i]) ? 0 : i+3)) -#define SETARG(arr, i, val) arr[i+2] = val>>8; arr[i+1] = val & 255 +#define SETARG(arr, i, val) do { [](#l1.8)

+} while(0) #define CODESIZE(op) (HAS_ARG(op) ? 3 : 1) #define ISBASICBLOCK(blocks, start, bytes) [](#l1.14) (blocks[start]==blocks[start+bytes-1]) @@ -355,7 +359,8 @@ PyCode_Optimize(PyObject *code, PyObject unsigned char *codestr = NULL; unsigned char *lineno; int *addrmap = NULL;