respsect array and object length requests
This commit is contained in:
4
mcode.cm
4
mcode.cm
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user