diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 517b046c2..d89a7e535 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -199,8 +199,8 @@ jobs: - name: Build and install TruffleSqueak component shell: pwsh run: | - mx --disable-installables=false build --dependencies=SMALLTALK_INSTALLABLE_BTRUFFLESQUEAK.EXE_JAVA11 - Copy-Item $(mx --disable-installables=false paths SMALLTALK_INSTALLABLE_BTRUFFLESQUEAK.EXE_JAVA11) -Destination "${pwd}\${env:INSTALLABLE_TARGET}" + mx --disable-installables=false build --dependencies=SMALLTALK_INSTALLABLE_JAVA11 + Copy-Item $(mx --disable-installables=false paths SMALLTALK_INSTALLABLE_JAVA11) -Destination "${pwd}\${env:INSTALLABLE_TARGET}" gu.cmd install -L "${pwd}\${env:INSTALLABLE_TARGET}" - name: Run SystemReporter on GraalVM run: 'trufflesqueak.cmd --jvm --code "String streamContents: [:s ^| SystemReporter new reportVM: s] limitedTo: 10000"' @@ -227,8 +227,8 @@ jobs: - name: Build and install TruffleSqueak component shell: pwsh run: | - mx --disable-installables=false build --dependencies=SMALLTALK_INSTALLABLE_BTRUFFLESQUEAK.EXE_JAVA8 - Copy-Item $(mx --disable-installables=false paths SMALLTALK_INSTALLABLE_BTRUFFLESQUEAK.EXE_JAVA8) -Destination "${pwd}\${env:INSTALLABLE_TARGET}" + mx --disable-installables=false build --dependencies=SMALLTALK_INSTALLABLE_JAVA8 + Copy-Item $(mx --disable-installables=false paths SMALLTALK_INSTALLABLE_JAVA8) -Destination "${pwd}\${env:INSTALLABLE_TARGET}" gu.cmd install -L "${pwd}\${env:INSTALLABLE_TARGET}" - name: Run SystemReporter on GraalVM run: 'trufflesqueak.cmd --jvm --code "String streamContents: [:s ^| SystemReporter new reportVM: s] limitedTo: 10000"' diff --git a/mx.trufflesqueak/suite.py b/mx.trufflesqueak/suite.py index 7e507d6f1..61ab24c02 100644 --- a/mx.trufflesqueak/suite.py +++ b/mx.trufflesqueak/suite.py @@ -9,19 +9,20 @@ # ========================================================================== # METADATA # ========================================================================== - "mxversion": "5.253.0", + "mxversion": "5.263.8", "name": "trufflesqueak", "versionConflictResolution": "latest", - "version": "1.0.0-rc10", + "version": "1.0.0-rc10-dev", "trufflesqueak:dependencyMap": { - "graalvm": "20.0.0", + "graalvm": "20.1.0", "image": "TruffleSqueakImage-1.0.0-rc9.zip", "image_tag": "1.0.0-rc9", - "jdk8_update": "242", - "jdk11": "11.0.6", - "jdk11_update": "9", - "jvmci": "jvmci-20.0-b02", + "jdk8": "252", + "jdk8_update": "09", + "jdk11": "11.0.7", + "jdk11_update": "10", + "jvmci": "jvmci-20.1-b02", "test_image": "GraalSqueakTestImage-19329-64bit.zip", "test_image_tag": "1.0.0-rc6", }, @@ -50,7 +51,7 @@ "suites": [{ "name": "truffle", "subdir": True, - "version": "022fcbd2479944aeb411f851dc2cb062b1bbb441", + "version": "df628ae8688633d12dabc0a2a0e015d0ff65fcd5", "urls": [{ "url": "https://github.com/oracle/graal", "kind": "git" diff --git a/mx.trufflesqueak/utils.sh b/mx.trufflesqueak/utils.sh index 92081690d..c4272c875 100755 --- a/mx.trufflesqueak/utils.sh +++ b/mx.trufflesqueak/utils.sh @@ -184,8 +184,9 @@ set-up-dependencies() { set-up-graalvm-ce() { local java_version=$1 local target_dir=$2 + local graalvm_name="graalvm-ce-${java_version}-${OS_NAME}-amd64-${DEP_GRAALVM}" local file_suffix=".tar.gz" && [[ "${OS_NAME}" == "windows" ]] && file_suffix=".zip" - local file="graalvm-ce-${java_version}-${OS_NAME}-amd64-${DEP_GRAALVM}${file_suffix}" + local file="${graalvm_name}${file_suffix}" pushd "${target_dir}" > /dev/null @@ -198,24 +199,24 @@ set-up-graalvm-ce() { add-path "${graalvm_home}/bin" set-env "GRAALVM_HOME" "$(resolve-path "${graalvm_home}")" - echo "[${file} set up successfully]" + echo "[${graalvm_name} set up successfully]" } set-up-labsjdk11() { local target_dir=$1 local jdk_tar=${target_dir}/jdk.tar.gz - local file="labsjdk-ce-${DEP_JDK11}+${DEP_JDK11_UPDATE}-${DEP_JVMCI}-${OS_NAME}-amd64.tar.gz" + local jdk_name="labsjdk-ce-${DEP_JDK11}+${DEP_JDK11_UPDATE}-${DEP_JVMCI}-${OS_NAME}-amd64" pushd "${target_dir}" > /dev/null - curl -sSL --retry 3 -o "${jdk_tar}" "https://github.com/graalvm/labs-openjdk-11/releases/download/${DEP_JVMCI}/${file}" + curl -sSL --retry 3 -o "${jdk_tar}" "https://github.com/graalvm/labs-openjdk-11/releases/download/${DEP_JVMCI}/${jdk_name}.tar.gz" tar xzf "${jdk_tar}" popd > /dev/null enable-jdk "${target_dir}/labsjdk-ce-${DEP_JDK11}-${DEP_JVMCI}${JAVA_HOME_SUFFIX}" - echo "[${file} set up successfully]" + echo "[${jdk_name} set up successfully]" } set-up-mx() { @@ -227,24 +228,24 @@ set-up-mx() { set-up-openjdk8-jvmci() { local target_dir=$1 local jdk_tar=${target_dir}/jdk.tar.gz - local file="openjdk-8u${DEP_JDK8_UPDATE}-${DEP_JVMCI}-${OS_NAME}-amd64.tar.gz" + local jdk_name="openjdk-8u${DEP_JDK8}+${DEP_JDK8_UPDATE}-${DEP_JVMCI}-${OS_NAME}-amd64" pushd "${target_dir}" > /dev/null - curl -sSL --retry 3 -o "${jdk_tar}" "https://github.com/graalvm/openjdk8-jvmci-builder/releases/download/${DEP_JVMCI}/${file}" + curl -sSL --retry 3 -o "${jdk_tar}" "https://github.com/graalvm/openjdk8-jvmci-builder/releases/download/${DEP_JVMCI}/${jdk_name}.tar.gz" tar xzf "${jdk_tar}" popd > /dev/null - enable-jdk "${target_dir}/openjdk1.8.0_${DEP_JDK8_UPDATE}-${DEP_JVMCI}${JAVA_HOME_SUFFIX}" + enable-jdk "${target_dir}/openjdk1.8.0_${DEP_JDK8}-${DEP_JVMCI}${JAVA_HOME_SUFFIX}" # Workaround for Windows (can be removed when https://git.io/Jv9IQ is available) if [[ "${OS_NAME}" == "windows" ]]; then # Remove empty lines - sed -i '/^$/d' "${target_dir}/openjdk1.8.0_${DEP_JDK8_UPDATE}-${DEP_JVMCI}${JAVA_HOME_SUFFIX}/release" + sed -i '/^$/d' "${target_dir}/openjdk1.8.0_${DEP_JDK8}-${DEP_JVMCI}${JAVA_HOME_SUFFIX}/release" fi - echo "[openjdk1.8.0_${DEP_JDK8_UPDATE}-${DEP_JVMCI} set up successfully]" + echo "[${jdk_name} set up successfully]" } shallow-clone() { diff --git a/src/de.hpi.swa.trufflesqueak.shared/src/de/hpi/swa/trufflesqueak/shared/SqueakLanguageConfig.java b/src/de.hpi.swa.trufflesqueak.shared/src/de/hpi/swa/trufflesqueak/shared/SqueakLanguageConfig.java index 84821459f..42e56a816 100644 --- a/src/de.hpi.swa.trufflesqueak.shared/src/de/hpi/swa/trufflesqueak/shared/SqueakLanguageConfig.java +++ b/src/de.hpi.swa.trufflesqueak.shared/src/de/hpi/swa/trufflesqueak/shared/SqueakLanguageConfig.java @@ -11,7 +11,7 @@ public final class SqueakLanguageConfig { public static final String MIME_TYPE = "application/x-smalltalk"; public static final String NAME = "Squeak/Smalltalk"; public static final String ST_MIME_TYPE = "text/x-smalltalk"; - public static final String VERSION = "1.0.0-rc8"; + public static final String VERSION = "1.0.0-rc10-dev"; private SqueakLanguageConfig() { } diff --git a/src/de.hpi.swa.trufflesqueak.test/src/de/hpi/swa/trufflesqueak/test/tests.properties b/src/de.hpi.swa.trufflesqueak.test/src/de/hpi/swa/trufflesqueak/test/tests.properties index 8d2a9af24..f9fce9e44 100644 --- a/src/de.hpi.swa.trufflesqueak.test/src/de/hpi/swa/trufflesqueak/test/tests.properties +++ b/src/de.hpi.swa.trufflesqueak.test/src/de/hpi/swa/trufflesqueak/test/tests.properties @@ -1687,6 +1687,7 @@ ForeignObjectTest>>testJSArray=passing ForeignObjectTest>>testJSBasic=passing ForeignObjectTest>>testJSDate=passing ForeignObjectTest>>testJSExecutable=passing +ForeignObjectTest>>testJSMetadataAPIs=passing ForeignObjectTest>>testJSObject=passing ForeignObjectTest>>testSmalltalkFromJS=passing FormCanvasTest>>testDefaultClipRect=passing @@ -1957,6 +1958,7 @@ IntegerTest>>testSqrtFloor=passing IntegerTest>>testSqrtRem=passing IntegerTest>>testTwoComplementBitLogicWithCarry=passing IntegerTest>>testTwoComplementRightShift=passing +InteropTest>>testMetadataAPIs=passing InteropTest>>testSmalltalkDNU=passing # Assumes values are large integers, but are treated as small integers diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/SqueakLanguage.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/SqueakLanguage.java index 0a431dfed..544f6e6fa 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/SqueakLanguage.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/SqueakLanguage.java @@ -21,17 +21,12 @@ import com.oracle.truffle.api.instrumentation.StandardTags; import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.source.Source; -import com.oracle.truffle.api.source.SourceSection; import de.hpi.swa.trufflesqueak.image.SqueakImageContext; import de.hpi.swa.trufflesqueak.interop.ContextObjectInfo; import de.hpi.swa.trufflesqueak.interop.InteropArray; import de.hpi.swa.trufflesqueak.interop.SqueakFileDetector; -import de.hpi.swa.trufflesqueak.interop.WrapToSqueakNode; import de.hpi.swa.trufflesqueak.model.CompiledCodeObject; -import de.hpi.swa.trufflesqueak.model.FrameMarker; -import de.hpi.swa.trufflesqueak.nodes.SqueakGuards; -import de.hpi.swa.trufflesqueak.nodes.accessing.SqueakObjectClassNode; import de.hpi.swa.trufflesqueak.shared.SqueakLanguageConfig; import de.hpi.swa.trufflesqueak.util.FrameAccess; import de.hpi.swa.trufflesqueak.util.MiscUtils; @@ -71,25 +66,11 @@ protected CallTarget parse(final ParsingRequest request) throws Exception { } } - @Override - protected boolean isObjectOfLanguage(final Object object) { - return SqueakGuards.isAbstractSqueakObject(object); - } - @Override protected boolean isThreadAccessAllowed(final Thread thread, final boolean singleThreaded) { return true; // TODO: Experimental, make TruffleSqueak work in multiple threads. } - @Override - protected Object findMetaObject(final SqueakImageContext image, final Object value) { - // TODO: return ContextObject instead? - if (value instanceof FrameMarker) { - return image.nilClass; - } - return SqueakObjectClassNode.getUncached().executeLookup(WrapToSqueakNode.getUncached().executeWrap(value)); - } - @Override protected Iterable findTopScopes(final SqueakImageContext context) { context.ensureLoaded(); @@ -110,12 +91,6 @@ protected Iterable findLocalScopes(final SqueakImageContext context, fina return Collections.singletonList(Scope.newBuilder(name, variables).node(node).receiver(receiver.toString(), receiver).arguments(arguments).build()); } - @Override - protected SourceSection findSourceLocation(final SqueakImageContext context, final Object value) { - // TODO Implement for LSP -> "go-to-definition within same workspace window" - return super.findSourceLocation(context, value); - } - public static SqueakImageContext getContext() { CompilerAsserts.neverPartOfCompilation(); return getCurrentContext(SqueakLanguage.class); diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/model/AbstractSqueakObject.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/model/AbstractSqueakObject.java index c646845ef..cae82eed0 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/model/AbstractSqueakObject.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/model/AbstractSqueakObject.java @@ -8,6 +8,7 @@ import com.oracle.truffle.api.CompilerAsserts; import com.oracle.truffle.api.CompilerDirectives; import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; +import com.oracle.truffle.api.TruffleLanguage; import com.oracle.truffle.api.dsl.Cached; import com.oracle.truffle.api.dsl.Cached.Exclusive; import com.oracle.truffle.api.dsl.Cached.Shared; @@ -43,6 +44,12 @@ public abstract class AbstractSqueakObject implements TruffleObject { public abstract int size(); + @Override + public String toString() { + CompilerAsserts.neverPartOfCompilation(); + return "a " + getClass().getSimpleName() + " @" + Integer.toHexString(hashCode()); + } + /* * INTEROPERABILITY */ @@ -152,10 +159,33 @@ protected static final Object invokeMemberWithDNU(final AbstractSqueakObject rec } } - @Override - public String toString() { - CompilerAsserts.neverPartOfCompilation(); - return "a " + getClass().getSimpleName() + " @" + Integer.toHexString(hashCode()); + @ExportMessage + @SuppressWarnings("static-method") + public final boolean hasMetaObject() { + return true; + } + + @ExportMessage + public final Object getMetaObject(@Shared("classNode") @Cached final SqueakObjectClassNode classNode) { + return classNode.executeLookup(this); + } + + @ExportMessage + @SuppressWarnings("static-method") + public final boolean hasLanguage() { + return true; + } + + @ExportMessage + @SuppressWarnings("static-method") + public final Class> getLanguage() { + return SqueakLanguage.class; + } + + @ExportMessage + @TruffleBoundary + public final Object toDisplayString(@SuppressWarnings("unused") final boolean allowSideEffects) { + return toString(); } /** diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/model/ClassObject.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/model/ClassObject.java index aaccde279..de7f357f0 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/model/ClassObject.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/model/ClassObject.java @@ -10,7 +10,6 @@ import java.util.List; import com.oracle.truffle.api.Assumption; -import com.oracle.truffle.api.CompilerAsserts; import com.oracle.truffle.api.CompilerDirectives; import com.oracle.truffle.api.CompilerDirectives.CompilationFinal; import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; @@ -39,6 +38,7 @@ import de.hpi.swa.trufflesqueak.model.layout.ObjectLayouts.CLASS_DESCRIPTION; import de.hpi.swa.trufflesqueak.model.layout.ObjectLayouts.CLASS_TRAIT; import de.hpi.swa.trufflesqueak.model.layout.ObjectLayouts.METACLASS; +import de.hpi.swa.trufflesqueak.nodes.accessing.SqueakObjectClassNode; import de.hpi.swa.trufflesqueak.nodes.accessing.SqueakObjectNewNode; import de.hpi.swa.trufflesqueak.util.ArrayUtils; import de.hpi.swa.trufflesqueak.util.ObjectGraphUtils.ObjectTracer; @@ -120,8 +120,8 @@ public String toString() { } @Override + @TruffleBoundary public String getClassName() { - CompilerAsserts.neverPartOfCompilation(); if (isAMetaClass()) { final Object classInstance = pointers[METACLASS.THIS_CLASS - CLASS_DESCRIPTION.SIZE]; if (classInstance != NilObject.SINGLETON && ((ClassObject) classInstance).pointers[CLASS.NAME] != NilObject.SINGLETON) { @@ -654,4 +654,37 @@ private static void initializeObject(final Object[] arguments, final InteropLibr } } } + + @SuppressWarnings("static-method") + @ExportMessage + protected boolean isMetaObject() { + return true; + } + + @SuppressWarnings("static-method") + @ExportMessage + protected Object getMetaQualifiedName() { + return getClassName(); + } + + @SuppressWarnings("static-method") + @ExportMessage + protected Object getMetaSimpleName() { + return getClassName(); + } + + @SuppressWarnings("static-method") + @ExportMessage + protected boolean isMetaInstance(final Object instance, + @Cached final SqueakObjectClassNode classNode) { + final ClassObject clazz = classNode.executeLookup(instance); + ClassObject currentClass = this; + while (currentClass != null) { + if (currentClass == clazz) { + return true; + } + currentClass = currentClass.getSuperclassOrNull(); + } + return false; + } } diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/PolyglotPlugin.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/PolyglotPlugin.java index 6ae40ba7e..bfdc669ab 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/PolyglotPlugin.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/PolyglotPlugin.java @@ -16,6 +16,7 @@ import com.oracle.truffle.api.CompilerDirectives; import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; import com.oracle.truffle.api.TruffleContext; +import com.oracle.truffle.api.TruffleLanguage; import com.oracle.truffle.api.TruffleLanguage.Env; import com.oracle.truffle.api.dsl.Cached; import com.oracle.truffle.api.dsl.CachedContext; @@ -58,6 +59,7 @@ import de.hpi.swa.trufflesqueak.nodes.primitives.PrimitiveInterfaces.BinaryPrimitiveWithoutFallback; import de.hpi.swa.trufflesqueak.nodes.primitives.PrimitiveInterfaces.QuaternaryPrimitive; import de.hpi.swa.trufflesqueak.nodes.primitives.PrimitiveInterfaces.TernaryPrimitive; +import de.hpi.swa.trufflesqueak.nodes.primitives.PrimitiveInterfaces.TernaryPrimitiveWithoutFallback; import de.hpi.swa.trufflesqueak.nodes.primitives.PrimitiveInterfaces.UnaryPrimitive; import de.hpi.swa.trufflesqueak.nodes.primitives.PrimitiveInterfaces.UnaryPrimitiveWithoutFallback; import de.hpi.swa.trufflesqueak.nodes.primitives.SqueakPrimitive; @@ -1081,6 +1083,118 @@ protected static final Object doAsTimeZone(@SuppressWarnings("unused") final Obj } } + /* Meta-data APIs */ + + @GenerateNodeFactory + @SqueakPrimitive(names = "primitiveHasLanguage") + protected abstract static class PrimHasLanguageNode extends AbstractPrimitiveNode implements BinaryPrimitiveWithoutFallback { + @Specialization + protected static final boolean hasLanguage(@SuppressWarnings("unused") final Object receiver, final Object object, + @CachedLibrary(limit = "2") final InteropLibrary lib) { + return lib.hasLanguage(object); + } + } + + @GenerateNodeFactory + @SqueakPrimitive(names = "primitiveGetLanguage") + protected abstract static class PrimGetLanguageNode extends AbstractPrimitiveNode implements BinaryPrimitiveWithoutFallback { + @Specialization(guards = "lib.hasLanguage(object)") + protected static final Class> getLanguage(@SuppressWarnings("unused") final Object receiver, final Object object, + @CachedLibrary(limit = "2") final InteropLibrary lib) { + try { + return lib.getLanguage(object); + } catch (final UnsupportedMessageException e) { + throw primitiveFailedInInterpreterCapturing(e); + } + } + } + + @GenerateNodeFactory + @SqueakPrimitive(names = "primitiveToDisplayString") + protected abstract static class PrimToDisplayStringNode extends AbstractPrimitiveNode implements BinaryPrimitiveWithoutFallback { + @Specialization + protected static final Object toDisplayString(@SuppressWarnings("unused") final Object receiver, final Object object, + @CachedLibrary(limit = "2") final InteropLibrary lib) { + return lib.toDisplayString(object); + } + } + + @GenerateNodeFactory + @SqueakPrimitive(names = "primitiveHasMetaObject") + protected abstract static class PrimHasMetaObjectNode extends AbstractPrimitiveNode implements BinaryPrimitiveWithoutFallback { + @Specialization + protected static final boolean hasMetaObject(@SuppressWarnings("unused") final Object receiver, final Object object, + @CachedLibrary(limit = "2") final InteropLibrary lib) { + return lib.hasMetaObject(object); + } + } + + @GenerateNodeFactory + @SqueakPrimitive(names = "primitiveIsMetaObject") + protected abstract static class PrimIsMetaObjectNode extends AbstractPrimitiveNode implements BinaryPrimitiveWithoutFallback { + @Specialization + protected static final boolean isMetaObject(@SuppressWarnings("unused") final Object receiver, final Object object, + @CachedLibrary(limit = "2") final InteropLibrary lib) { + return lib.isMetaObject(object); + } + } + + @GenerateNodeFactory + @SqueakPrimitive(names = "primitiveIsMetaInstance") + protected abstract static class PrimIsMetaInstanceNode extends AbstractPrimitiveNode implements TernaryPrimitiveWithoutFallback { + @Specialization(guards = "lib.isMetaObject(object)") + protected static final boolean isMetaInstance(@SuppressWarnings("unused") final Object receiver, final Object object, final Object instance, + @CachedLibrary(limit = "2") final InteropLibrary lib) { + try { + return lib.isMetaInstance(object, instance); + } catch (final UnsupportedMessageException e) { + throw primitiveFailedInInterpreterCapturing(e); + } + } + } + + @GenerateNodeFactory + @SqueakPrimitive(names = "primitiveGetMetaObject") + protected abstract static class PrimGetMetaObjectNode extends AbstractPrimitiveNode implements BinaryPrimitiveWithoutFallback { + @Specialization(guards = "lib.hasMetaObject(object)") + protected static final Object getMetaObject(@SuppressWarnings("unused") final Object receiver, final Object object, + @CachedLibrary(limit = "2") final InteropLibrary lib) { + try { + return lib.getMetaObject(object); + } catch (final UnsupportedMessageException e) { + throw primitiveFailedInInterpreterCapturing(e); + } + } + } + + @GenerateNodeFactory + @SqueakPrimitive(names = "primitiveGetMetaQualifiedName") + protected abstract static class PrimGetMetaQualifiedNameNode extends AbstractPrimitiveNode implements BinaryPrimitiveWithoutFallback { + @Specialization(guards = "lib.isMetaObject(object)") + protected static final Object getMetaQualifiedName(@SuppressWarnings("unused") final Object receiver, final Object object, + @CachedLibrary(limit = "2") final InteropLibrary lib) { + try { + return lib.getMetaQualifiedName(object); + } catch (final UnsupportedMessageException e) { + throw primitiveFailedInInterpreterCapturing(e); + } + } + } + + @GenerateNodeFactory + @SqueakPrimitive(names = "primitiveGetMetaSimpleName") + protected abstract static class PrimGetMetaSimpleNameNode extends AbstractPrimitiveNode implements BinaryPrimitiveWithoutFallback { + @Specialization(guards = "lib.isMetaObject(object)") + protected static final Object getMetaSimpleName(@SuppressWarnings("unused") final Object receiver, final Object object, + @CachedLibrary(limit = "2") final InteropLibrary lib) { + try { + return lib.getMetaSimpleName(object); + } catch (final UnsupportedMessageException e) { + throw primitiveFailedInInterpreterCapturing(e); + } + } + } + /* * Exception objects */ diff --git a/src/image b/src/image index 26be464db..a8b357525 160000 --- a/src/image +++ b/src/image @@ -1 +1 @@ -Subproject commit 26be464db02f4de51e82fbd48635b2617a0a371c +Subproject commit a8b357525dcefb7efd6ee13bbdafaed23cf86598