Opened 7 years ago

#300 new task

Buffers: Acquire through coercion

Reported by: dagss Owned by: somebody
Priority: major Milestone: wishlist
Component: Code Generation Keywords: kurtgsoc


Currently, buffers are acquired/released through somewhat of a hack: There's code in NameNode to "manually" track assignments to buffered-type local variables and do the right thing when they are reassigned.

This means that it is not possible to do e.g.

print (<object[int]>myobj)[3]

as there wouldn't be a local variable for the buffer.

The proper way of doing this is moving buffer acquisition and release over to the existing Cython coercion system (which is used for coercing C ints to Python ints and so on), and insert a CoercionNode? in situations like above.

This requires #299 to be done first, as a coercion node requires a temporary result, neatly packed in a single variable.

When #177 is done, this will also be what enables


i.e. without explicitly acquiring the buffer.

Change History (0)

Note: See TracTickets for help on using tickets.