Searched refs:codestr (Results 1 – 10 of 10) sorted by relevance
/external/python/cpython2/Python/ |
D | peephole.c | 37 tuple_of_constants(unsigned char *codestr, Py_ssize_t n, PyObject *consts) in tuple_of_constants() argument 44 assert(codestr[n*3] == BUILD_TUPLE || codestr[n*3] == BUILD_LIST); in tuple_of_constants() 45 assert(GETARG(codestr, (n*3)) == n); in tuple_of_constants() 47 assert(codestr[i*3] == LOAD_CONST); in tuple_of_constants() 55 arg = GETARG(codestr, (i*3)); in tuple_of_constants() 71 memset(codestr, NOP, n*3); in tuple_of_constants() 72 codestr[n*3] = LOAD_CONST; in tuple_of_constants() 73 SETARG(codestr, (n*3), len_consts); in tuple_of_constants() 88 fold_binops_on_constants(unsigned char *codestr, PyObject *consts) in fold_binops_on_constants() argument 96 assert(codestr[0] == LOAD_CONST); in fold_binops_on_constants() [all …]
|
/external/python/cpython3/Python/ |
D | peephole.c | 31 lastn_const_start(const _Py_CODEUNIT *codestr, Py_ssize_t i, Py_ssize_t n) in lastn_const_start() argument 37 if (_Py_OPCODE(codestr[i]) == LOAD_CONST) { in lastn_const_start() 39 while (i > 0 && _Py_OPCODE(codestr[i-1]) == EXTENDED_ARG) { in lastn_const_start() 46 assert(_Py_OPCODE(codestr[i]) == EXTENDED_ARG); in lastn_const_start() 53 find_op(const _Py_CODEUNIT *codestr, Py_ssize_t codelen, Py_ssize_t i) in find_op() argument 55 while (i < codelen && _Py_OPCODE(codestr[i]) == EXTENDED_ARG) { in find_op() 64 get_arg(const _Py_CODEUNIT *codestr, Py_ssize_t i) in get_arg() argument 67 unsigned int oparg = _Py_OPARG(codestr[i]); in get_arg() 68 if (i >= 1 && _Py_OPCODE(word = codestr[i-1]) == EXTENDED_ARG) { in get_arg() 70 if (i >= 2 && _Py_OPCODE(word = codestr[i-2]) == EXTENDED_ARG) { in get_arg() [all …]
|
D | wordcode_helpers.h | 25 write_op_arg(_Py_CODEUNIT *codestr, unsigned char opcode, in write_op_arg() argument 30 *codestr++ = PACKOPARG(EXTENDED_ARG, (oparg >> 24) & 0xff); in write_op_arg() 33 *codestr++ = PACKOPARG(EXTENDED_ARG, (oparg >> 16) & 0xff); in write_op_arg() 36 *codestr++ = PACKOPARG(EXTENDED_ARG, (oparg >> 8) & 0xff); in write_op_arg() 39 *codestr++ = PACKOPARG(opcode, oparg & 0xff); in write_op_arg()
|
/external/python/cpython2/Lib/test/ |
D | test_new.py | 65 codestr = ''' 72 codestr = "\n".join(l.strip() for l in codestr.splitlines()) 74 ccode = compile(codestr, '<string>', 'exec')
|
D | test_decorators.py | 161 codestr = "@%s\ndef f(): pass" % expr 162 self.assertRaises(SyntaxError, compile, codestr, "test", "exec") 179 codestr = "@%s\ndef f(): pass\nassert f() is None" % expr 180 code = compile(codestr, "test", "exec")
|
D | test_with.py | 133 def assertRaisesSyntaxError(self, codestr): argument 136 self.assertRaises(SyntaxError, shouldRaiseSyntaxError, codestr)
|
/external/python/cpython3/Lib/test/ |
D | test_decorators.py | 160 codestr = "@%s\ndef f(): pass" % expr 161 self.assertRaises(SyntaxError, compile, codestr, "test", "exec") 178 codestr = "@%s\ndef f(): pass\nassert f() is None" % expr 179 code = compile(codestr, "test", "exec")
|
D | test_keywordonlyarg.py | 38 def assertRaisesSyntaxError(self, codestr): argument 41 self.assertRaises(SyntaxError, shouldRaiseSyntaxError, codestr)
|
D | test_with.py | 141 def assertRaisesSyntaxError(self, codestr): argument 144 self.assertRaises(SyntaxError, shouldRaiseSyntaxError, codestr)
|
D | test_builtin.py | 332 codestr = '''def f(): 352 codeobjs.append(compile(codestr, "<test>", "exec", optimize=optval)) 353 tree = ast.parse(codestr)
|