comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLUninitializedDispatchNode.java @ 13836:64c77f0577bb

More documentation and improvements of Simple Language
author Christian Wimmer <christian.wimmer@oracle.com>
date Thu, 30 Jan 2014 17:53:27 -0800
parents b16ec83edc73
children 89ac75425681
comparison
equal deleted inserted replaced
13835:67e4e7f56911 13836:64c77f0577bb
63 63
64 } else if (depth < INLINE_CACHE_SIZE) { 64 } else if (depth < INLINE_CACHE_SIZE) {
65 /* Extend the inline cache. Allocate the new cache entry, and the new end of the cache. */ 65 /* Extend the inline cache. Allocate the new cache entry, and the new end of the cache. */
66 SLAbstractDispatchNode next = new SLUninitializedDispatchNode(); 66 SLAbstractDispatchNode next = new SLUninitializedDispatchNode();
67 SLAbstractDispatchNode direct = new SLDirectDispatchNode(next, function); 67 SLAbstractDispatchNode direct = new SLDirectDispatchNode(next, function);
68 /* Replace ourselfs with the new cache entry. */ 68 /* Replace ourself with the new cache entry. */
69 specialized = replace(direct); 69 specialized = replace(direct);
70 70
71 } else { 71 } else {
72 /* Cache size exceeded, fall back to a single generic dispatch node. */ 72 /* Cache size exceeded, fall back to a single generic dispatch node. */
73 SLAbstractDispatchNode generic = new SLGenericDispatchNode(); 73 SLAbstractDispatchNode generic = new SLGenericDispatchNode();
74 /* Replace the whole chain, not just ourselfs, with the new generic node. */ 74 /* Replace the whole chain, not just ourself, with the new generic node. */
75 specialized = callNode.dispatchNode.replace(generic); 75 specialized = callNode.dispatchNode.replace(generic);
76 } 76 }
77 77
78 /* 78 /*
79 * Execute the newly created node perform the actual dispatch. That saves us from 79 * Execute the newly created node perform the actual dispatch. That saves us from