<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>duh, 5 parameters, HighlightVBT:<br><br> Public = Filter.T OBJECT METHODS<br> init(<br> ch: VBT.T;<br> op: PaintOp.T := PaintOp.TransparentSwap;<br> txt: Pixmap.T := Pixmap.Gray;<br> READONLY delta := Point.T{h := 0, v := 1}): T<br> END;<br> <br>note that if you make multiple calls,<br>the compiler generates that const/static Point.T for each call, wasteful<br>op and txt get single instanced.<br><br><br>PaintOp.T = RECORD op:INTEGER END; Predefined = [0..16];<br>PixMap.T = RECORD pm: INTEGER END; Predefined = [0..2];<br><br><br>so then, this looks like a frontend bug.<br><br><br>Of those three types, at least one is not described<br>to the backend when compiling InstalledVBT.m3,<br>inhibiting the C backend from using C's feature of passing structs by value,<br>forcing us to generate code to pass a pointer and copy it into a local.<br><br><br><br> - Jay<br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">From: jay.krell@cornell.edu<br>To: m3devel@elegosoft.com<br>Date: Fri, 12 Apr 2013 07:57:33 +0000<br>Subject: [M3devel] trestle grandChild.init 5 parameters?<br><br>
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div dir="ltr">can anyone explain this?<br><br><br>PROCEDURE InitChild (j: Join; ch: VBT.T; p: DeleteProc)=<br> VAR<br> grandChild := NEW(GrandChild, proc := p);<br> child := StableVBT.New(grandChild);<br> BEGIN<br> EVAL grandChild.init(ch); (* line 41 *)<br> j.trueChild := ch;<br> EVAL j.init(child)<br> END InitChild;<br><br><br>There are only two obvious parameters.<br>The generated code passes 5.<br>I understand they could be default parameters, but I still don't see it.<br><br><br>My particular problem is that type 79A5AEBB and/or 23E73F69 isn't declared.<br>I'd like to know what they are.<br>If I don't know the full information for every struct passed by value at the point of the call,<br>I won't be able to use the C/C++ feature of passing structs by value.<br><br><br><br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* start_call_indirect */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* load */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* pop_param */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* load */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* pop_param */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* load */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* load_indirect */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* pop_struct */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* load */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* load_indirect */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* pop_struct */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* load_address */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* pop_param */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* load */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* check_nil */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* store */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br>(*(ADDRESS*)(&L_69_L_70))=(ADDRESS)(((ADDRESS)(L_67_L_68)));<br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* load */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br>/*check_nil*/if(!L_69_L_70)M_InstalledVBT_L_37_CRASH(1316);<br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* call_indirect */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br> /* store */<br>//line 41 "../src/trestle/InstalledVBT.m3"<br>(*(ADDRESS*)(&L_65_L_66))=(ADDRESS)(((ADDRESS)(((ADDRESS (__cdecl*)(DOTDOTDOT))L_69_L_70)(<br> grandChild_L_45,<br> ch_L_48,<br> ((T79A5AEBB*)(*((ADDRESS*)(INT64_(232)+((ADDRESS)(*((ADDRESS*)(INT64_(984)+((ADDRESS)(&M_InstalledVBT_L_37)))))))))),<br> ((T23E73F69*)(*((ADDRESS*)(INT64_(120)+((ADDRESS)(*((ADDRESS*)(INT64_(1008)+((ADDRESS)(&M_InstalledVBT_L_37)))))))))),<br> INT64_(72)+((ADDRESS)(&L_35_L_36))))));<br><br> </div></div> </div></body>
</html>