[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 25/99: Implement call-with-values
From: |
Christopher Allan Webber |
Subject: |
[Guile-commits] 25/99: Implement call-with-values |
Date: |
Sun, 10 Oct 2021 21:50:48 -0400 (EDT) |
cwebber pushed a commit to branch compile-to-js-merge
in repository guile.
commit cf905a700435f7f0a57ef94db10be1db33011373
Author: Ian Price <ianprice90@googlemail.com>
AuthorDate: Tue Jun 16 23:07:13 2015 +0100
Implement call-with-values
---
module/language/js-il/runtime.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/module/language/js-il/runtime.js b/module/language/js-il/runtime.js
index 5b4089e..232e9fa 100644
--- a/module/language/js-il/runtime.js
+++ b/module/language/js-il/runtime.js
@@ -319,7 +319,13 @@ var abort_to_prompt = function(self, k, prompt, arg) {
return handler(kont, arg);
};
-var call_with_values = not_implemented_yet;
+var call_with_values = function (self, k, producer, consumer) {
+ var k2 = function () {
+ var args = Array.prototype.slice.call(arguments);
+ return consumer.fun.apply(consumer.fun, [consumer, k].concat(args));
+ };
+ return producer.fun(producer, k2);
+};
var callcc = function (self, k, closure) {
var f = function (self, k2) {
- [Guile-commits] 50/99: Add more variables to no-values-primitives, (continued)
- [Guile-commits] 50/99: Add more variables to no-values-primitives, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 55/99: Implement immediate version of vector primitives., Christopher Allan Webber, 2021/10/10
- [Guile-commits] 62/99: scm_struct_init skips hidden fields., Christopher Allan Webber, 2021/10/10
- [Guile-commits] 59/99: Implement built-in string procedures., Christopher Allan Webber, 2021/10/10
- [Guile-commits] 60/99: Implement struct built-ins., Christopher Allan Webber, 2021/10/10
- [Guile-commits] 70/99: Add `guild jslink' to bundle JS programs, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 75/99: scheme.HashTable uses ES6 Map objects, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 41/99: Fix build of (language cps compile-js), Christopher Allan Webber, 2021/10/10
- [Guile-commits] 45/99: Add #:js-inline? and #:js-flatten? debugging options, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 54/99: Implement structs in runtime.js, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 25/99: Implement call-with-values,
Christopher Allan Webber <=
- [Guile-commits] 52/99: Add macro type in runtime.js, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 51/99: Implement cached-module-box, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 48/99: Rebuild nested scopes for js continuations, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 18/99: Add more types of constants, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 17/99: Implement Optional arguments, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 27/99: values takes multiple arguments, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 28/99: Implement apply correctly, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 38/99: Explicitly test for undefined arguments to handle false values like 0, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 44/99: Update primitives in no-values-primitives, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 35/99: Change local type representation and remove var type, Christopher Allan Webber, 2021/10/10