Commit ebe04fc5 authored by dbarbera's avatar dbarbera
Browse files

Fixed length operator generation

parent 15e6b6c8
......@@ -580,10 +580,8 @@ def generate_access(prim):
def generate_length(params):
''' Generate the code for the built-in length operation'''
seq_ptr = reference(params[0])
size = core.Constant.sizeof(seq_ptr.type.pointee)
tmp = g.builder.alloca(size.type), tmp)
return tmp
arr_ty = seq_ptr.type.pointee.elements[0]
return, arr_ty.count)
def generate_present(params):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment