11/* Automatically generated by
2- VMPluginCodeGenerator VMMaker.oscog-eem.3668 uuid: d0a2c840-707b-457e-9ff3-c455828ac41c
3- (Compiler-eem.523)
2+ VMPluginCodeGenerator VMMaker.oscog-eem.3676 uuid: ff00f25e-75c0-4e00-b807-0d490f1f338a
3+ (* Compiler-eem.523)
44 from
5- KlattSynthesizerPlugin VMMaker.oscog-eem.3668 uuid: d0a2c840-707b-457e-9ff3-c455828ac41c
5+ KlattSynthesizerPlugin VMMaker.oscog-eem.3676 uuid: ff00f25e-75c0-4e00-b807-0d490f1f338a
66 */
7- static char __buildInfo [] = "KlattSynthesizerPlugin VMMaker.oscog-eem.3668 uuid: d0a2c840-707b-457e-9ff3-c455828ac41c " __DATE__ ;
7+ static char __buildInfo [] = "KlattSynthesizerPlugin VMMaker.oscog-eem.3676 uuid: ff00f25e-75c0-4e00-b807-0d490f1f338a " __DATE__ ;
88
99
1010#include "config.h"
@@ -129,7 +129,6 @@ static float resonatorP1(sqInt index);
129129static float resonatorP2 (sqInt index );
130130static void resonatorfrequencybandwidth (sqInt index , float freq , float bw );
131131static float resonatorvalue (sqInt index , float aFloat );
132- static sqInt saveTo (sqInt origKlattOop );
133132EXPORT (sqInt ) setInterpreter (struct VirtualMachine * anInterpreter );
134133
135134
@@ -145,9 +144,8 @@ static sqInt (*fetchPointerofObject)(sqInt index, sqInt oop);
145144static void * (* firstIndexableField )(sqInt oop );
146145static sqInt (* floatObjectOf )(double aFloat );
147146static sqInt (* isWords )(sqInt oop );
148- static sqInt (* pop )(sqInt nItems );
149- static sqInt (* popRemappableOop )(void );
150- static sqInt (* pushRemappableOop )(sqInt oop );
147+ static sqInt (* methodReturnReceiver )(void );
148+ static sqInt (* primitiveFail )(void );
151149static sqInt (* slotSizeOf )(sqInt oop );
152150static sqInt (* stSizeOf )(sqInt oop );
153151static sqInt (* stackIntegerValue )(sqInt offset );
@@ -164,9 +162,8 @@ extern sqInt fetchPointerofObject(sqInt index, sqInt oop);
164162extern void * firstIndexableField (sqInt oop );
165163extern sqInt floatObjectOf (double aFloat );
166164extern sqInt isWords (sqInt oop );
167- extern sqInt pop (sqInt nItems );
168- extern sqInt popRemappableOop (void );
169- extern sqInt pushRemappableOop (sqInt oop );
165+ extern sqInt methodReturnReceiver (void );
166+ extern sqInt primitiveFail (void );
170167extern sqInt slotSizeOf (sqInt oop );
171168extern sqInt stSizeOf (sqInt oop );
172169extern sqInt stackIntegerValue (sqInt offset );
@@ -178,7 +175,7 @@ extern sqInt success(sqInt aBoolean);
178175extern
179176#endif
180177struct VirtualMachine * interpreterProxy ;
181- static const char * moduleName = "Klatt VMMaker.oscog-eem.3668 " INT_EXT ;
178+ static const char * moduleName = "Klatt VMMaker.oscog-eem.3676 " INT_EXT ;
182179static sqInt nmod ;
183180static sqInt nopen ;
184181static sqInt nper ;
@@ -437,16 +434,12 @@ primitiveSynthesizeFrameIntoStartingAt(void)
437434 /* end checkedShortPtrOf: */
438435l2 :
439436 startIndex = stackIntegerValue (0 );
440- if (failed ()) {
441- return null ;
442- }
443437 rcvr = stackObjectValue (3 );
444438 if (!(loadFrom (rcvr ))) {
445439 return null ;
446440 }
447- success (((stSizeOf (bufferOop )) * 2 ) >= samplesPerFrame );
448- if (failed ()) {
449- return null ;
441+ if (!(((stSizeOf (bufferOop )) * 2 ) >= samplesPerFrame )) {
442+ return primitiveFail ();
450443 }
451444
452445 /* begin synthesizeFrame:into:startingAt: */
@@ -1013,10 +1006,24 @@ primitiveSynthesizeFrameIntoStartingAt(void)
10131006 index += 1 ;
10141007 samplesCount += 1 ;
10151008 }
1016- if (!(saveTo (rcvr ))) {
1017- return null ;
1018- }
1019- pop (3 );
1009+ storePointerofObjectwithValue (2 , rcvr , floatObjectOf (pitch ));
1010+ storeIntegerofObjectwithValue (3 , rcvr , t0 );
1011+ storeIntegerofObjectwithValue (4 , rcvr , nper );
1012+ storeIntegerofObjectwithValue (5 , rcvr , nopen );
1013+ storeIntegerofObjectwithValue (6 , rcvr , nmod );
1014+ storePointerofObjectwithValue (7 , rcvr , floatObjectOf (a1 ));
1015+ storePointerofObjectwithValue (8 , rcvr , floatObjectOf (a2 ));
1016+ storePointerofObjectwithValue (9 , rcvr , floatObjectOf (x1 ));
1017+ storePointerofObjectwithValue (10 , rcvr , floatObjectOf (x2 ));
1018+ storePointerofObjectwithValue (11 , rcvr , floatObjectOf (b1 ));
1019+ storePointerofObjectwithValue (12 , rcvr , floatObjectOf (c1 ));
1020+ storePointerofObjectwithValue (13 , rcvr , floatObjectOf (glast ));
1021+ storePointerofObjectwithValue (14 , rcvr , floatObjectOf (vlast ));
1022+ storePointerofObjectwithValue (15 , rcvr , floatObjectOf (nlast ));
1023+ storeIntegerofObjectwithValue (16 , rcvr , periodCount );
1024+ storeIntegerofObjectwithValue (17 , rcvr , samplesCount );
1025+ storeIntegerofObjectwithValue (18 , rcvr , seed );
1026+ methodReturnReceiver ();
10201027 return 0 ;
10211028}
10221029
@@ -1100,66 +1107,6 @@ resonatorvalue(sqInt index, float aFloat)
11001107 return answer ;
11011108}
11021109
1103- /* KlattSynthesizerPlugin>>#saveTo: */
1104- static sqInt
1105- saveTo (sqInt origKlattOop )
1106- {
1107- sqInt a1Oop ;
1108- sqInt a2Oop ;
1109- sqInt b1Oop ;
1110- sqInt c1Oop ;
1111- sqInt glastOop ;
1112- sqInt klattOop ;
1113- sqInt nlastOop ;
1114- sqInt pitchOop ;
1115- sqInt vlastOop ;
1116- sqInt x1Oop ;
1117- sqInt x2Oop ;
1118-
1119- pushRemappableOop (origKlattOop );
1120- pushRemappableOop (floatObjectOf (pitch ));
1121- pushRemappableOop (floatObjectOf (a1 ));
1122- pushRemappableOop (floatObjectOf (a2 ));
1123- pushRemappableOop (floatObjectOf (x1 ));
1124- pushRemappableOop (floatObjectOf (x2 ));
1125- pushRemappableOop (floatObjectOf (b1 ));
1126- pushRemappableOop (floatObjectOf (c1 ));
1127- pushRemappableOop (floatObjectOf (glast ));
1128- pushRemappableOop (floatObjectOf (vlast ));
1129- nlastOop = floatObjectOf (nlast );
1130- vlastOop = popRemappableOop ();
1131- glastOop = popRemappableOop ();
1132- c1Oop = popRemappableOop ();
1133- b1Oop = popRemappableOop ();
1134- x2Oop = popRemappableOop ();
1135- x1Oop = popRemappableOop ();
1136- a2Oop = popRemappableOop ();
1137- a1Oop = popRemappableOop ();
1138- pitchOop = popRemappableOop ();
1139- klattOop = popRemappableOop ();
1140- if (failed ()) {
1141- return 0 ;
1142- }
1143- storePointerofObjectwithValue (2 , klattOop , pitchOop );
1144- storeIntegerofObjectwithValue (3 , klattOop , t0 );
1145- storeIntegerofObjectwithValue (4 , klattOop , nper );
1146- storeIntegerofObjectwithValue (5 , klattOop , nopen );
1147- storeIntegerofObjectwithValue (6 , klattOop , nmod );
1148- storePointerofObjectwithValue (7 , klattOop , a1Oop );
1149- storePointerofObjectwithValue (8 , klattOop , a2Oop );
1150- storePointerofObjectwithValue (9 , klattOop , x1Oop );
1151- storePointerofObjectwithValue (10 , klattOop , x2Oop );
1152- storePointerofObjectwithValue (11 , klattOop , b1Oop );
1153- storePointerofObjectwithValue (12 , klattOop , c1Oop );
1154- storePointerofObjectwithValue (13 , klattOop , glastOop );
1155- storePointerofObjectwithValue (14 , klattOop , vlastOop );
1156- storePointerofObjectwithValue (15 , klattOop , nlastOop );
1157- storeIntegerofObjectwithValue (16 , klattOop , periodCount );
1158- storeIntegerofObjectwithValue (17 , klattOop , samplesCount );
1159- storeIntegerofObjectwithValue (18 , klattOop , seed );
1160- return (failed ()) == 0 ;
1161- }
1162-
11631110
11641111/* Note: This is coded so that it can be run in Squeak. */
11651112
@@ -1185,9 +1132,8 @@ setInterpreter(struct VirtualMachine *anInterpreter)
11851132 firstIndexableField = interpreterProxy -> firstIndexableField ;
11861133 floatObjectOf = interpreterProxy -> floatObjectOf ;
11871134 isWords = interpreterProxy -> isWords ;
1188- pop = interpreterProxy -> pop ;
1189- popRemappableOop = interpreterProxy -> popRemappableOop ;
1190- pushRemappableOop = interpreterProxy -> pushRemappableOop ;
1135+ methodReturnReceiver = interpreterProxy -> methodReturnReceiver ;
1136+ primitiveFail = interpreterProxy -> primitiveFail ;
11911137 slotSizeOf = interpreterProxy -> slotSizeOf ;
11921138 stSizeOf = interpreterProxy -> stSizeOf ;
11931139 stackIntegerValue = interpreterProxy -> stackIntegerValue ;
0 commit comments