cwebber pushed a commit to branch compile-to-js-merge
in repository guile.
commit 7438a192f8eddf0699db4883c4e1535f5ae8467b
Author: Ian Price <[email protected]>
AuthorDate: Thu Aug 3 00:26:02 2017 +0100
Unwind prompt frames
* module/language/js-il/runtime.js(unwind): Unwind prompts.
---
module/language/js-il/runtime.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/module/language/js-il/runtime.js b/module/language/js-il/runtime.js
index e0fc34d..970e33c 100644
--- a/module/language/js-il/runtime.js
+++ b/module/language/js-il/runtime.js
@@ -541,7 +541,8 @@ scheme.primitives["wind"] = function(enter, leave) {
scheme.primitives["unwind"] = function () {
var frame = scheme.dynstack.shift();
- if (!(frame instanceof scheme.frame.DynWind)) {
+ if (!(frame instanceof scheme.frame.DynWind) &&
+ !(frame instanceof scheme.frame.Prompt)) {
throw "not a dynamic wind frame";
};
};