From 138ffa45a2b6c79863825c2792a772fb6ed1f471 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Sun, 22 May 2022 19:00:39 +0200 Subject: [PATCH] Add dummy support for `primitiveScreenScaleFactor` --- .../swa/trufflesqueak/nodes/plugins/NullPlugin.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/NullPlugin.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/NullPlugin.java index 148cfcc7a..6294c5e05 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/NullPlugin.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/NullPlugin.java @@ -29,6 +29,15 @@ import de.hpi.swa.trufflesqueak.util.MiscUtils; public final class NullPlugin extends AbstractPrimitiveFactoryHolder { + @GenerateNodeFactory + @SqueakPrimitive(names = "primitiveScreenScaleFactor") + protected abstract static class PrimScreenScaleFactorNode extends AbstractPrimitiveNode { + @Specialization + protected static final double doGet(@SuppressWarnings("unused") final Object receiver) { + return 1.0d; + } + } + @GenerateNodeFactory @SqueakPrimitive(names = "primitiveHighResClock") protected abstract static class PrimHighResClockNode extends AbstractPrimitiveNode { @@ -49,7 +58,7 @@ protected final boolean doGet(@SuppressWarnings("unused") final Object receiver) @GenerateNodeFactory @SqueakPrimitive(names = "primitiveMultipleBytecodeSetsActive") - protected abstract static class PrimMultipleBytecodeSetsActive1Node extends AbstractPrimitiveNode { + protected abstract static class PrimMultipleBytecodeSetsActive1Node extends AbstractPrimitiveNode implements BinaryPrimitiveFallback { @Specialization protected final boolean doSet(@SuppressWarnings("unused") final Object receiver, final boolean value) { final int imageFormat = getContext().imageFormat;