changeset 16066:f59498d6e8b1

Merged
author Christian Wirth <christian.wirth@oracle.com>
date Fri, 06 Jun 2014 21:36:56 +0200
parents 87414e322d45 (diff) 03eda0a202e9 (current diff)
children 915ebb306fcc
files
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java	Fri Jun 06 11:06:42 2014 -0700
+++ b/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java	Fri Jun 06 21:36:56 2014 +0200
@@ -246,9 +246,7 @@
 
     @SlowPath
     public Iterable<FrameInstance> getStackTrace() {
-        if (stackIntrospection == null) {
-            stackIntrospection = Graal.getRequiredCapability(StackIntrospection.class);
-        }
+        initStackIntrospection();
         final Iterator<InspectedFrame> frames = stackIntrospection.getStackTrace(anyFrameMethod, anyFrameMethod, 1).iterator();
         class FrameIterator implements Iterator<FrameInstance> {
 
@@ -276,10 +274,15 @@
         };
     }
 
-    public FrameInstance getCurrentFrame() {
+    private void initStackIntrospection() {
         if (stackIntrospection == null) {
             stackIntrospection = Graal.getRequiredCapability(StackIntrospection.class);
         }
+    }
+
+    @SlowPath
+    public FrameInstance getCurrentFrame() {
+        initStackIntrospection();
         Iterator<InspectedFrame> frames = stackIntrospection.getStackTrace(callTargetMethod, callTargetMethod, 0).iterator();
         if (frames.hasNext()) {
             return new HotSpotFrameInstance.CallTargetFrame(frames.next(), true);