marekjm / viuavm

Parallel virtual machine designed to reliably run massively concurrent programs
https://viuavm.org/
GNU General Public License v3.0
71 stars 11 forks source link

Assembler should catch frames with gaps #143

Closed marekjm closed 8 years ago

marekjm commented 8 years ago

A frame is considered to have "gaps" if it declares a number of parameters, promising to be able of supporting functions with arity equal to number of parameters, and then breaks the promise.

Example:

; frame promises to deliver three parameters...
frame 3

param 0 (istore 1 42)
; ...but parameter slot 1 is left void
param 2 (strstore 3 "Hello World!")

call foo/3

Assembler should refuse to compile such code.