From b99a63447b50ffb9b10bab6d2f57643ab82449c9 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Mon, 11 May 2020 10:45:29 +0200 Subject: [PATCH] Fix kw initializer bug in baseline compiler * module/language/tree-il/compile-bytecode.scm (compile-closure): The first sym has index 1, not 0, because of the closure. --- module/language/tree-il/compile-bytecode.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/language/tree-il/compile-bytecode.scm b/module/language/tree-il/compile-bytecode.scm index e47c9ef2d..ea6999594 100644 --- a/module/language/tree-il/compile-bytecode.scm +++ b/module/language/tree-il/compile-bytecode.scm @@ -1303,7 +1303,7 @@ in the frame with for the lambda-case clause @var{clause}." (values aok? (map (match-lambda ((key name sym) - (cons key (list-index syms sym)))) + (cons key (1+ (list-index syms sym))))) kw))))) (lambda (allow-other-keys? kw-indices) (when label (emit-label asm label))