comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultTruffleRuntime.java @ 19311:b54b548047ac

Truffle: also offer UnsafeAccessFactory in DefaultTruffleRuntime
author Andreas Woess <andreas.woess@jku.at>
date Thu, 12 Feb 2015 03:42:51 +0100
parents afa70d3e8159
children 48eeda5dfdbf
comparison
equal deleted inserted replaced
19310:3b2fd35f41b0 19311:b54b548047ac
27 import java.util.*; 27 import java.util.*;
28 28
29 import com.oracle.truffle.api.*; 29 import com.oracle.truffle.api.*;
30 import com.oracle.truffle.api.frame.*; 30 import com.oracle.truffle.api.frame.*;
31 import com.oracle.truffle.api.nodes.*; 31 import com.oracle.truffle.api.nodes.*;
32 import com.oracle.truffle.api.unsafe.*;
32 33
33 /** 34 /**
34 * Default implementation of the Truffle runtime if the virtual machine does not provide a better 35 * Default implementation of the Truffle runtime if the virtual machine does not provide a better
35 * performing alternative. 36 * performing alternative.
36 * <p> 37 * <p>
145 public FrameInstance getCurrentFrame() { 146 public FrameInstance getCurrentFrame() {
146 return currentFrames.get(); 147 return currentFrames.get();
147 } 148 }
148 149
149 public <T> T getCapability(Class<T> capability) { 150 public <T> T getCapability(Class<T> capability) {
151 if (capability == UnsafeAccessFactory.class) {
152 return capability.cast(new UnsafeAccessFactoryImpl());
153 }
150 return null; 154 return null;
151 } 155 }
152 156
153 public void notifyTransferToInterpreter() { 157 public void notifyTransferToInterpreter() {
154 } 158 }