Skip to content

Commit

Permalink
Readd push
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusDoe committed Feb 9, 2024
1 parent be4897c commit 763ee32
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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();
}

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 763ee32

Please sign in to comment.