Skip to content

Commit

Permalink
Merge branch 'main' into typechecker
Browse files Browse the repository at this point in the history
  • Loading branch information
arnav-ag committed Apr 7, 2024
2 parents 4155366 + aa67c70 commit 85fa78d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/vm/oogavm-heap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export function constructHeap(numWords: number, updateRootsFn): DataView {
free = 0;
allocateLiteralValues();
updateRoots = updateRootsFn;
StringPool.clear();
return heap;
}

Expand Down
5 changes: 3 additions & 2 deletions src/vm/oogavm-machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -706,8 +706,9 @@ export function run(numWords = 1000000) {
throw Error('execution aborted due to: ' + getErrorType());
}
}
log('Program value is ' + addressToTSValue(peekStack(OS[0])));
return addressToTSValue(peekStack(OS[0]));
const returnValue = addressToTSValue(peekStack(OS[0]));
log('Program value is ' + returnValue);
return returnValue;
}

function getErrorType(): string {
Expand Down

0 comments on commit 85fa78d

Please sign in to comment.