Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/call/SLGenericDispatchNode.java @ 15064:f675818d9ad0
new getStackTrace and getCurrentFrame functionality in TruffleRuntime
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Fri, 11 Apr 2014 11:53:11 +0200 |
parents | 64dcb92ee75a |
children | d3add9b82b71 |
comparison
equal
deleted
inserted
replaced
15063:36e1a11a72b3 | 15064:f675818d9ad0 |
---|---|
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 package com.oracle.truffle.sl.nodes.call; | 23 package com.oracle.truffle.sl.nodes.call; |
24 | 24 |
25 import com.oracle.truffle.api.CompilerDirectives.CompilationFinal; | |
25 import com.oracle.truffle.api.frame.*; | 26 import com.oracle.truffle.api.frame.*; |
27 import com.oracle.truffle.api.frame.FrameInstance.FrameAccess; | |
28 import com.oracle.truffle.api.impl.*; | |
26 import com.oracle.truffle.sl.runtime.*; | 29 import com.oracle.truffle.sl.runtime.*; |
27 | 30 |
28 /** | 31 /** |
29 * Slow-path code for a call, used when the polymorphic inline cache exceeded its maximum size. Such | 32 * Slow-path code for a call, used when the polymorphic inline cache exceeded its maximum size. Such |
30 * calls are not optimized any further, e.g., no method inlining is performed. | 33 * calls are not optimized any further, e.g., no method inlining is performed. |
31 */ | 34 */ |
32 final class SLGenericDispatchNode extends SLAbstractDispatchNode { | 35 final class SLGenericDispatchNode extends SLAbstractDispatchNode implements MaterializedFrameNotify { |
36 | |
37 @CompilationFinal private FrameAccess outsideFrameAccess = FrameAccess.NONE; | |
33 | 38 |
34 @Override | 39 @Override |
35 protected Object executeDispatch(VirtualFrame frame, SLFunction function, Object[] arguments) { | 40 protected Object executeDispatch(VirtualFrame frame, SLFunction function, Object[] arguments) { |
36 /* | 41 /* |
37 * SL has a quite simple call lookup: just ask the function for the current call target, and | 42 * SL has a quite simple call lookup: just ask the function for the current call target, and |
38 * call it. | 43 * call it. |
39 */ | 44 */ |
40 return function.getCallTarget().call(arguments); | 45 return DefaultCallNode.callProxy(this, function.getCallTarget(), frame, arguments); |
46 } | |
47 | |
48 public FrameAccess getOutsideFrameAccess() { | |
49 return outsideFrameAccess; | |
50 } | |
51 | |
52 public void setOutsideFrameAccess(FrameAccess outsideFrameAccess) { | |
53 this.outsideFrameAccess = outsideFrameAccess; | |
41 } | 54 } |
42 } | 55 } |