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

Unified Diff: cgen/templates/IncaSubscriptDerivative

Issue 14757: INCA: Inline Caching meets Quickening in Python 3.3
Patch Set: Created 1 year, 1 month 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/IncaStringConcatDerivative ('k') | cgen/templates/IncaUnpackDerivative » ('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/IncaSubscriptDerivative Fri May 11 16:21:51 2012 -0700
@@ -0,0 +1,25 @@
+<%namespace file="base.impl" import="*"/>\
+\
+<%def name="extract_action_id(c_signature)">\
+${ c_signature.split('->')[-1][3:].upper() }\
+</%def>\
+
+ TARGET(INCA_${ extract_type_id( instr.type_id )}_${ extract_action_id( instr.function_id ) })
+ /* template: IncaSubscriptDerivative */
+ w= TOP();
+ v= SECOND();
+ u= THIRD();
+
+ if (INLINE_CACHE_MISS_UNARY(v, PyDict_Type))
+ goto TARGET_STORE_SUBSCR_SKIP_DISPATCH;;
+ STACKADJ(-3);
+
+ err= ${ instr.type_id }.tp_as_mapping->mp_ass_subscript( v, w, u );
+
+ Py_DECREF(v);
+ Py_DECREF(w);
+ Py_DECREF(u);
+
+ if (err == 0) DISPATCH();
+ goto on_error;
+
« no previous file with comments | « cgen/templates/IncaStringConcatDerivative ('k') | cgen/templates/IncaUnpackDerivative » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7