comparison truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/PolyglotEngine.java @ 22344:ed3b78bbfa81

TruffleObject is truffleReady
author Mick Jordan <mick.jordan@oracle.com>
date Wed, 04 Nov 2015 20:31:27 -0800
parents 906a5f6e07cc
children b1c71f0c1a85
comparison
equal deleted inserted replaced
22340:bb3c03f2442d 22344:ed3b78bbfa81
290 * @throws IllegalArgumentException if the object isn't of primitive type and cannot be 290 * @throws IllegalArgumentException if the object isn't of primitive type and cannot be
291 * converted to {@link TruffleObject} 291 * converted to {@link TruffleObject}
292 */ 292 */
293 public Builder globalSymbol(String name, Object obj) { 293 public Builder globalSymbol(String name, Object obj) {
294 final Object truffleReady; 294 final Object truffleReady;
295 if (obj instanceof Number || obj instanceof String || obj instanceof Character || obj instanceof Boolean) { 295 if (obj instanceof TruffleObject || obj instanceof Number || obj instanceof String || obj instanceof Character || obj instanceof Boolean) {
296 truffleReady = obj; 296 truffleReady = obj;
297 } else { 297 } else {
298 if (JAVA_INTEROP_ENABLED) { 298 if (JAVA_INTEROP_ENABLED) {
299 truffleReady = JavaInterop.asTruffleObject(obj); 299 truffleReady = JavaInterop.asTruffleObject(obj);
300 } else { 300 } else {