source-academy / js-slang

Implementations of sublanguages of JavaScript, TypeScript, Scheme and Python
https://source-academy.github.io/source/
Apache License 2.0
70 stars 104 forks source link

CSE Machine: Fix environment reset instruction insertion #1542

Closed NhatMinh0208 closed 9 months ago

NhatMinh0208 commented 9 months ago

Description

This PR fixes the condition for inserting an environment reset instruction so that they are still inserted when the control stack has no nodes.

Resolves #1506, resolves #1520.

Changes

coveralls commented 9 months ago

Pull Request Test Coverage Report for Build 7947329845

Details


Files with Coverage Reduction New Missed Lines %
src/cse-machine/utils.ts 1 86.28%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 7946831132: -0.006%
Covered Lines: 10213
Relevant Lines: 12091

💛 - Coveralls
NhatMinh0208 commented 9 months ago

Changes look good, is this PR ready? If yes, let's mark it as ready and merge it quickly so that the workflows are fixed.

Yeah it's ready now, lets get it merged