<div dir="auto">Hi,<div dir="auto"><br></div><div dir="auto">I think primitives return 0 on success or an error code if they failed.</div><div dir="auto"><br></div><div dir="auto">It could be that for specific common primitive that's not the case as a hack for performance, one would need to check the code or Eliot may be able to answer.</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Apr 9, 2018, 00:52 Stuart Cassoff <<a href="mailto:aa72@bell.net">aa72@bell.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Apologies in advance for not doing enough homework.<br>
<br>
>From what I can understand so far:<br>
- Primitive function signatures specify returning an sqInt but the returned value is never used.<br>
- Primitives generally don't themselves return values, they often just drop off the end of the function.<br>
- Most (all?) primitive code is generated by VMMaker.<br>
<br>
Compiling results in warnings: "non-void function should return a value".<br>
<br>
So I'm wondering if  the code generator could add "return 0;" (return 1; ?) where needed,<br>
or could the functions be generated with a void signature instead of sqInt.<br>
<br>
That is, iiuc, if the returned values from primitives are ignored.<br>
If they are, I think that's a bit of a bummer because that's a wasted communications channel.<br>
<br>
<br>
Any clarification appreciated,<br>
<br>
<br>
Stu<br>
</blockquote></div>