Skip to content

Commit

Permalink
ACTIONSCRIPT: Add push and pop of registers on function call
Browse files Browse the repository at this point in the history
  • Loading branch information
Nostritius authored and DrMcCoy committed Feb 23, 2019
1 parent a9fc66c commit 023ce4e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/aurora/actionscript/asbuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,8 @@ void ASBuffer::actionCallMethod(AVM &avm) {
byte counter = 1;
Variable prevThis;

avm.pushRegisters(function->getNumRegisters());

if (function->getPreloadRootFlag()) {
avm.storeRegister(avm.getVariable("_root"), counter);
counter += 1;
Expand Down Expand Up @@ -497,6 +499,8 @@ void ASBuffer::actionCallMethod(AVM &avm) {
if (!prevThis.isUndefined())
avm.storeRegister(prevThis, 1);

avm.popRegisters(function->getNumRegisters());

debugC(kDebugActionScript, 1, "actionCallMethod");
}

Expand Down

0 comments on commit 023ce4e

Please sign in to comment.