Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2476)

Unified Diff: cgen/templates/default/load_build_class

Issue 14757: INCA: Inline Caching meets Quickening in Python 3.3
Patch Set: Created 1 year ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cgen/templates/default/load_attr ('k') | cgen/templates/default/load_closure » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cgen/templates/default/load_build_class Thu Apr 26 11:08:47 2012 -0700
@@ -0,0 +1,29 @@
+
+ TARGET(LOAD_BUILD_CLASS)
+ {
+ _Py_IDENTIFIER(__build_class__);
+
+ if (PyDict_CheckExact(f->f_builtins)) {
+ x = _PyDict_GetItemId(f->f_builtins, &PyId___build_class__);
+ if (x == NULL) {
+ PyErr_SetString(PyExc_NameError,
+ "__build_class__ not found");
+ goto on_error;;
+ }
+ Py_INCREF(x);
+ }
+ else {
+ PyObject *build_class_str = _PyUnicode_FromId(&PyId___build_class__);
+ if (build_class_str == NULL)
+ goto on_error;;
+ x = PyObject_GetItem(f->f_builtins, build_class_str);
+ if (x == NULL) {
+ if (PyErr_ExceptionMatches(PyExc_KeyError))
+ PyErr_SetString(PyExc_NameError,
+ "__build_class__ not found");
+ goto on_error;;
+ }
+ }
+ PUSH(x);
+ goto on_error;;
+ }
« no previous file with comments | « cgen/templates/default/load_attr ('k') | cgen/templates/default/load_closure » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7