|
34 | 34 | #include "setobject.h"
|
35 | 35 | #include "structmember.h" // struct PyMemberDef, T_OFFSET_EX
|
36 | 36 |
|
37 |
| -void _PyFloat_ExactDealloc(PyObject *); |
38 |
| -void _PyUnicode_ExactDealloc(PyObject *); |
39 |
| - |
40 |
| -/* Stack effect macros |
41 |
| - * These will be mostly replaced by stack effect descriptions, |
42 |
| - * but the tooling need to recognize them. |
43 |
| - */ |
44 |
| -#define SET_TOP(v) (stack_pointer[-1] = (v)) |
45 |
| -#define SET_SECOND(v) (stack_pointer[-2] = (v)) |
46 |
| -#define PEEK(n) (stack_pointer[-(n)]) |
47 |
| -#define POKE(n, v) (stack_pointer[-(n)] = (v)) |
48 |
| -#define PUSH(val) (*(stack_pointer++) = (val)) |
49 |
| -#define POP() (*(--stack_pointer)) |
50 |
| -#define TOP() PEEK(1) |
51 |
| -#define SECOND() PEEK(2) |
52 |
| -#define STACK_GROW(n) (stack_pointer += (n)) |
53 |
| -#define STACK_SHRINK(n) (stack_pointer -= (n)) |
54 |
| -#define EMPTY() 1 |
55 |
| -#define STACK_LEVEL() 2 |
56 |
| - |
57 |
| -/* Local variable macros */ |
58 |
| -#define GETLOCAL(i) (frame->localsplus[i]) |
59 |
| -#define SETLOCAL(i, val) \ |
60 |
| -do { \ |
61 |
| - PyObject *_tmp = frame->localsplus[i]; \ |
62 |
| - frame->localsplus[i] = (val); \ |
63 |
| - Py_XDECREF(_tmp); \ |
64 |
| -} while (0) |
| 37 | +#define USE_COMPUTED_GOTOS 0 |
| 38 | +#include "ceval_macros.h" |
65 | 39 |
|
66 | 40 | /* Flow control macros */
|
67 | 41 | #define DEOPT_IF(cond, instname) ((void)0)
|
68 | 42 | #define ERROR_IF(cond, labelname) ((void)0)
|
69 |
| -#define JUMPBY(offset) ((void)0) |
70 | 43 | #define GO_TO_INSTRUCTION(instname) ((void)0)
|
71 |
| -#define DISPATCH_SAME_OPARG() ((void)0) |
| 44 | +#define PREDICT(opname) ((void)0) |
72 | 45 |
|
73 | 46 | #define inst(name, ...) case name:
|
74 | 47 | #define op(name, ...) /* NAME is ignored */
|
75 | 48 | #define macro(name) static int MACRO_##name
|
76 | 49 | #define super(name) static int SUPER_##name
|
77 | 50 | #define family(name, ...) static int family_##name
|
78 | 51 |
|
79 |
| -#define NAME_ERROR_MSG \ |
80 |
| - "name '%.200s' is not defined" |
81 |
| - |
82 | 52 | // Dummy variables for stack effects.
|
83 | 53 | static PyObject *value, *value1, *value2, *left, *right, *res, *sum, *prod, *sub;
|
84 | 54 | static PyObject *container, *start, *stop, *v, *lhs, *rhs;
|
85 |
| -static PyObject *list, *tuple, *dict, *owner; |
| 55 | +static PyObject *list, *tuple, *dict, *owner, *set, *str, *tup, *map, *keys; |
86 | 56 | static PyObject *exit_func, *lasti, *val, *retval, *obj, *iter;
|
87 | 57 | static PyObject *aiter, *awaitable, *iterable, *w, *exc_value, *bc;
|
88 | 58 | static PyObject *orig, *excs, *update, *b, *fromlist, *level, *from;
|
| 59 | +static PyObject **pieces, **values; |
89 | 60 | static size_t jump;
|
90 | 61 | // Dummy variables for cache effects
|
91 | 62 | static uint16_t invert, counter, index, hint;
|
@@ -456,7 +427,7 @@ dummy_func(
|
456 | 427 | PREDICT(JUMP_BACKWARD);
|
457 | 428 | }
|
458 | 429 |
|
459 |
| - inst(SET_ADD, (set, unused[oparg-1], v -- set, unused[oparg-1])) { |
| 430 | + inst(SET_ADD, (set, unused[oparg-1], v -- set, unused[oparg-1])) { |
460 | 431 | int err = PySet_Add(set, v);
|
461 | 432 | Py_DECREF(v);
|
462 | 433 | ERROR_IF(err, error);
|
@@ -3336,8 +3307,10 @@ dummy_func(
|
3336 | 3307 | // END BYTECODES //
|
3337 | 3308 |
|
3338 | 3309 | }
|
| 3310 | + dispatch_opcode: |
3339 | 3311 | error:
|
3340 | 3312 | exception_unwind:
|
| 3313 | + exit_unwind: |
3341 | 3314 | handle_eval_breaker:
|
3342 | 3315 | resume_frame:
|
3343 | 3316 | resume_with_error:
|
|
0 commit comments