Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/RootCallTarget.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 | 1422f0bd55e3 |
children | b8ab8de26519 |
comparison
equal
deleted
inserted
replaced
15063:36e1a11a72b3 | 15064:f675818d9ad0 |
---|---|
22 * or visit www.oracle.com if you need additional information or have any | 22 * or visit www.oracle.com if you need additional information or have any |
23 * questions. | 23 * questions. |
24 */ | 24 */ |
25 package com.oracle.truffle.api; | 25 package com.oracle.truffle.api; |
26 | 26 |
27 import com.oracle.truffle.api.frame.*; | |
27 import com.oracle.truffle.api.nodes.*; | 28 import com.oracle.truffle.api.nodes.*; |
28 | 29 |
29 /** | 30 /** |
30 * Represents the target of a call to a {@link RootNode}, i.e., to another tree of nodes. Instances | 31 * Represents the target of a call to a {@link RootNode}, i.e., to another tree of nodes. Instances |
31 * of this class can be created using {@link TruffleRuntime#createCallTarget(RootNode)}. | 32 * of this class can be created using {@link TruffleRuntime#createCallTarget(RootNode)}. |
46 } | 47 } |
47 | 48 |
48 public final RootNode getRootNode() { | 49 public final RootNode getRootNode() { |
49 return rootNode; | 50 return rootNode; |
50 } | 51 } |
52 | |
53 protected final Object callProxy(VirtualFrame frame) { | |
54 try { | |
55 return getRootNode().execute(frame); | |
56 } finally { | |
57 // this assertion is needed to keep the values from being cleared as non-live locals | |
58 assert frame != null && this != null; | |
59 } | |
60 } | |
51 } | 61 } |