Closed moziliar closed 4 years ago
Fixes:
Fixed the error in environment extension which used to point the parent environment to the current environment, not the one in the current closure as suggested in the lecture note.
Fixed the issue in the test script where all the files in the folder with /__test__/
folder present will force the tests. (can be removed in the future if full test suite is demanded from all the source-programs)
Updates:
Changed the display of the VM output for source-2.js
and source-2-with-copying-gc.js
to be test-compatible. It now only outputs result: heap node of type = [TYPE], value = [VALUE]
directly, with trailing GC count if the VM comes with GC, e.g. result: heap node of type = pair, value = [1,[2,[3,[4,null]]]]; GC count: 0
Note: Not using --variant param as it is not compatible yet.
Implemented Cheney's GC
Update on environment frames: Instead of copying the enclosing environment frame and adding onto it, this implementation creates environment frames by creating fresh new frames and reimplements how LD works in the VM by including an index of the number of frames to look up to load the name.