Commits

Shashank Bharadwaj committed 39e0d96

added all new content on MethodHandles, and finished the new formatting

Comments (0)

Files changed (1)

jvmlangsummit-2011/slides.rst

 -------
 
 * Extend the same logic to:
+
   - Iterators
   - Decorators
 
 
    **Thank You!**
 
-
-But... ``call_function`` cannot inline
---------------------------------------
-
-+------------------------------------------------+----------------------------------------------+
-| .. code-block:: java                           | .. code-block:: java                         |
-|                                                |                                              |
-|    public PyObject f$1(PyFrame f,              |    public PyObject call(ThreadState ts,      |
-|                  ThreadState ts) {             |           PyObject a1, PyObject a2,          |
-|        // implementation                       |           PyObject a3) {                     |           
-|    }                                           |                                              |
-|                                                |        PyFrame frame = new PyFrame(this);    |
-|    PyFunction pyFunc = new PyFunction(f$1, .); |        frame.fastlocals[0] = a1;             |
-|    frame.setglobal("f", pyFunc);               |        frame.fastlocals[1] = a2;             |
-|                                                |        frame.fastlocals[2] = a3;             |
-|    frame.getglobal("f")                        |        call(ts, frame);                      |
-|         .__call__(_1, _2, _3);                 |    }                                         |
-|                                                |                                              |
-|    public PyObject call_function(int func_id,  |    public PyObject call(ThreadState ts,      |
-|           PyFrame f, ThreadState ts) {         |                         PyFrame frame) {     |
-|        switch(func_id){                        |        ...  // setup frame                   |
-|            case 1:                             |        call_function(func_id, frame, ts);    |
-|                return f$1(f, ts);              |    }                                         |
-|            ...                                 |                                              |
-|    }                                           |                                              |
-+------------------------------------------------+----------------------------------------------+
-
-
-.. raw:: pdf
-
-   PageBreak
-
-