--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cgen/templates/default/binary_add Fri May 11 14:23:26 2012 -0700 @@ -0,0 +1,20 @@ + + TARGET(BINARY_ADD) + w = POP(); + v = TOP(); + if (PyUnicode_CheckExact(v) && + PyUnicode_CheckExact(w)) { + PyEval_SetCurInstr(INCA_ADD_STRINGS, 0); + x = unicode_concatenate(v, w, f, next_instr); + /* unicode_concatenate consumed the ref to v */ + goto skip_decref_vx; + } + else { + x = PyNumber_Add(v, w); + } + Py_DECREF(v); + skip_decref_vx: + Py_DECREF(w); + SET_TOP(x); + if (x != NULL) DISPATCH(); + goto on_error;;