We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54853d6 commit 089f3a2Copy full SHA for 089f3a2
src/bytecode.rs
@@ -203,8 +203,10 @@ impl BytecodeCompiler {
203
self.compile_value(value);
204
}
205
206
- // three modes: 1. list op; 2. list call; 3. recursive cons
207
- if list_len < (1 << 8) {
+ // four modes: 0. (empty) just nil 1. list op; 2. list call; 3. recursive cons
+ if list_len == 0 {
208
+ self.compile_constant_op(LispObject::Nil);
209
+ } else if list_len < (1 << 8) {
210
self.ops.push(Op::List(list_len as u8));
211
} else if list_len < (1 << 16) {
212
self.ops.push(Op::Call(list_len as u16));
0 commit comments