• Home
  • Raw
  • Download

Lines Matching refs:stack_effect

6 from _opcode import stack_effect
12 self.assertEqual(stack_effect(dis.opmap['POP_TOP']), -1)
13 self.assertEqual(stack_effect(dis.opmap['DUP_TOP_TWO']), 2)
14 self.assertEqual(stack_effect(dis.opmap['BUILD_SLICE'], 0), -1)
15 self.assertEqual(stack_effect(dis.opmap['BUILD_SLICE'], 1), -1)
16 self.assertEqual(stack_effect(dis.opmap['BUILD_SLICE'], 3), -2)
17 self.assertRaises(ValueError, stack_effect, 30000)
18 self.assertRaises(ValueError, stack_effect, dis.opmap['BUILD_SLICE'])
19 self.assertRaises(ValueError, stack_effect, dis.opmap['POP_TOP'], 0)
24 stack_effect(code)
25 self.assertRaises(ValueError, stack_effect, code, 0)
27 stack_effect(code, 0)
28 self.assertRaises(ValueError, stack_effect, code)
32 self.assertRaises(ValueError, stack_effect, code)
33 self.assertRaises(ValueError, stack_effect, code, 0)
37 self.assertEqual(stack_effect(JUMP_IF_TRUE_OR_POP, 0), 0)
38 self.assertEqual(stack_effect(JUMP_IF_TRUE_OR_POP, 0, jump=True), 0)
39 self.assertEqual(stack_effect(JUMP_IF_TRUE_OR_POP, 0, jump=False), -1)
41 self.assertEqual(stack_effect(FOR_ITER, 0), 1)
42 self.assertEqual(stack_effect(FOR_ITER, 0, jump=True), -1)
43 self.assertEqual(stack_effect(FOR_ITER, 0, jump=False), 1)
45 self.assertEqual(stack_effect(JUMP_FORWARD, 0), 0)
46 self.assertEqual(stack_effect(JUMP_FORWARD, 0, jump=True), 0)
47 self.assertEqual(stack_effect(JUMP_FORWARD, 0, jump=False), 0)
53 common = stack_effect(code)
54 jump = stack_effect(code, jump=True)
55 nojump = stack_effect(code, jump=False)
57 common = stack_effect(code, 0)
58 jump = stack_effect(code, 0, jump=True)
59 nojump = stack_effect(code, 0, jump=False)