respsect array and object length requests

This commit is contained in:
2026-02-14 15:42:19 -06:00
parent 356c51bde3
commit e75596ce30
18 changed files with 54250 additions and 62692 deletions

View File

@@ -1930,7 +1930,7 @@ var mcode = function(ast) {
_i = _i + 1
}
dest = alloc_slot()
add_instr(["array", dest, 0])
add_instr(["array", dest, count])
_i = 0
while (_i < count) {
emit_2("push", dest, elem_slots[_i])
@@ -1943,7 +1943,7 @@ var mcode = function(ast) {
if (kind == "record") {
list = expr.list
dest = alloc_slot()
push(s_instructions, ["record", dest, 0])
push(s_instructions, ["record", dest, length(list)])
_i = 0
while (_i < length(list)) {
pair = list[_i]