diff --git a/src/de.hpi.swa.trufflesqueak.ffi.native/src/InterpreterProxy.c b/src/de.hpi.swa.trufflesqueak.ffi.native/src/InterpreterProxy.c index 348fc291a..0f71bf6d2 100644 --- a/src/de.hpi.swa.trufflesqueak.ffi.native/src/InterpreterProxy.c +++ b/src/de.hpi.swa.trufflesqueak.ffi.native/src/InterpreterProxy.c @@ -73,6 +73,7 @@ VirtualMachine* createInterpreterProxy( usqLong (*positive64BitValueOf)(sqInt oop), sqInt (*primitiveFail)(void), sqInt (*primitiveFailFor)(sqInt reasonCode), + sqInt (*push)(sqInt object), sqInt (*pushInteger)(sqInt integerValue), sqInt (*showDisplayBitsLeftTopRightBottom)(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b), sqInt (*signed32BitIntegerFor)(sqInt integerValue), @@ -149,6 +150,7 @@ VirtualMachine* createInterpreterProxy( interpreterProxy->positive64BitValueOf = positive64BitValueOf; interpreterProxy->primitiveFail = primitiveFail; interpreterProxy->primitiveFailFor = primitiveFailFor; + interpreterProxy->push = push; interpreterProxy->pushInteger = pushInteger; interpreterProxy->showDisplayBitsLeftTopRightBottom = showDisplayBitsLeftTopRightBottom; interpreterProxy->signed32BitIntegerFor = signed32BitIntegerFor; diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/ffi/InterpreterProxy.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/ffi/InterpreterProxy.java index b29b197cf..86f00930a 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/ffi/InterpreterProxy.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/ffi/InterpreterProxy.java @@ -149,6 +149,7 @@ private TruffleExecutable[] getExecutables() { TruffleExecutable.wrap("(SINT64):UINT64", this::positive64BitValueOf), TruffleExecutable.wrap("():SINT64", this::primitiveFail), TruffleExecutable.wrap("(SINT64):SINT64", this::primitiveFailFor), + TruffleExecutable.wrap("(SINT64):SINT64", this::push), TruffleExecutable.wrap("(SINT64):SINT64", this::pushInteger), TruffleExecutable.wrap("(SINT64,SINT64,SINT64,SINT64,SINT64):SINT64", this::showDisplayBitsLeftTopRightBottom), TruffleExecutable.wrap("(SINT64):SINT64", this::signed32BitIntegerFor), @@ -594,7 +595,7 @@ private long pop(final long nItems) { private long popthenPush(final long nItems, final long oop) { pop(nItems); - pushObject(objectRegistryGet(oop)); + push(oop); return returnVoid(); } @@ -625,6 +626,11 @@ private long primitiveFailFor(final long reasonCode) { return primFailCode = reasonCode; } + private long push(final long oop) { + pushObject(objectRegistryGet(oop)); + return returnVoid(); + } + private long pushInteger(final long integer) { pushObject(integerToObject(integer)); return returnNull();