}
op(_BINARY_OP_ADD_INT, (left, right -- res)) {
- if (sym_is_const(ctx, left) && sym_is_const(ctx, right) &&
- sym_matches_type(left, &PyLong_Type) && sym_matches_type(right, &PyLong_Type))
- {
+ if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
assert(PyLong_CheckExact(sym_get_const(ctx, left)));
assert(PyLong_CheckExact(sym_get_const(ctx, right)));
PyObject *temp = _PyLong_Add((PyLongObject *)sym_get_const(ctx, left),
}
op(_BINARY_OP_SUBTRACT_INT, (left, right -- res)) {
- if (sym_is_const(ctx, left) && sym_is_const(ctx, right) &&
- sym_matches_type(left, &PyLong_Type) && sym_matches_type(right, &PyLong_Type))
- {
+ if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
assert(PyLong_CheckExact(sym_get_const(ctx, left)));
assert(PyLong_CheckExact(sym_get_const(ctx, right)));
PyObject *temp = _PyLong_Subtract((PyLongObject *)sym_get_const(ctx, left),
}
op(_BINARY_OP_MULTIPLY_INT, (left, right -- res)) {
- if (sym_is_const(ctx, left) && sym_is_const(ctx, right) &&
- sym_matches_type(left, &PyLong_Type) && sym_matches_type(right, &PyLong_Type))
- {
+ if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
assert(PyLong_CheckExact(sym_get_const(ctx, left)));
assert(PyLong_CheckExact(sym_get_const(ctx, right)));
PyObject *temp = _PyLong_Multiply((PyLongObject *)sym_get_const(ctx, left),
}
op(_BINARY_OP_ADD_FLOAT, (left, right -- res)) {
- if (sym_is_const(ctx, left) && sym_is_const(ctx, right) &&
- sym_matches_type(left, &PyFloat_Type) && sym_matches_type(right, &PyFloat_Type))
- {
+ if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
assert(PyFloat_CheckExact(sym_get_const(ctx, left)));
assert(PyFloat_CheckExact(sym_get_const(ctx, right)));
PyObject *temp = PyFloat_FromDouble(
}
op(_BINARY_OP_SUBTRACT_FLOAT, (left, right -- res)) {
- if (sym_is_const(ctx, left) && sym_is_const(ctx, right) &&
- sym_matches_type(left, &PyFloat_Type) && sym_matches_type(right, &PyFloat_Type))
- {
+ if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
assert(PyFloat_CheckExact(sym_get_const(ctx, left)));
assert(PyFloat_CheckExact(sym_get_const(ctx, right)));
PyObject *temp = PyFloat_FromDouble(
}
op(_BINARY_OP_MULTIPLY_FLOAT, (left, right -- res)) {
- if (sym_is_const(ctx, left) && sym_is_const(ctx, right) &&
- sym_matches_type(left, &PyFloat_Type) && sym_matches_type(right, &PyFloat_Type))
- {
+ if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
assert(PyFloat_CheckExact(sym_get_const(ctx, left)));
assert(PyFloat_CheckExact(sym_get_const(ctx, right)));
PyObject *temp = PyFloat_FromDouble(
}
op(_BINARY_OP_ADD_UNICODE, (left, right -- res)) {
- if (sym_is_const(ctx, left) && sym_is_const(ctx, right) &&
- sym_matches_type(left, &PyUnicode_Type) && sym_matches_type(right, &PyUnicode_Type)) {
+ if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
+ assert(PyUnicode_CheckExact(sym_get_const(ctx, left)));
+ assert(PyUnicode_CheckExact(sym_get_const(ctx, right)));
PyObject *temp = PyUnicode_Concat(sym_get_const(ctx, left), sym_get_const(ctx, right));
if (temp == NULL) {
goto error;
op(_BINARY_OP_INPLACE_ADD_UNICODE, (left, right -- )) {
JitOptSymbol *res;
- if (sym_is_const(ctx, left) && sym_is_const(ctx, right) &&
- sym_matches_type(left, &PyUnicode_Type) && sym_matches_type(right, &PyUnicode_Type)) {
+ if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
+ assert(PyUnicode_CheckExact(sym_get_const(ctx, left)));
+ assert(PyUnicode_CheckExact(sym_get_const(ctx, right)));
PyObject *temp = PyUnicode_Concat(sym_get_const(ctx, left), sym_get_const(ctx, right));
if (temp == NULL) {
goto error;
}
op(_COMPARE_OP_INT, (left, right -- res)) {
- if (sym_is_const(ctx, left) && sym_is_const(ctx, right))
- {
+ if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
assert(PyLong_CheckExact(sym_get_const(ctx, left)));
assert(PyLong_CheckExact(sym_get_const(ctx, right)));
PyObject *tmp = PyObject_RichCompare(sym_get_const(ctx, left),
JitOptSymbol *res;
right = stack_pointer[-1];
left = stack_pointer[-2];
- if (sym_is_const(ctx, left) && sym_is_const(ctx, right) &&
- sym_matches_type(left, &PyLong_Type) && sym_matches_type(right, &PyLong_Type))
- {
+ if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
assert(PyLong_CheckExact(sym_get_const(ctx, left)));
assert(PyLong_CheckExact(sym_get_const(ctx, right)));
PyObject *temp = _PyLong_Multiply((PyLongObject *)sym_get_const(ctx, left),
JitOptSymbol *res;
right = stack_pointer[-1];
left = stack_pointer[-2];
- if (sym_is_const(ctx, left) && sym_is_const(ctx, right) &&
- sym_matches_type(left, &PyLong_Type) && sym_matches_type(right, &PyLong_Type))
- {
+ if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
assert(PyLong_CheckExact(sym_get_const(ctx, left)));
assert(PyLong_CheckExact(sym_get_const(ctx, right)));
PyObject *temp = _PyLong_Add((PyLongObject *)sym_get_const(ctx, left),
JitOptSymbol *res;
right = stack_pointer[-1];
left = stack_pointer[-2];
- if (sym_is_const(ctx, left) && sym_is_const(ctx, right) &&
- sym_matches_type(left, &PyLong_Type) && sym_matches_type(right, &PyLong_Type))
- {
+ if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
assert(PyLong_CheckExact(sym_get_const(ctx, left)));
assert(PyLong_CheckExact(sym_get_const(ctx, right)));
PyObject *temp = _PyLong_Subtract((PyLongObject *)sym_get_const(ctx, left),
JitOptSymbol *res;
right = stack_pointer[-1];
left = stack_pointer[-2];
- if (sym_is_const(ctx, left) && sym_is_const(ctx, right) &&
- sym_matches_type(left, &PyFloat_Type) && sym_matches_type(right, &PyFloat_Type))
- {
+ if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
assert(PyFloat_CheckExact(sym_get_const(ctx, left)));
assert(PyFloat_CheckExact(sym_get_const(ctx, right)));
PyObject *temp = PyFloat_FromDouble(
JitOptSymbol *res;
right = stack_pointer[-1];
left = stack_pointer[-2];
- if (sym_is_const(ctx, left) && sym_is_const(ctx, right) &&
- sym_matches_type(left, &PyFloat_Type) && sym_matches_type(right, &PyFloat_Type))
- {
+ if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
assert(PyFloat_CheckExact(sym_get_const(ctx, left)));
assert(PyFloat_CheckExact(sym_get_const(ctx, right)));
PyObject *temp = PyFloat_FromDouble(
JitOptSymbol *res;
right = stack_pointer[-1];
left = stack_pointer[-2];
- if (sym_is_const(ctx, left) && sym_is_const(ctx, right) &&
- sym_matches_type(left, &PyFloat_Type) && sym_matches_type(right, &PyFloat_Type))
- {
+ if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
assert(PyFloat_CheckExact(sym_get_const(ctx, left)));
assert(PyFloat_CheckExact(sym_get_const(ctx, right)));
PyObject *temp = PyFloat_FromDouble(
JitOptSymbol *res;
right = stack_pointer[-1];
left = stack_pointer[-2];
- if (sym_is_const(ctx, left) && sym_is_const(ctx, right) &&
- sym_matches_type(left, &PyUnicode_Type) && sym_matches_type(right, &PyUnicode_Type)) {
+ if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
+ assert(PyUnicode_CheckExact(sym_get_const(ctx, left)));
+ assert(PyUnicode_CheckExact(sym_get_const(ctx, right)));
PyObject *temp = PyUnicode_Concat(sym_get_const(ctx, left), sym_get_const(ctx, right));
if (temp == NULL) {
goto error;
right = stack_pointer[-1];
left = stack_pointer[-2];
JitOptSymbol *res;
- if (sym_is_const(ctx, left) && sym_is_const(ctx, right) &&
- sym_matches_type(left, &PyUnicode_Type) && sym_matches_type(right, &PyUnicode_Type)) {
+ if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
+ assert(PyUnicode_CheckExact(sym_get_const(ctx, left)));
+ assert(PyUnicode_CheckExact(sym_get_const(ctx, right)));
PyObject *temp = PyUnicode_Concat(sym_get_const(ctx, left), sym_get_const(ctx, right));
if (temp == NULL) {
goto error;
JitOptSymbol *res;
right = stack_pointer[-1];
left = stack_pointer[-2];
- if (sym_is_const(ctx, left) && sym_is_const(ctx, right))
- {
+ if (sym_is_const(ctx, left) && sym_is_const(ctx, right)) {
assert(PyLong_CheckExact(sym_get_const(ctx, left)));
assert(PyLong_CheckExact(sym_get_const(ctx, right)));
PyObject *tmp = PyObject_RichCompare(sym_get_const(ctx, left),