[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 73/99: Implement unboxed integer primitives.
From: |
Christopher Allan Webber |
Subject: |
[Guile-commits] 73/99: Implement unboxed integer primitives. |
Date: |
Sun, 10 Oct 2021 21:51:06 -0400 (EDT) |
cwebber pushed a commit to branch compile-to-js-merge
in repository guile.
commit 166def2da08da12b776e65ee7086e45e6d8ca498
Author: Ian Price <ianprice90@googlemail.com>
AuthorDate: Mon Aug 14 16:31:20 2017 +0100
Implement unboxed integer primitives.
* module/language/js-il/runtime.js (u64-=, u64->scm): New primitives.
---
module/language/js-il/runtime.js | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/module/language/js-il/runtime.js b/module/language/js-il/runtime.js
index 34dd3a6..ec639a4 100644
--- a/module/language/js-il/runtime.js
+++ b/module/language/js-il/runtime.js
@@ -87,6 +87,10 @@ scheme.primitives["load-u64"] = function(x) {
return x;
};
+scheme.primitives["u64-="] = function(x, y) {
+ return coerce_bool(x === y);
+};
+
scheme.primitives["u64-=-scm"] = function(x, y) {
// i.e. br-if-u64-=-scm
return coerce_bool(x === y);
@@ -112,6 +116,10 @@ scheme.primitives["scm->u64"] = function(x) {
return x;
};
+scheme.primitives["u64->scm"] = function(x) {
+ return x;
+};
+
// Boxes
scheme.Box = function (x) {
this.x = x;
- [Guile-commits] 24/99: Primitives create multiple argument continuations., (continued)
- [Guile-commits] 24/99: Primitives create multiple argument continuations., Christopher Allan Webber, 2021/10/10
- [Guile-commits] 14/99: Add binop type, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 53/99: Implement Winding & Unwinding, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 63/99: Implement hashtable built-ins, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 66/99: Implement misc built-ins, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 61/99: define! primitive only takes one argument., Christopher Allan Webber, 2021/10/10
- [Guile-commits] 69/99: Unwind prompt frames, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 67/99: Make child structs applicable., Christopher Allan Webber, 2021/10/10
- [Guile-commits] 74/99: Reimplement JS module system primitives., Christopher Allan Webber, 2021/10/10
- [Guile-commits] 95/99: Fix import of lower-cps in compile-js.scm, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 73/99: Implement unboxed integer primitives.,
Christopher Allan Webber <=
- [Guile-commits] 76/99: Separate public / private module lookups, Christopher Allan Webber, 2021/10/10
- [Guile-commits] 77/99: Search for variables in imports., Christopher Allan Webber, 2021/10/10
- [Guile-commits] 93/99: Fix module/Makefile.am after compile-to-js merge, Christopher Allan Webber, 2021/10/10