diff options
Diffstat (limited to 'Build/source/utils/asymptote/runtime.cc')
-rw-r--r-- | Build/source/utils/asymptote/runtime.cc | 5269 |
1 files changed, 2772 insertions, 2497 deletions
diff --git a/Build/source/utils/asymptote/runtime.cc b/Build/source/utils/asymptote/runtime.cc index 3317b59ffe9..2caa6a4acfc 100644 --- a/Build/source/utils/asymptote/runtime.cc +++ b/Build/source/utils/asymptote/runtime.cc @@ -1,5 +1,15 @@ /***** Autogenerated from runtime.in; changes will be overwritten *****/ +#line 1 "runtimebase.in" +/***** + * runtimebase.in + * Andy Hammerlindl 2009/07/28 + * + * Common declarations needed for all code-generating .in files. + * + *****/ + + #line 1 "runtime.in" /***** * runtime.in @@ -20,7 +30,24 @@ // Use Void f() instead of void f() to force an explicit Stack argument. -#line 63 "runtime.in" +#line 1 "runtimebase.in" +#include "stack.h" +#include "types.h" +#include "builtin.h" +#include "entry.h" +#include "errormsg.h" + +using vm::stack; +using vm::error; +using types::formal; + +#define PRIMITIVE(name,Name,asyName) using types::prim##Name; +#include <primitives.h> +#undef PRIMITIVE + +void unused(void *); + +#line 55 "runtime.in" #include <cfloat> #include <iostream> #include <fstream> @@ -130,7 +157,7 @@ using types::function; #include <primitives.h> #undef PRIMITIVE -using types::boolArray; +using types::booleanArray; using types::IntArray; using types::IntArray2; using types::realArray; @@ -184,6 +211,7 @@ namespace run { const char *invalidargument="invalid argument"; const char *arrayempty="cannot take min or max of empty array"; +const char *noruntime="no runtime environment for embedded eval"; // Return the factorial of a non-negative integer using a lookup table. Int factorial(Int n) @@ -285,7 +313,7 @@ inline size_t checkdimension(array *a, size_t dim) size_t size=checkArray(a); if(dim && size != dim) { ostringstream buf; - buf << "array of length " << dim << " expected" << endl; + buf << "array of length " << dim << " expected"; error(buf); } return size; @@ -351,7 +379,7 @@ double *copyArray2C(array *a, bool square=true, size_t dim2=0) size_t m=(square || n == 0) ? n : checkArray(read<array*>(a,0)); if(n > 0 && dim2 && m != dim2) { ostringstream buf; - buf << "second matrix dimension must be " << dim2 << endl; + buf << "second matrix dimension must be " << dim2; error(buf); } @@ -375,7 +403,7 @@ triple *copyTripleArray2C(array *a, bool square=true, size_t dim2=0) size_t m=(square || n == 0) ? n : checkArray(read<array*>(a,0)); if(n > 0 && dim2 && m != dim2) { ostringstream buf; - buf << "second matrix dimension must be " << dim2 << endl; + buf << "second matrix dimension must be " << dim2; error(buf); } @@ -399,7 +427,7 @@ double *copyTripleArray2Components(array *a, bool square=true, size_t dim2=0) size_t m=(square || n == 0) ? n : checkArray(read<array*>(a,0)); if(n > 0 && dim2 && m != dim2) { ostringstream buf; - buf << "second matrix dimension must be " << dim2 << endl; + buf << "second matrix dimension must be " << dim2; error(buf); } @@ -426,24 +454,6 @@ double *copyTripleArray2Components(array *a, bool square=true, size_t dim2=0) return cx; } -double norm(double *a, size_t n) -{ - if(n == 0) return 0.0; - double M=fabs(a[0]); - for(size_t i=1; i < n; ++i) - M=::max(M,fabs(a[i])); - return M; -} - -double norm(triple *a, size_t n) -{ - if(n == 0) return 0.0; - double M=a[0].abs2(); - for(size_t i=1; i < n; ++i) - M=::max(M,a[i].abs2()); - return sqrt(M); -} - static const char *incommensurate="Incommensurate matrices"; static const char *singular="Singular matrix"; static size_t *pivot,*Row,*Col; @@ -699,11 +709,6 @@ void init_readline(bool tabcompletion=true) void cleanup() { - processDataStruct &pd=processData(); - pd.atExitFunction=NULL; - pd.atUpdateFunction=NULL; - pd.atBreakpointFunction=NULL; - #if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES) store_history(&history_save); int nlines=intcast(getSetting<Int>("historylines")); @@ -737,7 +742,6 @@ void exitFunction(stack *Stack) callable *atExitFunction=processData().atExitFunction; if(atExitFunction && !nullfunc::instance()->compare(atExitFunction)) atExitFunction->call(Stack); - cleanup(); } default_t def; @@ -842,7 +846,6 @@ inline double principalBranch(double deg) } static string defaulttransparency=string("Compatible"); - static const string defaulttimeformat=string("%a %b %d %T %Z %Y"); #ifdef HAVE_STRFTIME static const size_t nTime=256; @@ -1073,14 +1076,14 @@ pair gamma(pair z) void cannotread(const string& s) { ostringstream buf; - buf << "Cannot read from " << s << endl; + buf << "Cannot read from " << s; error(buf); } void cannotwrite(const string& s) { ostringstream buf; - buf << "Cannot write to " << s << endl; + buf << "Cannot write to " << s; error(buf); } @@ -1091,45 +1094,45 @@ void cannotwrite(const string& s) namespace run { // Initializers -#line 1131 "runtime.in" +#line 1099 "runtime.in" void IntZero(stack *Stack) { -#line 1132 "runtime.in" +#line 1100 "runtime.in" {Stack->push<Int>(0); return;} } -#line 1137 "runtime.in" +#line 1105 "runtime.in" void realZero(stack *Stack) { -#line 1138 "runtime.in" +#line 1106 "runtime.in" {Stack->push<real>(0.0); return;} } -#line 1142 "runtime.in" +#line 1110 "runtime.in" void boolFalse(stack *Stack) { -#line 1143 "runtime.in" +#line 1111 "runtime.in" {Stack->push<bool>(false); return;} } -#line 1147 "runtime.in" +#line 1115 "runtime.in" void pushNullArray(stack *Stack) { -#line 1148 "runtime.in" +#line 1116 "runtime.in" {Stack->push<array*>(0); return;} } -#line 1152 "runtime.in" +#line 1120 "runtime.in" void pushNullRecord(stack *Stack) { -#line 1153 "runtime.in" +#line 1121 "runtime.in" {Stack->push<frame*>(0); return;} } -#line 1157 "runtime.in" +#line 1125 "runtime.in" void pushNullFunction(stack *Stack) { -#line 1158 "runtime.in" +#line 1126 "runtime.in" {Stack->push(nullfunc::instance()); return;} } @@ -1138,185 +1141,185 @@ void pushNullFunction(stack *Stack) // Put the default value token on the stack (in place of an argument when // making a function call). -#line 1167 "runtime.in" +#line 1135 "runtime.in" void pushDefault(stack *Stack) { -#line 1168 "runtime.in" +#line 1136 "runtime.in" {Stack->push(def); return;} } // Test if the value on the stack is the default value token. -#line 1174 "runtime.in" +#line 1142 "runtime.in" void isDefault(stack *Stack) { item i=vm::pop(Stack); -#line 1175 "runtime.in" +#line 1143 "runtime.in" {Stack->push<bool>(isdefault(i)); return;} } // Logical operations -#line 1181 "runtime.in" +#line 1149 "runtime.in" // bool !(bool b); -void gen8(stack *Stack) +void gen_runtime8(stack *Stack) { bool b=vm::pop<bool>(Stack); -#line 1182 "runtime.in" +#line 1150 "runtime.in" {Stack->push<bool>(!b); return;} } -#line 1187 "runtime.in" +#line 1155 "runtime.in" void boolMemEq(stack *Stack) { frame * b=vm::pop<frame *>(Stack); frame * a=vm::pop<frame *>(Stack); -#line 1188 "runtime.in" +#line 1156 "runtime.in" {Stack->push<bool>(a == b); return;} } -#line 1192 "runtime.in" +#line 1160 "runtime.in" void boolMemNeq(stack *Stack) { frame * b=vm::pop<frame *>(Stack); frame * a=vm::pop<frame *>(Stack); -#line 1193 "runtime.in" +#line 1161 "runtime.in" {Stack->push<bool>(a != b); return;} } -#line 1197 "runtime.in" +#line 1165 "runtime.in" void boolFuncEq(stack *Stack) { callable * b=vm::pop<callable *>(Stack); callable * a=vm::pop<callable *>(Stack); -#line 1198 "runtime.in" +#line 1166 "runtime.in" {Stack->push<bool>(a->compare(b)); return;} } -#line 1202 "runtime.in" +#line 1170 "runtime.in" void boolFuncNeq(stack *Stack) { callable * b=vm::pop<callable *>(Stack); callable * a=vm::pop<callable *>(Stack); -#line 1203 "runtime.in" +#line 1171 "runtime.in" {Stack->push<bool>(!(a->compare(b))); return;} } // Bit operations -#line 1209 "runtime.in" +#line 1177 "runtime.in" // Int AND(Int a, Int b); -void gen13(stack *Stack) +void gen_runtime13(stack *Stack) { Int b=vm::pop<Int>(Stack); Int a=vm::pop<Int>(Stack); -#line 1210 "runtime.in" +#line 1178 "runtime.in" {Stack->push<Int>(a & b); return;} } -#line 1215 "runtime.in" +#line 1183 "runtime.in" // Int OR(Int a, Int b); -void gen14(stack *Stack) +void gen_runtime14(stack *Stack) { Int b=vm::pop<Int>(Stack); Int a=vm::pop<Int>(Stack); -#line 1216 "runtime.in" +#line 1184 "runtime.in" {Stack->push<Int>(a | b); return;} } -#line 1220 "runtime.in" +#line 1188 "runtime.in" // Int XOR(Int a, Int b); -void gen15(stack *Stack) +void gen_runtime15(stack *Stack) { Int b=vm::pop<Int>(Stack); Int a=vm::pop<Int>(Stack); -#line 1221 "runtime.in" +#line 1189 "runtime.in" {Stack->push<Int>(a ^ b); return;} } -#line 1225 "runtime.in" +#line 1193 "runtime.in" // Int NOT(Int a); -void gen16(stack *Stack) +void gen_runtime16(stack *Stack) { Int a=vm::pop<Int>(Stack); -#line 1226 "runtime.in" +#line 1194 "runtime.in" {Stack->push<Int>(~a); return;} } // Casts -#line 1232 "runtime.in" +#line 1200 "runtime.in" void pairToGuide(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 1233 "runtime.in" +#line 1201 "runtime.in" {Stack->push<guide*>(new pairguide(z)); return;} } -#line 1238 "runtime.in" +#line 1206 "runtime.in" void pathToGuide(stack *Stack) { path p=vm::pop<path>(Stack); -#line 1239 "runtime.in" +#line 1207 "runtime.in" {Stack->push<guide*>(new pathguide(p)); return;} } -#line 1243 "runtime.in" +#line 1211 "runtime.in" void guideToPath(stack *Stack) { guide * g=vm::pop<guide *>(Stack); -#line 1244 "runtime.in" +#line 1212 "runtime.in" {Stack->push<path>(g->solve()); return;} } // Picture operations -#line 1250 "runtime.in" +#line 1218 "runtime.in" void newPicture(stack *Stack) { -#line 1251 "runtime.in" +#line 1219 "runtime.in" {Stack->push<picture*>(new picture()); return;} } -#line 1256 "runtime.in" +#line 1224 "runtime.in" // bool empty(picture *f); -void gen21(stack *Stack) +void gen_runtime21(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1257 "runtime.in" +#line 1225 "runtime.in" {Stack->push<bool>(f->null()); return;} } -#line 1261 "runtime.in" +#line 1229 "runtime.in" // void erase(picture *f); -void gen22(stack *Stack) +void gen_runtime22(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1262 "runtime.in" +#line 1230 "runtime.in" f->nodes.clear(); } -#line 1266 "runtime.in" +#line 1234 "runtime.in" // pair min(picture *f); -void gen23(stack *Stack) +void gen_runtime23(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1267 "runtime.in" +#line 1235 "runtime.in" {Stack->push<pair>(f->bounds().Min()); return;} } -#line 1271 "runtime.in" +#line 1239 "runtime.in" // pair max(picture *f); -void gen24(stack *Stack) +void gen_runtime24(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1272 "runtime.in" +#line 1240 "runtime.in" {Stack->push<pair>(f->bounds().Max()); return;} } -#line 1276 "runtime.in" +#line 1244 "runtime.in" // void label(picture *f, string *s, string *size, transform t, pair position, pair align, pen p); -void gen25(stack *Stack) +void gen_runtime25(stack *Stack) { pen p=vm::pop<pen>(Stack); pair align=vm::pop<pair>(Stack); @@ -1325,26 +1328,26 @@ void gen25(stack *Stack) string * size=vm::pop<string *>(Stack); string * s=vm::pop<string *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1278 "runtime.in" +#line 1246 "runtime.in" f->append(new drawLabel(*s,*size,t,position,align,p)); } -#line 1282 "runtime.in" +#line 1250 "runtime.in" // bool labels(picture *f); -void gen26(stack *Stack) +void gen_runtime26(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1283 "runtime.in" +#line 1251 "runtime.in" {Stack->push<bool>(f->havelabels()); return;} } -#line 1287 "runtime.in" +#line 1255 "runtime.in" // realarray* texsize(string *s, pen p=CURRENTPEN); -void gen27(stack *Stack) +void gen_runtime27(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); string * s=vm::pop<string *>(Stack); -#line 1288 "runtime.in" +#line 1256 "runtime.in" texinit(); processDataStruct &pd=processData(); @@ -1363,13 +1366,13 @@ void gen27(stack *Stack) {Stack->push<realarray*>(t); return;} } -#line 1307 "runtime.in" +#line 1275 "runtime.in" // patharray* _texpath(string *s, pen p=CURRENTPEN); -void gen28(stack *Stack) +void gen_runtime28(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); string * s=vm::pop<string *>(Stack); -#line 1308 "runtime.in" +#line 1276 "runtime.in" array *P=new array(0); if(s->empty()) {Stack->push<patharray*>(P); return;} @@ -1390,7 +1393,7 @@ void gen28(stack *Stack) tex.verbatimline(ASYx); tex.verbatimline(ASYy); tex.verbatimline("/ASY1 true def"); - tex.verbatimline("/v {neg exch 4 copy 4 2 roll 2 copy 6 2 roll 2 copy (M) print ASYy ASYx (L) print ASYy add ASYx (L) print add ASYy add ASYx (L) print add ASYy ASYx (c) print} bind def"); + tex.verbatimline("/v {"+ASY1+"neg exch 4 copy 4 2 roll 2 copy 6 2 roll 2 copy (M) print ASYy ASYx (L) print ASYy add ASYx (L) print add ASYy add ASYx (L) print add ASYy ASYx (c) print} bind def"); tex.verbatimline("/show {"+ASY1+ "currentpoint newpath moveto false charpath "+ pathforall+"} bind def}"); @@ -1466,13 +1469,13 @@ void gen28(stack *Stack) {Stack->push<patharray*>(pdf ? readpath(psname,keep,0.1) : readpath(psname,keep,0.12,-1.0)); return;} } -#line 1405 "runtime.in" +#line 1373 "runtime.in" // patharray* textpath(string *s, pen p=CURRENTPEN); -void gen29(stack *Stack) +void gen_runtime29(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); string * s=vm::pop<string *>(Stack); -#line 1406 "runtime.in" +#line 1374 "runtime.in" array *P=new array(0); if(s->empty()) {Stack->push<patharray*>(P); return;} @@ -1542,13 +1545,13 @@ void gen29(stack *Stack) {Stack->push<patharray*>(readpath(psname,keep,0.1)); return;} } -#line 1476 "runtime.in" +#line 1444 "runtime.in" // patharray* _strokepath(path g, pen p=CURRENTPEN); -void gen30(stack *Stack) +void gen_runtime30(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); path g=vm::pop<path>(Stack); -#line 1477 "runtime.in" +#line 1445 "runtime.in" array *P=new array(0); if(g.size() == 0) {Stack->push<patharray*>(P); return;} @@ -1572,33 +1575,33 @@ void gen30(stack *Stack) {Stack->push<patharray*>(readpath(psname,getSetting<bool>("keep"))); return;} } -#line 1501 "runtime.in" +#line 1469 "runtime.in" // void _draw(picture *f, path g, pen p); -void gen31(stack *Stack) +void gen_runtime31(stack *Stack) { pen p=vm::pop<pen>(Stack); path g=vm::pop<path>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1502 "runtime.in" +#line 1470 "runtime.in" f->append(new drawPath(g,p)); } -#line 1506 "runtime.in" +#line 1474 "runtime.in" // void fill(picture *f, patharray *g, pen p=CURRENTPEN, bool copy=true); -void gen32(stack *Stack) +void gen_runtime32(stack *Stack) { bool copy=vm::pop<bool>(Stack,true); pen p=vm::pop<pen>(Stack,CURRENTPEN); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1507 "runtime.in" +#line 1475 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; f->append(new drawFill(*copyarray(g),false,p)); } -#line 1512 "runtime.in" +#line 1480 "runtime.in" // void latticeshade(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, penarray2 *p, bool copy=true); -void gen33(stack *Stack) +void gen_runtime33(stack *Stack) { bool copy=vm::pop<bool>(Stack,true); penarray2 * p=vm::pop<penarray2 *>(Stack); @@ -1606,14 +1609,14 @@ void gen33(stack *Stack) bool stroke=vm::pop<bool>(Stack,false); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1514 "runtime.in" +#line 1482 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; f->append(new drawLatticeShade(*copyarray(g),stroke,fillrule,*copyarray(p))); } -#line 1519 "runtime.in" +#line 1487 "runtime.in" // void axialshade(picture *f, patharray *g, bool stroke=false, pen pena, pair a, pen penb, pair b, bool copy=true); -void gen34(stack *Stack) +void gen_runtime34(stack *Stack) { bool copy=vm::pop<bool>(Stack,true); pair b=vm::pop<pair>(Stack); @@ -1623,14 +1626,14 @@ void gen34(stack *Stack) bool stroke=vm::pop<bool>(Stack,false); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1521 "runtime.in" +#line 1489 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; f->append(new drawAxialShade(*copyarray(g),stroke,pena,a,penb,b)); } -#line 1526 "runtime.in" +#line 1494 "runtime.in" // void radialshade(picture *f, patharray *g, bool stroke=false, pen pena, pair a, real ra, pen penb, pair b, real rb, bool copy=true); -void gen35(stack *Stack) +void gen_runtime35(stack *Stack) { bool copy=vm::pop<bool>(Stack,true); real rb=vm::pop<real>(Stack); @@ -1642,14 +1645,14 @@ void gen35(stack *Stack) bool stroke=vm::pop<bool>(Stack,false); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1528 "runtime.in" +#line 1496 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; f->append(new drawRadialShade(*copyarray(g),stroke,pena,a,ra,penb,b,rb)); } -#line 1533 "runtime.in" +#line 1501 "runtime.in" // void gouraudshade(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, penarray *p, pairarray *z, Intarray *edges, bool copy=true); -void gen36(stack *Stack) +void gen_runtime36(stack *Stack) { bool copy=vm::pop<bool>(Stack,true); Intarray * edges=vm::pop<Intarray *>(Stack); @@ -1659,7 +1662,7 @@ void gen36(stack *Stack) bool stroke=vm::pop<bool>(Stack,false); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1536 "runtime.in" +#line 1504 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; checkArrays(p,z); checkArrays(z,edges); @@ -1667,9 +1670,9 @@ void gen36(stack *Stack) *copyarray(z),*copyarray(edges))); } -#line 1544 "runtime.in" +#line 1512 "runtime.in" // void gouraudshade(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, penarray *p, Intarray *edges, bool copy=true); -void gen37(stack *Stack) +void gen_runtime37(stack *Stack) { bool copy=vm::pop<bool>(Stack,true); Intarray * edges=vm::pop<Intarray *>(Stack); @@ -1678,7 +1681,7 @@ void gen37(stack *Stack) bool stroke=vm::pop<bool>(Stack,false); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1547 "runtime.in" +#line 1515 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; size_t n=checkArrays(p,edges); size_t m=checkArray(g); @@ -1699,9 +1702,9 @@ void gen37(stack *Stack) *z,*copyarray(edges))); } -#line 1568 "runtime.in" +#line 1536 "runtime.in" // void tensorshade(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, penarray2 *p, patharray *b=NULL, pairarray2 *z=emptyarray, bool copy=true); -void gen38(stack *Stack) +void gen_runtime38(stack *Stack) { bool copy=vm::pop<bool>(Stack,true); pairarray2 * z=vm::pop<pairarray2 *>(Stack,emptyarray); @@ -1711,7 +1714,7 @@ void gen38(stack *Stack) bool stroke=vm::pop<bool>(Stack,false); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1571 "runtime.in" +#line 1539 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; array *(*copyarray2)(array *a)=copy ? copyArray2: nop; if(b == NULL) b=g; @@ -1723,9 +1726,9 @@ void gen38(stack *Stack) *copyarray(b),*copyarray2(z))); } -#line 1583 "runtime.in" +#line 1551 "runtime.in" // void functionshade(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, string shader=emptystring, bool copy=true); -void gen39(stack *Stack) +void gen_runtime39(stack *Stack) { bool copy=vm::pop<bool>(Stack,true); string shader=vm::pop<string>(Stack,emptystring); @@ -1733,176 +1736,176 @@ void gen39(stack *Stack) bool stroke=vm::pop<bool>(Stack,false); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1586 "runtime.in" +#line 1554 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; f->append(new drawFunctionShade(*copyarray(g),stroke,fillrule,shader)); } // Clip a picture to a superpath using the given fill rule. // Subsequent additions to the picture will not be affected by the clipping. -#line 1593 "runtime.in" +#line 1561 "runtime.in" // void clip(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, bool copy=true); -void gen40(stack *Stack) +void gen_runtime40(stack *Stack) { bool copy=vm::pop<bool>(Stack,true); pen fillrule=vm::pop<pen>(Stack,CURRENTPEN); bool stroke=vm::pop<bool>(Stack,false); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1595 "runtime.in" +#line 1563 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; drawClipBegin *begin=new drawClipBegin(*copyarray(g),stroke,fillrule,true); f->enclose(begin,new drawClipEnd(true,begin)); } -#line 1601 "runtime.in" +#line 1569 "runtime.in" // void beginclip(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, bool copy=true); -void gen41(stack *Stack) +void gen_runtime41(stack *Stack) { bool copy=vm::pop<bool>(Stack,true); pen fillrule=vm::pop<pen>(Stack,CURRENTPEN); bool stroke=vm::pop<bool>(Stack,false); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1603 "runtime.in" +#line 1571 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; f->append(new drawClipBegin(*copyarray(g),stroke,fillrule,false)); } -#line 1608 "runtime.in" +#line 1576 "runtime.in" // void endclip(picture *f); -void gen42(stack *Stack) +void gen_runtime42(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1609 "runtime.in" +#line 1577 "runtime.in" f->append(new drawClipEnd(false)); } -#line 1613 "runtime.in" +#line 1581 "runtime.in" // void gsave(picture *f); -void gen43(stack *Stack) +void gen_runtime43(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1614 "runtime.in" +#line 1582 "runtime.in" f->append(new drawGsave()); } -#line 1618 "runtime.in" +#line 1586 "runtime.in" // void grestore(picture *f); -void gen44(stack *Stack) +void gen_runtime44(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1619 "runtime.in" +#line 1587 "runtime.in" f->append(new drawGrestore()); } -#line 1623 "runtime.in" +#line 1591 "runtime.in" // void begingroup(picture *f); -void gen45(stack *Stack) +void gen_runtime45(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1624 "runtime.in" +#line 1592 "runtime.in" f->append(new drawBegin()); } -#line 1628 "runtime.in" +#line 1596 "runtime.in" // void endgroup(picture *f); -void gen46(stack *Stack) +void gen_runtime46(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1629 "runtime.in" +#line 1597 "runtime.in" f->append(new drawEnd()); } -#line 1633 "runtime.in" +#line 1601 "runtime.in" // void add(picture *dest, picture *src); -void gen47(stack *Stack) +void gen_runtime47(stack *Stack) { picture * src=vm::pop<picture *>(Stack); picture * dest=vm::pop<picture *>(Stack); -#line 1634 "runtime.in" +#line 1602 "runtime.in" dest->add(*src); } -#line 1638 "runtime.in" +#line 1606 "runtime.in" // void prepend(picture *dest, picture *src); -void gen48(stack *Stack) +void gen_runtime48(stack *Stack) { picture * src=vm::pop<picture *>(Stack); picture * dest=vm::pop<picture *>(Stack); -#line 1639 "runtime.in" +#line 1607 "runtime.in" dest->prepend(*src); } -#line 1643 "runtime.in" +#line 1611 "runtime.in" // void postscript(picture *f, string s); -void gen49(stack *Stack) +void gen_runtime49(stack *Stack) { string s=vm::pop<string>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1644 "runtime.in" +#line 1612 "runtime.in" f->append(new drawVerbatim(PostScript,s)); } -#line 1648 "runtime.in" +#line 1616 "runtime.in" // void tex(picture *f, string s); -void gen50(stack *Stack) +void gen_runtime50(stack *Stack) { string s=vm::pop<string>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1649 "runtime.in" +#line 1617 "runtime.in" f->append(new drawVerbatim(TeX,s)); } -#line 1653 "runtime.in" +#line 1621 "runtime.in" // void postscript(picture *f, string s, pair min, pair max); -void gen51(stack *Stack) +void gen_runtime51(stack *Stack) { pair max=vm::pop<pair>(Stack); pair min=vm::pop<pair>(Stack); string s=vm::pop<string>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1654 "runtime.in" +#line 1622 "runtime.in" f->append(new drawVerbatim(PostScript,s,min,max)); } -#line 1658 "runtime.in" +#line 1626 "runtime.in" // void tex(picture *f, string s, pair min, pair max); -void gen52(stack *Stack) +void gen_runtime52(stack *Stack) { pair max=vm::pop<pair>(Stack); pair min=vm::pop<pair>(Stack); string s=vm::pop<string>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1659 "runtime.in" +#line 1627 "runtime.in" f->append(new drawVerbatim(TeX,s,min,max)); } -#line 1663 "runtime.in" +#line 1631 "runtime.in" // void texpreamble(string s); -void gen53(stack *Stack) +void gen_runtime53(stack *Stack) { string s=vm::pop<string>(Stack); -#line 1664 "runtime.in" +#line 1632 "runtime.in" string t=s+"\n"; processDataStruct &pd=processData(); pd.TeXpipepreamble.push_back(t); pd.TeXpreamble.push_back(t); } -#line 1671 "runtime.in" +#line 1639 "runtime.in" // void deletepreamble(); -void gen54(stack *) +void gen_runtime54(stack *) { -#line 1672 "runtime.in" +#line 1640 "runtime.in" if(getSetting<bool>("inlinetex")) { unlink(auxname(outname(),"pre").c_str()); } } -#line 1678 "runtime.in" +#line 1646 "runtime.in" // void _labelpath(picture *f, string s, string size, path g, string justify, pair offset, pen p); -void gen55(stack *Stack) +void gen_runtime55(stack *Stack) { pen p=vm::pop<pen>(Stack); pair offset=vm::pop<pair>(Stack); @@ -1911,42 +1914,42 @@ void gen55(stack *Stack) string size=vm::pop<string>(Stack); string s=vm::pop<string>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1680 "runtime.in" +#line 1648 "runtime.in" f->append(new drawLabelPath(s,size,g,justify,offset,p)); } -#line 1684 "runtime.in" +#line 1652 "runtime.in" // void texreset(); -void gen56(stack *) +void gen_runtime56(stack *) { -#line 1685 "runtime.in" +#line 1653 "runtime.in" processDataStruct &pd=processData(); pd.TeXpipepreamble.clear(); pd.TeXpreamble.clear(); pd.tex.pipeclose(); } -#line 1692 "runtime.in" +#line 1660 "runtime.in" // void layer(picture *f); -void gen57(stack *Stack) +void gen_runtime57(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1693 "runtime.in" +#line 1661 "runtime.in" f->append(new drawLayer()); } -#line 1697 "runtime.in" +#line 1665 "runtime.in" // void newpage(picture *f); -void gen58(stack *Stack) +void gen_runtime58(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1698 "runtime.in" +#line 1666 "runtime.in" f->append(new drawNewPage()); } -#line 1702 "runtime.in" +#line 1670 "runtime.in" // void _image(picture *f, realarray2 *data, pair initial, pair final, penarray *palette=NULL, transform t=identity, bool copy=true, bool antialias=false); -void gen59(stack *Stack) +void gen_runtime59(stack *Stack) { bool antialias=vm::pop<bool>(Stack,false); bool copy=vm::pop<bool>(Stack,true); @@ -1956,16 +1959,16 @@ void gen59(stack *Stack) pair initial=vm::pop<pair>(Stack); realarray2 * data=vm::pop<realarray2 *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1705 "runtime.in" +#line 1673 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; array *(*copyarray2)(array *a)=copy ? copyArray2: nop; f->append(new drawImage(*copyarray2(data),*copyarray(palette), t*matrix(initial,final),antialias)); } -#line 1712 "runtime.in" +#line 1680 "runtime.in" // void _image(picture *f, penarray2 *data, pair initial, pair final, transform t=identity, bool copy=true, bool antialias=false); -void gen60(stack *Stack) +void gen_runtime60(stack *Stack) { bool antialias=vm::pop<bool>(Stack,false); bool copy=vm::pop<bool>(Stack,true); @@ -1974,38 +1977,38 @@ void gen60(stack *Stack) pair initial=vm::pop<pair>(Stack); penarray2 * data=vm::pop<penarray2 *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1714 "runtime.in" +#line 1682 "runtime.in" array *(*copyarray2)(array *a)=copy ? copyArray2: nop; f->append(new drawImage(*copyarray2(data),t*matrix(initial,final),antialias)); } -#line 1719 "runtime.in" +#line 1687 "runtime.in" // string nativeformat(); -void gen61(stack *Stack) +void gen_runtime61(stack *Stack) { -#line 1720 "runtime.in" +#line 1688 "runtime.in" {Stack->push<string>(nativeformat()); return;} } -#line 1724 "runtime.in" +#line 1692 "runtime.in" // bool latex(); -void gen62(stack *Stack) +void gen_runtime62(stack *Stack) { -#line 1725 "runtime.in" +#line 1693 "runtime.in" {Stack->push<bool>(latex(getSetting<string>("tex"))); return;} } -#line 1729 "runtime.in" +#line 1697 "runtime.in" // bool pdf(); -void gen63(stack *Stack) +void gen_runtime63(stack *Stack) { -#line 1730 "runtime.in" +#line 1698 "runtime.in" {Stack->push<bool>(pdf(getSetting<string>("tex"))); return;} } -#line 1734 "runtime.in" +#line 1702 "runtime.in" // void shipout(string prefix=emptystring, picture *f, picture *preamble=NULL, string format=emptystring, bool wait=false, bool view=true, callableTransform *xform); -void gen64(stack *Stack) +void gen_runtime64(stack *Stack) { callableTransform * xform=vm::pop<callableTransform *>(Stack); bool view=vm::pop<bool>(Stack,true); @@ -2014,7 +2017,7 @@ void gen64(stack *Stack) picture * preamble=vm::pop<picture *>(Stack,NULL); picture * f=vm::pop<picture *>(Stack); string prefix=vm::pop<string>(Stack,emptystring); -#line 1737 "runtime.in" +#line 1705 "runtime.in" if(prefix.empty()) prefix=outname(); picture *result=new picture; @@ -2057,9 +2060,9 @@ void gen64(stack *Stack) result->shipout(preamble,prefix,format,0.0,wait,view); } -#line 1780 "runtime.in" +#line 1748 "runtime.in" // void shipout3(string prefix, picture *f, string format=emptystring, real width, real height, real angle, real zoom, triple m, triple M, pair shift, realarray2 *t, realarray *background, triplearray *lights, realarray2 *diffuse, realarray2 *ambient, realarray2 *specular, bool viewportlighting, bool view=true); -void gen65(stack *Stack) +void gen_runtime65(stack *Stack) { bool view=vm::pop<bool>(Stack,true); bool viewportlighting=vm::pop<bool>(Stack); @@ -2079,7 +2082,7 @@ void gen65(stack *Stack) string format=vm::pop<string>(Stack,emptystring); picture * f=vm::pop<picture *>(Stack); string prefix=vm::pop<string>(Stack); -#line 1786 "runtime.in" +#line 1754 "runtime.in" size_t n=checkArrays(lights,diffuse); checkEqual(n,checkArray(ambient)); checkEqual(n,checkArray(specular)); @@ -2091,25 +2094,25 @@ void gen65(stack *Stack) copyArray2C(specular,false,4),viewportlighting,view); } -#line 1798 "runtime.in" +#line 1766 "runtime.in" // void shipout3(string prefix, picture *f); -void gen66(stack *Stack) +void gen_runtime66(stack *Stack) { picture * f=vm::pop<picture *>(Stack); string prefix=vm::pop<string>(Stack); -#line 1799 "runtime.in" +#line 1767 "runtime.in" f->shipout3(prefix); } -#line 1803 "runtime.in" +#line 1771 "runtime.in" // void deconstruct(picture *f, picture *preamble=NULL, real magnification=1, callableTransform *xform); -void gen67(stack *Stack) +void gen_runtime67(stack *Stack) { callableTransform * xform=vm::pop<callableTransform *>(Stack); real magnification=vm::pop<real>(Stack,1); picture * preamble=vm::pop<picture *>(Stack,NULL); picture * f=vm::pop<picture *>(Stack); -#line 1805 "runtime.in" +#line 1773 "runtime.in" unsigned level=0; unsigned n=0; @@ -2230,214 +2233,214 @@ void gen67(stack *Stack) } } -#line 1926 "runtime.in" +#line 1894 "runtime.in" // void purge(Int divisor=0); -void gen68(stack *Stack) +void gen_runtime68(stack *Stack) { Int divisor=vm::pop<Int>(Stack,0); -#line 1927 "runtime.in" +#line 1895 "runtime.in" purge(divisor); } // Pen operations -#line 1933 "runtime.in" +#line 1901 "runtime.in" void newPen(stack *Stack) { -#line 1934 "runtime.in" +#line 1902 "runtime.in" {Stack->push<pen>(pen()); return;} } -#line 1939 "runtime.in" +#line 1907 "runtime.in" // bool ==(pen a, pen b); -void gen70(stack *Stack) +void gen_runtime70(stack *Stack) { pen b=vm::pop<pen>(Stack); pen a=vm::pop<pen>(Stack); -#line 1940 "runtime.in" +#line 1908 "runtime.in" {Stack->push<bool>(a == b); return;} } -#line 1944 "runtime.in" +#line 1912 "runtime.in" // bool !=(pen a, pen b); -void gen71(stack *Stack) +void gen_runtime71(stack *Stack) { pen b=vm::pop<pen>(Stack); pen a=vm::pop<pen>(Stack); -#line 1945 "runtime.in" +#line 1913 "runtime.in" {Stack->push<bool>(a != b); return;} } -#line 1949 "runtime.in" +#line 1917 "runtime.in" // pen +(pen a, pen b); -void gen72(stack *Stack) +void gen_runtime72(stack *Stack) { pen b=vm::pop<pen>(Stack); pen a=vm::pop<pen>(Stack); -#line 1950 "runtime.in" +#line 1918 "runtime.in" {Stack->push<pen>(a+b); return;} } -#line 1954 "runtime.in" +#line 1922 "runtime.in" // pen *(real a, pen b); -void gen73(stack *Stack) +void gen_runtime73(stack *Stack) { pen b=vm::pop<pen>(Stack); real a=vm::pop<real>(Stack); -#line 1955 "runtime.in" +#line 1923 "runtime.in" {Stack->push<pen>(a*b); return;} } -#line 1959 "runtime.in" +#line 1927 "runtime.in" // pen *(pen a, real b); -void gen74(stack *Stack) +void gen_runtime74(stack *Stack) { real b=vm::pop<real>(Stack); pen a=vm::pop<pen>(Stack); -#line 1960 "runtime.in" +#line 1928 "runtime.in" {Stack->push<pen>(b*a); return;} } -#line 1964 "runtime.in" +#line 1932 "runtime.in" // pair max(pen p); -void gen75(stack *Stack) +void gen_runtime75(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 1965 "runtime.in" +#line 1933 "runtime.in" {Stack->push<pair>(p.bounds().Max()); return;} } -#line 1969 "runtime.in" +#line 1937 "runtime.in" // pair min(pen p); -void gen76(stack *Stack) +void gen_runtime76(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 1970 "runtime.in" +#line 1938 "runtime.in" {Stack->push<pair>(p.bounds().Min()); return;} } // Reset the meaning of pen default attributes. -#line 1975 "runtime.in" +#line 1943 "runtime.in" // void resetdefaultpen(); -void gen77(stack *) +void gen_runtime77(stack *) { -#line 1976 "runtime.in" +#line 1944 "runtime.in" processData().defaultpen=camp::pen::initialpen(); } -#line 1980 "runtime.in" +#line 1948 "runtime.in" // void defaultpen(pen p); -void gen78(stack *Stack) +void gen_runtime78(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 1981 "runtime.in" +#line 1949 "runtime.in" processData().defaultpen=pen(resolvepen,p); } -#line 1985 "runtime.in" +#line 1953 "runtime.in" // pen defaultpen(); -void gen79(stack *Stack) +void gen_runtime79(stack *Stack) { -#line 1986 "runtime.in" +#line 1954 "runtime.in" {Stack->push<pen>(processData().defaultpen); return;} } -#line 1990 "runtime.in" +#line 1958 "runtime.in" // bool invisible(pen p); -void gen80(stack *Stack) +void gen_runtime80(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 1991 "runtime.in" +#line 1959 "runtime.in" {Stack->push<bool>(p.invisible()); return;} } -#line 1995 "runtime.in" +#line 1963 "runtime.in" // pen invisible(); -void gen81(stack *Stack) +void gen_runtime81(stack *Stack) { -#line 1996 "runtime.in" +#line 1964 "runtime.in" {Stack->push<pen>(pen(invisiblepen)); return;} } -#line 2000 "runtime.in" +#line 1968 "runtime.in" // pen gray(pen p); -void gen82(stack *Stack) +void gen_runtime82(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2001 "runtime.in" +#line 1969 "runtime.in" p.togrey(); {Stack->push<pen>(p); return;} } -#line 2006 "runtime.in" +#line 1974 "runtime.in" // pen rgb(pen p); -void gen83(stack *Stack) +void gen_runtime83(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2007 "runtime.in" +#line 1975 "runtime.in" p.torgb(); {Stack->push<pen>(p); return;} } -#line 2012 "runtime.in" +#line 1980 "runtime.in" // pen cmyk(pen p); -void gen84(stack *Stack) +void gen_runtime84(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2013 "runtime.in" +#line 1981 "runtime.in" p.tocmyk(); {Stack->push<pen>(p); return;} } -#line 2018 "runtime.in" +#line 1986 "runtime.in" // pen interp(pen a, pen b, real t); -void gen85(stack *Stack) +void gen_runtime85(stack *Stack) { real t=vm::pop<real>(Stack); pen b=vm::pop<pen>(Stack); pen a=vm::pop<pen>(Stack); -#line 2019 "runtime.in" +#line 1987 "runtime.in" {Stack->push<pen>(interpolate(a,b,t)); return;} } -#line 2023 "runtime.in" +#line 1991 "runtime.in" // pen rgb(real r, real g, real b); -void gen86(stack *Stack) +void gen_runtime86(stack *Stack) { real b=vm::pop<real>(Stack); real g=vm::pop<real>(Stack); real r=vm::pop<real>(Stack); -#line 2024 "runtime.in" +#line 1992 "runtime.in" {Stack->push<pen>(pen(r,g,b)); return;} } -#line 2028 "runtime.in" +#line 1996 "runtime.in" // pen cmyk(real c, real m, real y, real k); -void gen87(stack *Stack) +void gen_runtime87(stack *Stack) { real k=vm::pop<real>(Stack); real y=vm::pop<real>(Stack); real m=vm::pop<real>(Stack); real c=vm::pop<real>(Stack); -#line 2029 "runtime.in" +#line 1997 "runtime.in" {Stack->push<pen>(pen(c,m,y,k)); return;} } -#line 2033 "runtime.in" +#line 2001 "runtime.in" // pen gray(real gray); -void gen88(stack *Stack) +void gen_runtime88(stack *Stack) { real gray=vm::pop<real>(Stack); -#line 2034 "runtime.in" +#line 2002 "runtime.in" {Stack->push<pen>(pen(gray)); return;} } -#line 2038 "runtime.in" +#line 2006 "runtime.in" // realarray* colors(pen p); -void gen89(stack *Stack) +void gen_runtime89(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2039 "runtime.in" +#line 2007 "runtime.in" size_t n=ColorComponents[p.colorspace()]; array *a=new array(n); @@ -2464,60 +2467,60 @@ void gen89(stack *Stack) {Stack->push<realarray*>(a); return;} } -#line 2066 "runtime.in" +#line 2034 "runtime.in" // string colorspace(pen p); -void gen90(stack *Stack) +void gen_runtime90(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2067 "runtime.in" +#line 2035 "runtime.in" string s=ColorDeviceSuffix[p.colorspace()]; std::transform(s.begin(),s.end(),s.begin(),tolower); {Stack->push<string>(s); return;} } -#line 2073 "runtime.in" +#line 2041 "runtime.in" // pen pattern(string *s); -void gen91(stack *Stack) +void gen_runtime91(stack *Stack) { string * s=vm::pop<string *>(Stack); -#line 2074 "runtime.in" +#line 2042 "runtime.in" {Stack->push<pen>(pen(setpattern,*s)); return;} } -#line 2078 "runtime.in" +#line 2046 "runtime.in" // string pattern(pen p); -void gen92(stack *Stack) +void gen_runtime92(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2079 "runtime.in" +#line 2047 "runtime.in" {Stack->push<string>(p.fillpattern()); return;} } -#line 2083 "runtime.in" +#line 2051 "runtime.in" // pen fillrule(Int n); -void gen93(stack *Stack) +void gen_runtime93(stack *Stack) { Int n=vm::pop<Int>(Stack); -#line 2084 "runtime.in" +#line 2052 "runtime.in" {Stack->push<pen>(pen(n >= 0 && n < nFill ? (FillRule) n : DEFFILL)); return;} } -#line 2088 "runtime.in" +#line 2056 "runtime.in" // Int fillrule(pen p); -void gen94(stack *Stack) +void gen_runtime94(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2089 "runtime.in" +#line 2057 "runtime.in" {Stack->push<Int>(p.Fillrule()); return;} } -#line 2093 "runtime.in" +#line 2061 "runtime.in" // pen opacity(real opacity=1.0, string blend=defaulttransparency); -void gen95(stack *Stack) +void gen_runtime95(stack *Stack) { string blend=vm::pop<string>(Stack,defaulttransparency); real opacity=vm::pop<real>(Stack,1.0); -#line 2094 "runtime.in" +#line 2062 "runtime.in" for(Int i=0; i < nBlendMode; ++i) if(blend == BlendMode[i]) {Stack->push<pen>(pen(Transparency(blend,opacity))); return;} @@ -2526,301 +2529,301 @@ void gen95(stack *Stack) error(buf); } -#line 2103 "runtime.in" +#line 2071 "runtime.in" // real opacity(pen p); -void gen96(stack *Stack) +void gen_runtime96(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2104 "runtime.in" +#line 2072 "runtime.in" {Stack->push<real>(p.opacity()); return;} } -#line 2108 "runtime.in" +#line 2076 "runtime.in" // string blend(pen p); -void gen97(stack *Stack) +void gen_runtime97(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2109 "runtime.in" +#line 2077 "runtime.in" {Stack->push<string>(p.blend()); return;} } -#line 2113 "runtime.in" +#line 2081 "runtime.in" // pen linetype(string *s, real offset=0, bool scale=true, bool adjust=true); -void gen98(stack *Stack) +void gen_runtime98(stack *Stack) { bool adjust=vm::pop<bool>(Stack,true); bool scale=vm::pop<bool>(Stack,true); real offset=vm::pop<real>(Stack,0); string * s=vm::pop<string *>(Stack); -#line 2114 "runtime.in" +#line 2082 "runtime.in" {Stack->push<pen>(pen(LineType(*s,offset,scale,adjust))); return;} } -#line 2118 "runtime.in" +#line 2086 "runtime.in" // string linetype(pen p=CURRENTPEN); -void gen99(stack *Stack) +void gen_runtime99(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2119 "runtime.in" +#line 2087 "runtime.in" {Stack->push<string>(p.stroke()); return;} } -#line 2123 "runtime.in" +#line 2091 "runtime.in" // real offset(pen p); -void gen100(stack *Stack) +void gen_runtime100(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2124 "runtime.in" +#line 2092 "runtime.in" {Stack->push<real>(p.linetype().offset); return;} } -#line 2128 "runtime.in" +#line 2096 "runtime.in" // bool scale(pen p); -void gen101(stack *Stack) +void gen_runtime101(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2129 "runtime.in" +#line 2097 "runtime.in" {Stack->push<bool>(p.linetype().scale); return;} } -#line 2133 "runtime.in" +#line 2101 "runtime.in" // bool adjust(pen p); -void gen102(stack *Stack) +void gen_runtime102(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2134 "runtime.in" +#line 2102 "runtime.in" {Stack->push<bool>(p.linetype().adjust); return;} } -#line 2138 "runtime.in" +#line 2106 "runtime.in" // pen adjust(pen p, real arclength, bool cyclic); -void gen103(stack *Stack) +void gen_runtime103(stack *Stack) { bool cyclic=vm::pop<bool>(Stack); real arclength=vm::pop<real>(Stack); pen p=vm::pop<pen>(Stack); -#line 2139 "runtime.in" +#line 2107 "runtime.in" {Stack->push<pen>(adjustdash(p,arclength,cyclic)); return;} } -#line 2143 "runtime.in" +#line 2111 "runtime.in" // pen linecap(Int n); -void gen104(stack *Stack) +void gen_runtime104(stack *Stack) { Int n=vm::pop<Int>(Stack); -#line 2144 "runtime.in" +#line 2112 "runtime.in" {Stack->push<pen>(pen(setlinecap,n >= 0 && n < nCap ? n : DEFCAP)); return;} } -#line 2148 "runtime.in" +#line 2116 "runtime.in" // Int linecap(pen p=CURRENTPEN); -void gen105(stack *Stack) +void gen_runtime105(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2149 "runtime.in" +#line 2117 "runtime.in" {Stack->push<Int>(p.cap()); return;} } -#line 2153 "runtime.in" +#line 2121 "runtime.in" // pen linejoin(Int n); -void gen106(stack *Stack) +void gen_runtime106(stack *Stack) { Int n=vm::pop<Int>(Stack); -#line 2154 "runtime.in" +#line 2122 "runtime.in" {Stack->push<pen>(pen(setlinejoin,n >= 0 && n < nJoin ? n : DEFJOIN)); return;} } -#line 2158 "runtime.in" +#line 2126 "runtime.in" // Int linejoin(pen p=CURRENTPEN); -void gen107(stack *Stack) +void gen_runtime107(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2159 "runtime.in" +#line 2127 "runtime.in" {Stack->push<Int>(p.join()); return;} } -#line 2163 "runtime.in" +#line 2131 "runtime.in" // pen miterlimit(real x); -void gen108(stack *Stack) +void gen_runtime108(stack *Stack) { real x=vm::pop<real>(Stack); -#line 2164 "runtime.in" +#line 2132 "runtime.in" {Stack->push<pen>(pen(setmiterlimit,x >= 1.0 ? x : DEFJOIN)); return;} } -#line 2168 "runtime.in" +#line 2136 "runtime.in" // real miterlimit(pen p=CURRENTPEN); -void gen109(stack *Stack) +void gen_runtime109(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2169 "runtime.in" +#line 2137 "runtime.in" {Stack->push<real>(p.miter()); return;} } -#line 2173 "runtime.in" +#line 2141 "runtime.in" // pen linewidth(real x); -void gen110(stack *Stack) +void gen_runtime110(stack *Stack) { real x=vm::pop<real>(Stack); -#line 2174 "runtime.in" +#line 2142 "runtime.in" {Stack->push<pen>(pen(setlinewidth,x >= 0.0 ? x : DEFWIDTH)); return;} } -#line 2178 "runtime.in" +#line 2146 "runtime.in" // real linewidth(pen p=CURRENTPEN); -void gen111(stack *Stack) +void gen_runtime111(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2179 "runtime.in" +#line 2147 "runtime.in" {Stack->push<real>(p.width()); return;} } -#line 2183 "runtime.in" +#line 2151 "runtime.in" // pen fontcommand(string *s); -void gen112(stack *Stack) +void gen_runtime112(stack *Stack) { string * s=vm::pop<string *>(Stack); -#line 2184 "runtime.in" +#line 2152 "runtime.in" {Stack->push<pen>(pen(setfont,*s)); return;} } -#line 2188 "runtime.in" +#line 2156 "runtime.in" // string font(pen p=CURRENTPEN); -void gen113(stack *Stack) +void gen_runtime113(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2189 "runtime.in" +#line 2157 "runtime.in" {Stack->push<string>(p.Font()); return;} } -#line 2193 "runtime.in" +#line 2161 "runtime.in" // pen fontsize(real size, real lineskip); -void gen114(stack *Stack) +void gen_runtime114(stack *Stack) { real lineskip=vm::pop<real>(Stack); real size=vm::pop<real>(Stack); -#line 2194 "runtime.in" +#line 2162 "runtime.in" {Stack->push<pen>(pen(setfontsize,size > 0.0 ? size : 0.0, lineskip > 0.0 ? lineskip : 0.0)); return;} } -#line 2199 "runtime.in" +#line 2167 "runtime.in" // real fontsize(pen p=CURRENTPEN); -void gen115(stack *Stack) +void gen_runtime115(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2200 "runtime.in" +#line 2168 "runtime.in" {Stack->push<real>(p.size()); return;} } -#line 2204 "runtime.in" +#line 2172 "runtime.in" // real lineskip(pen p=CURRENTPEN); -void gen116(stack *Stack) +void gen_runtime116(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2205 "runtime.in" +#line 2173 "runtime.in" {Stack->push<real>(p.Lineskip()); return;} } -#line 2209 "runtime.in" +#line 2177 "runtime.in" // pen overwrite(Int n); -void gen117(stack *Stack) +void gen_runtime117(stack *Stack) { Int n=vm::pop<Int>(Stack); -#line 2210 "runtime.in" +#line 2178 "runtime.in" {Stack->push<pen>(pen(setoverwrite,n >= 0 && n < nOverwrite ? (overwrite_t) n : DEFWRITE)); return;} } -#line 2215 "runtime.in" +#line 2183 "runtime.in" // Int overwrite(pen p=CURRENTPEN); -void gen118(stack *Stack) +void gen_runtime118(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2216 "runtime.in" +#line 2184 "runtime.in" {Stack->push<Int>(p.Overwrite()); return;} } -#line 2220 "runtime.in" +#line 2188 "runtime.in" // pen basealign(Int n); -void gen119(stack *Stack) +void gen_runtime119(stack *Stack) { Int n=vm::pop<Int>(Stack); -#line 2221 "runtime.in" +#line 2189 "runtime.in" {Stack->push<pen>(pen(n >= 0 && n < nBaseLine ? (BaseLine) n : DEFBASE)); return;} } -#line 2225 "runtime.in" +#line 2193 "runtime.in" // Int basealign(pen p=CURRENTPEN); -void gen120(stack *Stack) +void gen_runtime120(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2226 "runtime.in" +#line 2194 "runtime.in" {Stack->push<Int>(p.Baseline()); return;} } -#line 2230 "runtime.in" +#line 2198 "runtime.in" // transform transform(pen p); -void gen121(stack *Stack) +void gen_runtime121(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2231 "runtime.in" +#line 2199 "runtime.in" {Stack->push<transform>(p.getTransform()); return;} } -#line 2235 "runtime.in" +#line 2203 "runtime.in" // path nib(pen p); -void gen122(stack *Stack) +void gen_runtime122(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2236 "runtime.in" +#line 2204 "runtime.in" {Stack->push<path>(p.Path()); return;} } -#line 2240 "runtime.in" +#line 2208 "runtime.in" // pen makepen(path p); -void gen123(stack *Stack) +void gen_runtime123(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2241 "runtime.in" +#line 2209 "runtime.in" {Stack->push<pen>(pen(p)); return;} } -#line 2245 "runtime.in" +#line 2213 "runtime.in" // pen colorless(pen p); -void gen124(stack *Stack) +void gen_runtime124(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2246 "runtime.in" +#line 2214 "runtime.in" p.colorless(); {Stack->push<pen>(p); return;} } // Interactive mode -#line 2252 "runtime.in" +#line 2220 "runtime.in" // bool interactive(); -void gen125(stack *Stack) +void gen_runtime125(stack *Stack) { -#line 2253 "runtime.in" +#line 2221 "runtime.in" {Stack->push<bool>(interact::interactive); return;} } -#line 2258 "runtime.in" +#line 2226 "runtime.in" // bool uptodate(); -void gen126(stack *Stack) +void gen_runtime126(stack *Stack) { -#line 2259 "runtime.in" +#line 2227 "runtime.in" {Stack->push<bool>(interact::uptodate); return;} } // System commands -#line 2265 "runtime.in" +#line 2233 "runtime.in" // Int system(stringarray *s); -void gen127(stack *Stack) +void gen_runtime127(stack *Stack) { stringarray * s=vm::pop<stringarray *>(Stack); -#line 2266 "runtime.in" +#line 2234 "runtime.in" if(safe) error("system() call disabled; override with option -nosafe"); size_t size=checkArray(s); if(size == 0) {Stack->push<Int>(0); return;} @@ -2830,166 +2833,162 @@ void gen127(stack *Stack) {Stack->push<Int>(System(cmd)); return;} } -#line 2277 "runtime.in" +#line 2245 "runtime.in" // bool view(); -void gen128(stack *Stack) +void gen_runtime128(stack *Stack) { -#line 2278 "runtime.in" +#line 2246 "runtime.in" {Stack->push<bool>(view()); return;} } -#line 2282 "runtime.in" +#line 2250 "runtime.in" // string asydir(); -void gen129(stack *Stack) +void gen_runtime129(stack *Stack) { -#line 2283 "runtime.in" +#line 2251 "runtime.in" {Stack->push<string>(systemDir); return;} } -#line 2287 "runtime.in" +#line 2255 "runtime.in" // string locale(string s=emptystring); -void gen130(stack *Stack) +void gen_runtime130(stack *Stack) { string s=vm::pop<string>(Stack,emptystring); -#line 2288 "runtime.in" +#line 2256 "runtime.in" char *L=setlocale(LC_ALL,s.empty() ? NULL : s.c_str()); {Stack->push<string>(L != NULL ? string(L) : ""); return;} } -#line 2293 "runtime.in" +#line 2261 "runtime.in" // void abort(string s=emptystring); -void gen131(stack *Stack) +void gen_runtime131(stack *Stack) { string s=vm::pop<string>(Stack,emptystring); -#line 2294 "runtime.in" +#line 2262 "runtime.in" if(s.empty()) throw handled_error(); error(s.c_str()); } -#line 2299 "runtime.in" +#line 2267 "runtime.in" // void exit(); -void gen132(stack *) +void gen_runtime132(stack *) { -#line 2300 "runtime.in" +#line 2268 "runtime.in" throw quit(); } -#line 2304 "runtime.in" +#line 2272 "runtime.in" // void assert(bool b, string s=emptystring); -void gen133(stack *Stack) +void gen_runtime133(stack *Stack) { string s=vm::pop<string>(Stack,emptystring); bool b=vm::pop<bool>(Stack); -#line 2305 "runtime.in" +#line 2273 "runtime.in" flush(cout); if(!b) { ostringstream buf; buf << "assert FAILED"; - if(s != "") buf << ": " << s << endl; + if(s != "") buf << ": " << s; error(buf); } } -#line 2315 "runtime.in" +#line 2283 "runtime.in" // void sleep(Int seconds); -void gen134(stack *Stack) +void gen_runtime134(stack *Stack) { Int seconds=vm::pop<Int>(Stack); -#line 2316 "runtime.in" +#line 2284 "runtime.in" if(seconds <= 0) return; sleep(seconds); } -#line 2321 "runtime.in" +#line 2289 "runtime.in" // void usleep(Int microseconds); -void gen135(stack *Stack) +void gen_runtime135(stack *Stack) { Int microseconds=vm::pop<Int>(Stack); -#line 2322 "runtime.in" +#line 2290 "runtime.in" if(microseconds <= 0) return; usleep((unsigned long) microseconds); } -#line 2327 "runtime.in" +#line 2295 "runtime.in" // void _eval(string *s, bool embedded, bool interactiveWrite=false); -void gen136(stack *Stack) +void gen_runtime136(stack *Stack) { bool interactiveWrite=vm::pop<bool>(Stack,false); bool embedded=vm::pop<bool>(Stack); string * s=vm::pop<string *>(Stack); -#line 2328 "runtime.in" - if (embedded) { +#line 2296 "runtime.in" + if(embedded) { trans::coenv *e=Stack->getEnvironment(); vm::interactiveStack *is=dynamic_cast<vm::interactiveStack *>(Stack); - if (e && is) { + if(e && is) runStringEmbedded(*s, *e, *is); - } else { - cerr << "no runtime environment for embedded eval" << endl; - } - } else { + else + error(noruntime); + } else runString(*s,interactiveWrite); - } } -#line 2342 "runtime.in" +#line 2308 "runtime.in" // void _eval(runnable *s, bool embedded); -void gen137(stack *Stack) +void gen_runtime137(stack *Stack) { bool embedded=vm::pop<bool>(Stack); runnable * s=vm::pop<runnable *>(Stack); -#line 2343 "runtime.in" +#line 2309 "runtime.in" absyntax::block *ast=new absyntax::block(s->getPos(), false); ast->add(s); - if (embedded) { + if(embedded) { trans::coenv *e=Stack->getEnvironment(); vm::interactiveStack *is=dynamic_cast<vm::interactiveStack *>(Stack); - if (e && is) { + if(e && is) runCodeEmbedded(ast, *e, *is); - } else { - cerr << "no runtime environment for embedded eval" << endl; - } - } else { + else + error(noruntime); + } else runCode(ast); - } } -#line 2360 "runtime.in" +#line 2324 "runtime.in" // string location(); -void gen138(stack *Stack) +void gen_runtime138(stack *Stack) { -#line 2361 "runtime.in" +#line 2325 "runtime.in" ostringstream buf; buf << getPos(); {Stack->push<string>(buf.str()); return;} } // Wrapper for the stack::load() method. -#line 2367 "runtime.in" +#line 2331 "runtime.in" void loadModule(stack *Stack) { string * index=vm::pop<string *>(Stack); -#line 2368 "runtime.in" +#line 2332 "runtime.in" Stack->load(*index); } -#line 2372 "runtime.in" +#line 2336 "runtime.in" // string cd(string s=emptystring); -void gen140(stack *Stack) +void gen_runtime140(stack *Stack) { string s=vm::pop<string>(Stack,emptystring); -#line 2373 "runtime.in" +#line 2337 "runtime.in" if(!s.empty() && !globalwrite()) writeDisabled(); {Stack->push<string>(setPath(s.c_str())); return;} } -#line 2378 "runtime.in" +#line 2342 "runtime.in" // void list(string *s, bool imports=false); -void gen141(stack *Stack) +void gen_runtime141(stack *Stack) { bool imports=vm::pop<bool>(Stack,false); string * s=vm::pop<string *>(Stack); -#line 2379 "runtime.in" +#line 2343 "runtime.in" if(*s == "-") return; trans::genv ge; symbol *name=symbol::trans(*s); @@ -2999,144 +2998,144 @@ void gen141(stack *Stack) // Path operations -#line 2389 "runtime.in" +#line 2353 "runtime.in" void nullPath(stack *Stack) { -#line 2390 "runtime.in" +#line 2354 "runtime.in" {Stack->push<path>(nullpath); return;} } -#line 2395 "runtime.in" +#line 2359 "runtime.in" // bool ==(path a, path b); -void gen143(stack *Stack) +void gen_runtime143(stack *Stack) { path b=vm::pop<path>(Stack); path a=vm::pop<path>(Stack); -#line 2396 "runtime.in" +#line 2360 "runtime.in" {Stack->push<bool>(a == b); return;} } -#line 2400 "runtime.in" +#line 2364 "runtime.in" // bool !=(path a, path b); -void gen144(stack *Stack) +void gen_runtime144(stack *Stack) { path b=vm::pop<path>(Stack); path a=vm::pop<path>(Stack); -#line 2401 "runtime.in" +#line 2365 "runtime.in" {Stack->push<bool>(!(a == b)); return;} } -#line 2405 "runtime.in" +#line 2369 "runtime.in" // pair point(path p, Int t); -void gen145(stack *Stack) +void gen_runtime145(stack *Stack) { Int t=vm::pop<Int>(Stack); path p=vm::pop<path>(Stack); -#line 2406 "runtime.in" +#line 2370 "runtime.in" {Stack->push<pair>(p.point((Int) t)); return;} } -#line 2410 "runtime.in" +#line 2374 "runtime.in" // pair point(path p, real t); -void gen146(stack *Stack) +void gen_runtime146(stack *Stack) { real t=vm::pop<real>(Stack); path p=vm::pop<path>(Stack); -#line 2411 "runtime.in" +#line 2375 "runtime.in" {Stack->push<pair>(p.point(t)); return;} } -#line 2415 "runtime.in" +#line 2379 "runtime.in" // pair precontrol(path p, Int t); -void gen147(stack *Stack) +void gen_runtime147(stack *Stack) { Int t=vm::pop<Int>(Stack); path p=vm::pop<path>(Stack); -#line 2416 "runtime.in" +#line 2380 "runtime.in" {Stack->push<pair>(p.precontrol((Int) t)); return;} } -#line 2420 "runtime.in" +#line 2384 "runtime.in" // pair precontrol(path p, real t); -void gen148(stack *Stack) +void gen_runtime148(stack *Stack) { real t=vm::pop<real>(Stack); path p=vm::pop<path>(Stack); -#line 2421 "runtime.in" +#line 2385 "runtime.in" {Stack->push<pair>(p.precontrol(t)); return;} } -#line 2425 "runtime.in" +#line 2389 "runtime.in" // pair postcontrol(path p, Int t); -void gen149(stack *Stack) +void gen_runtime149(stack *Stack) { Int t=vm::pop<Int>(Stack); path p=vm::pop<path>(Stack); -#line 2426 "runtime.in" +#line 2390 "runtime.in" {Stack->push<pair>(p.postcontrol((Int) t)); return;} } -#line 2430 "runtime.in" +#line 2394 "runtime.in" // pair postcontrol(path p, real t); -void gen150(stack *Stack) +void gen_runtime150(stack *Stack) { real t=vm::pop<real>(Stack); path p=vm::pop<path>(Stack); -#line 2431 "runtime.in" +#line 2395 "runtime.in" {Stack->push<pair>(p.postcontrol(t)); return;} } -#line 2435 "runtime.in" +#line 2399 "runtime.in" // pair dir(path p, Int t, Int sign=0, bool normalize=true); -void gen151(stack *Stack) +void gen_runtime151(stack *Stack) { bool normalize=vm::pop<bool>(Stack,true); Int sign=vm::pop<Int>(Stack,0); Int t=vm::pop<Int>(Stack); path p=vm::pop<path>(Stack); -#line 2436 "runtime.in" +#line 2400 "runtime.in" {Stack->push<pair>(p.dir(t,sign,normalize)); return;} } -#line 2440 "runtime.in" +#line 2404 "runtime.in" // pair dir(path p, real t, bool normalize=true); -void gen152(stack *Stack) +void gen_runtime152(stack *Stack) { bool normalize=vm::pop<bool>(Stack,true); real t=vm::pop<real>(Stack); path p=vm::pop<path>(Stack); -#line 2441 "runtime.in" +#line 2405 "runtime.in" {Stack->push<pair>(p.dir(t,normalize)); return;} } -#line 2445 "runtime.in" +#line 2409 "runtime.in" // pair accel(path p, Int t, Int sign=0); -void gen153(stack *Stack) +void gen_runtime153(stack *Stack) { Int sign=vm::pop<Int>(Stack,0); Int t=vm::pop<Int>(Stack); path p=vm::pop<path>(Stack); -#line 2446 "runtime.in" +#line 2410 "runtime.in" {Stack->push<pair>(p.accel(t,sign)); return;} } -#line 2450 "runtime.in" +#line 2414 "runtime.in" // pair accel(path p, real t); -void gen154(stack *Stack) +void gen_runtime154(stack *Stack) { real t=vm::pop<real>(Stack); path p=vm::pop<path>(Stack); -#line 2451 "runtime.in" +#line 2415 "runtime.in" {Stack->push<pair>(p.accel(t)); return;} } -#line 2455 "runtime.in" +#line 2419 "runtime.in" // real radius(path p, real t); -void gen155(stack *Stack) +void gen_runtime155(stack *Stack) { real t=vm::pop<real>(Stack); path p=vm::pop<path>(Stack); -#line 2456 "runtime.in" +#line 2420 "runtime.in" pair v=p.dir(t,false); pair a=p.accel(t); real d=dot(a,v); @@ -3147,40 +3146,40 @@ void gen155(stack *Stack) {Stack->push<real>(denom > 0 ? r/sqrt(denom) : 0.0); return;} } -#line 2467 "runtime.in" +#line 2431 "runtime.in" // path reverse(path p); -void gen156(stack *Stack) +void gen_runtime156(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2468 "runtime.in" +#line 2432 "runtime.in" {Stack->push<path>(p.reverse()); return;} } -#line 2472 "runtime.in" +#line 2436 "runtime.in" // path subpath(path p, Int a, Int b); -void gen157(stack *Stack) +void gen_runtime157(stack *Stack) { Int b=vm::pop<Int>(Stack); Int a=vm::pop<Int>(Stack); path p=vm::pop<path>(Stack); -#line 2473 "runtime.in" +#line 2437 "runtime.in" {Stack->push<path>(p.subpath((Int) a, (Int) b)); return;} } -#line 2477 "runtime.in" +#line 2441 "runtime.in" // path subpath(path p, real a, real b); -void gen158(stack *Stack) +void gen_runtime158(stack *Stack) { real b=vm::pop<real>(Stack); real a=vm::pop<real>(Stack); path p=vm::pop<path>(Stack); -#line 2478 "runtime.in" +#line 2442 "runtime.in" {Stack->push<path>(p.subpath(a,b)); return;} } -#line 2482 "runtime.in" +#line 2446 "runtime.in" // path nurb(pair z0, pair z1, pair z2, pair z3, real w0, real w1, real w2, real w3, Int m); -void gen159(stack *Stack) +void gen_runtime159(stack *Stack) { Int m=vm::pop<Int>(Stack); real w3=vm::pop<real>(Stack); @@ -3191,93 +3190,93 @@ void gen159(stack *Stack) pair z2=vm::pop<pair>(Stack); pair z1=vm::pop<pair>(Stack); pair z0=vm::pop<pair>(Stack); -#line 2484 "runtime.in" +#line 2448 "runtime.in" {Stack->push<path>(nurb(z0,z1,z2,z3,w0,w1,w2,w3,m)); return;} } -#line 2488 "runtime.in" +#line 2452 "runtime.in" // Int length(path p); -void gen160(stack *Stack) +void gen_runtime160(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2489 "runtime.in" +#line 2453 "runtime.in" {Stack->push<Int>(p.length()); return;} } -#line 2493 "runtime.in" +#line 2457 "runtime.in" // bool cyclic(path p); -void gen161(stack *Stack) +void gen_runtime161(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2494 "runtime.in" +#line 2458 "runtime.in" {Stack->push<bool>(p.cyclic()); return;} } -#line 2498 "runtime.in" +#line 2462 "runtime.in" // bool straight(path p, Int t); -void gen162(stack *Stack) +void gen_runtime162(stack *Stack) { Int t=vm::pop<Int>(Stack); path p=vm::pop<path>(Stack); -#line 2499 "runtime.in" +#line 2463 "runtime.in" {Stack->push<bool>(p.straight(t)); return;} } -#line 2503 "runtime.in" +#line 2467 "runtime.in" // path unstraighten(path p); -void gen163(stack *Stack) +void gen_runtime163(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2504 "runtime.in" +#line 2468 "runtime.in" {Stack->push<path>(p.unstraighten()); return;} } -#line 2508 "runtime.in" +#line 2472 "runtime.in" // bool piecewisestraight(path p); -void gen164(stack *Stack) +void gen_runtime164(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2509 "runtime.in" +#line 2473 "runtime.in" {Stack->push<bool>(p.piecewisestraight()); return;} } -#line 2513 "runtime.in" +#line 2477 "runtime.in" // real arclength(path p); -void gen165(stack *Stack) +void gen_runtime165(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2514 "runtime.in" +#line 2478 "runtime.in" {Stack->push<real>(p.arclength()); return;} } -#line 2518 "runtime.in" +#line 2482 "runtime.in" // real arctime(path p, real dval); -void gen166(stack *Stack) +void gen_runtime166(stack *Stack) { real dval=vm::pop<real>(Stack); path p=vm::pop<path>(Stack); -#line 2519 "runtime.in" +#line 2483 "runtime.in" {Stack->push<real>(p.arctime(dval)); return;} } -#line 2523 "runtime.in" +#line 2487 "runtime.in" // real dirtime(path p, pair z); -void gen167(stack *Stack) +void gen_runtime167(stack *Stack) { pair z=vm::pop<pair>(Stack); path p=vm::pop<path>(Stack); -#line 2524 "runtime.in" +#line 2488 "runtime.in" {Stack->push<real>(p.directiontime(z)); return;} } -#line 2528 "runtime.in" +#line 2492 "runtime.in" // realarray* intersect(path p, path q, real fuzz=-1); -void gen168(stack *Stack) +void gen_runtime168(stack *Stack) { real fuzz=vm::pop<real>(Stack,-1); path q=vm::pop<path>(Stack); path p=vm::pop<path>(Stack); -#line 2529 "runtime.in" +#line 2493 "runtime.in" bool exact=fuzz <= 0.0; if(fuzz < 0) fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())), @@ -3293,14 +3292,14 @@ void gen168(stack *Stack) {Stack->push<realarray*>(new array(0)); return;} } -#line 2545 "runtime.in" +#line 2509 "runtime.in" // realarray2* intersections(path p, path q, real fuzz=-1); -void gen169(stack *Stack) +void gen_runtime169(stack *Stack) { real fuzz=vm::pop<real>(Stack,-1); path q=vm::pop<path>(Stack); path p=vm::pop<path>(Stack); -#line 2546 "runtime.in" +#line 2510 "runtime.in" bool exact=fuzz <= 0.0; if(fuzz < 0.0) fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())), @@ -3330,15 +3329,15 @@ void gen169(stack *Stack) {Stack->push<realarray2*>(V); return;} } -#line 2576 "runtime.in" +#line 2540 "runtime.in" // realarray* intersections(path p, explicit pair a, explicit pair b, real fuzz=-1); -void gen170(stack *Stack) +void gen_runtime170(stack *Stack) { real fuzz=vm::pop<real>(Stack,-1); pair b=vm::pop<pair>(Stack); pair a=vm::pop<pair>(Stack); path p=vm::pop<path>(Stack); -#line 2577 "runtime.in" +#line 2541 "runtime.in" if(fuzz < 0) fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())), ::max(length(a),length(b))); @@ -3354,15 +3353,15 @@ void gen170(stack *Stack) // Return the intersection point of the extensions of the line segments // PQ and pq. -#line 2593 "runtime.in" +#line 2557 "runtime.in" // pair extension(pair P, pair Q, pair p, pair q); -void gen171(stack *Stack) +void gen_runtime171(stack *Stack) { pair q=vm::pop<pair>(Stack); pair p=vm::pop<pair>(Stack); pair Q=vm::pop<pair>(Stack); pair P=vm::pop<pair>(Stack); -#line 2594 "runtime.in" +#line 2558 "runtime.in" pair ac=P-Q; pair bd=q-p; real det=ac.getx()*bd.gety()-ac.gety()*bd.getx(); @@ -3370,49 +3369,49 @@ void gen171(stack *Stack) {Stack->push<pair>(P+((p.getx()-P.getx())*bd.gety()-(p.gety()-P.gety())*bd.getx())*ac/det); return;} } -#line 2602 "runtime.in" +#line 2566 "runtime.in" // Int size(path p); -void gen172(stack *Stack) +void gen_runtime172(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2603 "runtime.in" +#line 2567 "runtime.in" {Stack->push<Int>(p.size()); return;} } -#line 2607 "runtime.in" +#line 2571 "runtime.in" // path &(path p, path q); -void gen173(stack *Stack) +void gen_runtime173(stack *Stack) { path q=vm::pop<path>(Stack); path p=vm::pop<path>(Stack); -#line 2608 "runtime.in" +#line 2572 "runtime.in" {Stack->push<path>(camp::concat(p,q)); return;} } -#line 2612 "runtime.in" +#line 2576 "runtime.in" // pair min(path p); -void gen174(stack *Stack) +void gen_runtime174(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2613 "runtime.in" +#line 2577 "runtime.in" {Stack->push<pair>(p.min()); return;} } -#line 2617 "runtime.in" +#line 2581 "runtime.in" // pair max(path p); -void gen175(stack *Stack) +void gen_runtime175(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2618 "runtime.in" +#line 2582 "runtime.in" {Stack->push<pair>(p.max()); return;} } -#line 2622 "runtime.in" +#line 2586 "runtime.in" // realarray* mintimes(path p); -void gen176(stack *Stack) +void gen_runtime176(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2623 "runtime.in" +#line 2587 "runtime.in" array *V=new array(2); pair z=p.mintimes(); (*V)[0]=z.getx(); @@ -3420,12 +3419,12 @@ void gen176(stack *Stack) {Stack->push<realarray*>(V); return;} } -#line 2631 "runtime.in" +#line 2595 "runtime.in" // realarray* maxtimes(path p); -void gen177(stack *Stack) +void gen_runtime177(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2632 "runtime.in" +#line 2596 "runtime.in" array *V=new array(2); pair z=p.maxtimes(); (*V)[0]=z.getx(); @@ -3433,90 +3432,90 @@ void gen177(stack *Stack) {Stack->push<realarray*>(V); return;} } -#line 2640 "runtime.in" +#line 2604 "runtime.in" // real relativedistance(real theta, real phi, real t, bool atleast); -void gen178(stack *Stack) +void gen_runtime178(stack *Stack) { bool atleast=vm::pop<bool>(Stack); real t=vm::pop<real>(Stack); real phi=vm::pop<real>(Stack); real theta=vm::pop<real>(Stack); -#line 2641 "runtime.in" +#line 2605 "runtime.in" {Stack->push<real>(camp::velocity(theta,phi,tension(t,atleast))); return;} } -#line 2645 "runtime.in" +#line 2609 "runtime.in" // Int windingnumber(patharray *p, pair z); -void gen179(stack *Stack) +void gen_runtime179(stack *Stack) { pair z=vm::pop<pair>(Stack); patharray * p=vm::pop<patharray *>(Stack); -#line 2646 "runtime.in" +#line 2610 "runtime.in" {Stack->push<Int>(windingnumber(p,z)); return;} } -#line 2650 "runtime.in" +#line 2614 "runtime.in" // bool inside(explicit patharray *g, pair z, pen fillrule=CURRENTPEN); -void gen180(stack *Stack) +void gen_runtime180(stack *Stack) { pen fillrule=vm::pop<pen>(Stack,CURRENTPEN); pair z=vm::pop<pair>(Stack); patharray * g=vm::pop<patharray *>(Stack); -#line 2651 "runtime.in" +#line 2615 "runtime.in" {Stack->push<bool>(fillrule.inside(windingnumber(g,z))); return;} } -#line 2655 "runtime.in" +#line 2619 "runtime.in" // bool inside(path g, pair z, pen fillrule=CURRENTPEN); -void gen181(stack *Stack) +void gen_runtime181(stack *Stack) { pen fillrule=vm::pop<pen>(Stack,CURRENTPEN); pair z=vm::pop<pair>(Stack); path g=vm::pop<path>(Stack); -#line 2656 "runtime.in" +#line 2620 "runtime.in" {Stack->push<bool>(fillrule.inside(g.windingnumber(z))); return;} } // Determine the side of a--b that c lies on // (negative=left, zero=on line, positive=right). -#line 2662 "runtime.in" +#line 2626 "runtime.in" // real side(pair a, pair b, pair c); -void gen182(stack *Stack) +void gen_runtime182(stack *Stack) { pair c=vm::pop<pair>(Stack); pair b=vm::pop<pair>(Stack); pair a=vm::pop<pair>(Stack); -#line 2663 "runtime.in" +#line 2627 "runtime.in" {Stack->push<real>(orient2d(a,b,c)); return;} } // Determine the side of the counterclockwise circle through a,b,c that d // lies on (negative=inside, 0=on circle, positive=right). -#line 2669 "runtime.in" +#line 2633 "runtime.in" // real incircle(pair a, pair b, pair c, pair d); -void gen183(stack *Stack) +void gen_runtime183(stack *Stack) { pair d=vm::pop<pair>(Stack); pair c=vm::pop<pair>(Stack); pair b=vm::pop<pair>(Stack); pair a=vm::pop<pair>(Stack); -#line 2670 "runtime.in" +#line 2634 "runtime.in" {Stack->push<real>(incircle(a.getx(),a.gety(),b.getx(),b.gety(),c.getx(),c.gety(), d.getx(),d.gety())); return;} } // Path3 operations -#line 2677 "runtime.in" +#line 2641 "runtime.in" // path3 path3(triplearray *pre, triplearray *point, triplearray *post, boolarray *straight, bool cyclic); -void gen184(stack *Stack) +void gen_runtime184(stack *Stack) { bool cyclic=vm::pop<bool>(Stack); boolarray * straight=vm::pop<boolarray *>(Stack); triplearray * post=vm::pop<triplearray *>(Stack); triplearray * point=vm::pop<triplearray *>(Stack); triplearray * pre=vm::pop<triplearray *>(Stack); -#line 2679 "runtime.in" +#line 2643 "runtime.in" size_t n=checkArrays(pre,point); checkEqual(n,checkArray(post)); checkEqual(n,checkArray(straight)); @@ -3531,144 +3530,144 @@ void gen184(stack *Stack) {Stack->push<path3>(path3(nodes,(Int) n,cyclic)); return;} } -#line 2695 "runtime.in" +#line 2659 "runtime.in" void nullPath3(stack *Stack) { -#line 2696 "runtime.in" +#line 2660 "runtime.in" {Stack->push<path3>(nullpath3); return;} } -#line 2700 "runtime.in" +#line 2664 "runtime.in" // bool ==(path3 a, path3 b); -void gen186(stack *Stack) +void gen_runtime186(stack *Stack) { path3 b=vm::pop<path3>(Stack); path3 a=vm::pop<path3>(Stack); -#line 2701 "runtime.in" +#line 2665 "runtime.in" {Stack->push<bool>(a == b); return;} } -#line 2705 "runtime.in" +#line 2669 "runtime.in" // bool !=(path3 a, path3 b); -void gen187(stack *Stack) +void gen_runtime187(stack *Stack) { path3 b=vm::pop<path3>(Stack); path3 a=vm::pop<path3>(Stack); -#line 2706 "runtime.in" +#line 2670 "runtime.in" {Stack->push<bool>(!(a == b)); return;} } -#line 2710 "runtime.in" +#line 2674 "runtime.in" // triple point(path3 p, Int t); -void gen188(stack *Stack) +void gen_runtime188(stack *Stack) { Int t=vm::pop<Int>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2711 "runtime.in" +#line 2675 "runtime.in" {Stack->push<triple>(p.point((Int) t)); return;} } -#line 2715 "runtime.in" +#line 2679 "runtime.in" // triple point(path3 p, real t); -void gen189(stack *Stack) +void gen_runtime189(stack *Stack) { real t=vm::pop<real>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2716 "runtime.in" +#line 2680 "runtime.in" {Stack->push<triple>(p.point(t)); return;} } -#line 2720 "runtime.in" +#line 2684 "runtime.in" // triple precontrol(path3 p, Int t); -void gen190(stack *Stack) +void gen_runtime190(stack *Stack) { Int t=vm::pop<Int>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2721 "runtime.in" +#line 2685 "runtime.in" {Stack->push<triple>(p.precontrol((Int) t)); return;} } -#line 2725 "runtime.in" +#line 2689 "runtime.in" // triple precontrol(path3 p, real t); -void gen191(stack *Stack) +void gen_runtime191(stack *Stack) { real t=vm::pop<real>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2726 "runtime.in" +#line 2690 "runtime.in" {Stack->push<triple>(p.precontrol(t)); return;} } -#line 2730 "runtime.in" +#line 2694 "runtime.in" // triple postcontrol(path3 p, Int t); -void gen192(stack *Stack) +void gen_runtime192(stack *Stack) { Int t=vm::pop<Int>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2731 "runtime.in" +#line 2695 "runtime.in" {Stack->push<triple>(p.postcontrol((Int) t)); return;} } -#line 2735 "runtime.in" +#line 2699 "runtime.in" // triple postcontrol(path3 p, real t); -void gen193(stack *Stack) +void gen_runtime193(stack *Stack) { real t=vm::pop<real>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2736 "runtime.in" +#line 2700 "runtime.in" {Stack->push<triple>(p.postcontrol(t)); return;} } -#line 2740 "runtime.in" +#line 2704 "runtime.in" // triple dir(path3 p, Int t, Int sign=0, bool normalize=true); -void gen194(stack *Stack) +void gen_runtime194(stack *Stack) { bool normalize=vm::pop<bool>(Stack,true); Int sign=vm::pop<Int>(Stack,0); Int t=vm::pop<Int>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2741 "runtime.in" +#line 2705 "runtime.in" {Stack->push<triple>(p.dir(t,sign,normalize)); return;} } -#line 2745 "runtime.in" +#line 2709 "runtime.in" // triple dir(path3 p, real t, bool normalize=true); -void gen195(stack *Stack) +void gen_runtime195(stack *Stack) { bool normalize=vm::pop<bool>(Stack,true); real t=vm::pop<real>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2746 "runtime.in" +#line 2710 "runtime.in" {Stack->push<triple>(p.dir(t,normalize)); return;} } -#line 2750 "runtime.in" +#line 2714 "runtime.in" // triple accel(path3 p, Int t, Int sign=0); -void gen196(stack *Stack) +void gen_runtime196(stack *Stack) { Int sign=vm::pop<Int>(Stack,0); Int t=vm::pop<Int>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2751 "runtime.in" +#line 2715 "runtime.in" {Stack->push<triple>(p.accel(t,sign)); return;} } -#line 2755 "runtime.in" +#line 2719 "runtime.in" // triple accel(path3 p, real t); -void gen197(stack *Stack) +void gen_runtime197(stack *Stack) { real t=vm::pop<real>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2756 "runtime.in" +#line 2720 "runtime.in" {Stack->push<triple>(p.accel(t)); return;} } -#line 2760 "runtime.in" +#line 2724 "runtime.in" // real radius(path3 p, real t); -void gen198(stack *Stack) +void gen_runtime198(stack *Stack) { real t=vm::pop<real>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2761 "runtime.in" +#line 2725 "runtime.in" triple v=p.dir(t,false); triple a=p.accel(t); real d=dot(a,v); @@ -3679,16 +3678,16 @@ void gen198(stack *Stack) {Stack->push<real>(denom > 0 ? r/sqrt(denom) : 0.0); return;} } -#line 2772 "runtime.in" +#line 2736 "runtime.in" // real radius(triple z0, triple c0, triple c1, triple z1, real t); -void gen199(stack *Stack) +void gen_runtime199(stack *Stack) { real t=vm::pop<real>(Stack); triple z1=vm::pop<triple>(Stack); triple c1=vm::pop<triple>(Stack); triple c0=vm::pop<triple>(Stack); triple z0=vm::pop<triple>(Stack); -#line 2773 "runtime.in" +#line 2737 "runtime.in" triple v=(3.0*(z1-z0)+9.0*(c0-c1))*t*t+(6.0*(z0+c1)-12.0*c0)*t+3.0*(c0-z0); triple a=6.0*(z1-z0+3.0*(c0-c1))*t+6.0*(z0+c1)-12.0*c0; real d=dot(a,v); @@ -3699,85 +3698,85 @@ void gen199(stack *Stack) {Stack->push<real>(denom > 0 ? r/sqrt(denom) : 0.0); return;} } -#line 2784 "runtime.in" +#line 2748 "runtime.in" // path3 reverse(path3 p); -void gen200(stack *Stack) +void gen_runtime200(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2785 "runtime.in" +#line 2749 "runtime.in" {Stack->push<path3>(p.reverse()); return;} } -#line 2789 "runtime.in" +#line 2753 "runtime.in" // path3 subpath(path3 p, Int a, Int b); -void gen201(stack *Stack) +void gen_runtime201(stack *Stack) { Int b=vm::pop<Int>(Stack); Int a=vm::pop<Int>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2790 "runtime.in" +#line 2754 "runtime.in" {Stack->push<path3>(p.subpath((Int) a, (Int) b)); return;} } -#line 2794 "runtime.in" +#line 2758 "runtime.in" // path3 subpath(path3 p, real a, real b); -void gen202(stack *Stack) +void gen_runtime202(stack *Stack) { real b=vm::pop<real>(Stack); real a=vm::pop<real>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2795 "runtime.in" +#line 2759 "runtime.in" {Stack->push<path3>(p.subpath(a,b)); return;} } -#line 2799 "runtime.in" +#line 2763 "runtime.in" // Int length(path3 p); -void gen203(stack *Stack) +void gen_runtime203(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2800 "runtime.in" +#line 2764 "runtime.in" {Stack->push<Int>(p.length()); return;} } -#line 2804 "runtime.in" +#line 2768 "runtime.in" // bool cyclic(path3 p); -void gen204(stack *Stack) +void gen_runtime204(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2805 "runtime.in" +#line 2769 "runtime.in" {Stack->push<bool>(p.cyclic()); return;} } -#line 2809 "runtime.in" +#line 2773 "runtime.in" // bool straight(path3 p, Int t); -void gen205(stack *Stack) +void gen_runtime205(stack *Stack) { Int t=vm::pop<Int>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2810 "runtime.in" +#line 2774 "runtime.in" {Stack->push<bool>(p.straight(t)); return;} } // Return the component of vector v perpendicular to a unit vector u. -#line 2815 "runtime.in" +#line 2779 "runtime.in" // triple perp(triple v, triple u); -void gen206(stack *Stack) +void gen_runtime206(stack *Stack) { triple u=vm::pop<triple>(Stack); triple v=vm::pop<triple>(Stack); -#line 2816 "runtime.in" - {Stack->push<triple>(v-dot(v,u)*u); return;} +#line 2780 "runtime.in" + {Stack->push<triple>(perp(v,u)); return;} } // Return the maximum perpendicular deviation of segment i of path3 g // from a straight line. -#line 2822 "runtime.in" +#line 2786 "runtime.in" // real straightness(path3 p, Int t); -void gen207(stack *Stack) +void gen_runtime207(stack *Stack) { Int t=vm::pop<Int>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2823 "runtime.in" +#line 2787 "runtime.in" if(p.straight(t)) {Stack->push<real>(0); return;} triple z0=p.point(t); triple u=unit(p.point(t+1)-z0); @@ -3787,55 +3786,55 @@ void gen207(stack *Stack) // Return the maximum perpendicular deviation of z0..controls c0 and c1..z1 // from a straight line. -#line 2833 "runtime.in" +#line 2797 "runtime.in" // real straightness(triple z0, triple c0, triple c1, triple z1); -void gen208(stack *Stack) +void gen_runtime208(stack *Stack) { triple z1=vm::pop<triple>(Stack); triple c1=vm::pop<triple>(Stack); triple c0=vm::pop<triple>(Stack); triple z0=vm::pop<triple>(Stack); -#line 2834 "runtime.in" +#line 2798 "runtime.in" triple u=unit(z1-z0); {Stack->push<real>(::max(length(perp(c0-z0,u)),length(perp(c1-z0,u)))); return;} } -#line 2839 "runtime.in" +#line 2803 "runtime.in" // bool piecewisestraight(path3 p); -void gen209(stack *Stack) +void gen_runtime209(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2840 "runtime.in" +#line 2804 "runtime.in" {Stack->push<bool>(p.piecewisestraight()); return;} } -#line 2844 "runtime.in" +#line 2808 "runtime.in" // real arclength(path3 p); -void gen210(stack *Stack) +void gen_runtime210(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2845 "runtime.in" +#line 2809 "runtime.in" {Stack->push<real>(p.arclength()); return;} } -#line 2849 "runtime.in" +#line 2813 "runtime.in" // real arctime(path3 p, real dval); -void gen211(stack *Stack) +void gen_runtime211(stack *Stack) { real dval=vm::pop<real>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2850 "runtime.in" +#line 2814 "runtime.in" {Stack->push<real>(p.arctime(dval)); return;} } -#line 2854 "runtime.in" +#line 2818 "runtime.in" // realarray* intersect(path3 p, path3 q, real fuzz=-1); -void gen212(stack *Stack) +void gen_runtime212(stack *Stack) { real fuzz=vm::pop<real>(Stack,-1); path3 q=vm::pop<path3>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2855 "runtime.in" +#line 2819 "runtime.in" bool exact=fuzz <= 0.0; if(fuzz < 0) fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())), @@ -3852,14 +3851,14 @@ void gen212(stack *Stack) {Stack->push<realarray*>(new array(0)); return;} } -#line 2872 "runtime.in" +#line 2836 "runtime.in" // realarray2* intersections(path3 p, path3 q, real fuzz=-1); -void gen213(stack *Stack) +void gen_runtime213(stack *Stack) { real fuzz=vm::pop<real>(Stack,-1); path3 q=vm::pop<path3>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2873 "runtime.in" +#line 2837 "runtime.in" bool exact=fuzz <= 0.0; if(fuzz < 0) fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())), @@ -3891,14 +3890,14 @@ void gen213(stack *Stack) {Stack->push<realarray2*>(V); return;} } -#line 2905 "runtime.in" +#line 2869 "runtime.in" // realarray2* intersections(path3 p, triplearray2 *P, real fuzz=-1); -void gen214(stack *Stack) +void gen_runtime214(stack *Stack) { real fuzz=vm::pop<real>(Stack,-1); triplearray2 * P=vm::pop<triplearray2 *>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2906 "runtime.in" +#line 2870 "runtime.in" triple *A=copyTripleArray2C(P,true,4); if(fuzz <= 0) fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())), norm(A,16)); @@ -3917,49 +3916,49 @@ void gen214(stack *Stack) {Stack->push<realarray2*>(W); return;} // Sorting will done in asy. } -#line 2925 "runtime.in" +#line 2889 "runtime.in" // Int size(path3 p); -void gen215(stack *Stack) +void gen_runtime215(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2926 "runtime.in" +#line 2890 "runtime.in" {Stack->push<Int>(p.size()); return;} } -#line 2930 "runtime.in" +#line 2894 "runtime.in" // path3 &(path3 p, path3 q); -void gen216(stack *Stack) +void gen_runtime216(stack *Stack) { path3 q=vm::pop<path3>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2931 "runtime.in" +#line 2895 "runtime.in" {Stack->push<path3>(camp::concat(p,q)); return;} } -#line 2935 "runtime.in" +#line 2899 "runtime.in" // triple min(path3 p); -void gen217(stack *Stack) +void gen_runtime217(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2936 "runtime.in" +#line 2900 "runtime.in" {Stack->push<triple>(p.min()); return;} } -#line 2940 "runtime.in" +#line 2904 "runtime.in" // triple max(path3 p); -void gen218(stack *Stack) +void gen_runtime218(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2941 "runtime.in" +#line 2905 "runtime.in" {Stack->push<triple>(p.max()); return;} } -#line 2945 "runtime.in" +#line 2909 "runtime.in" // realarray* mintimes(path3 p); -void gen219(stack *Stack) +void gen_runtime219(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2946 "runtime.in" +#line 2910 "runtime.in" array *V=new array(3); triple v=p.mintimes(); (*V)[0]=v.getx(); @@ -3968,12 +3967,12 @@ void gen219(stack *Stack) {Stack->push<realarray*>(V); return;} } -#line 2955 "runtime.in" +#line 2919 "runtime.in" // realarray* maxtimes(path3 p); -void gen220(stack *Stack) +void gen_runtime220(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2956 "runtime.in" +#line 2920 "runtime.in" array *V=new array(3); triple v=p.maxtimes(); (*V)[0]=v.getx(); @@ -3982,30 +3981,30 @@ void gen220(stack *Stack) {Stack->push<realarray*>(V); return;} } -#line 2965 "runtime.in" +#line 2929 "runtime.in" // path3 *(realarray2 *t, path3 g); -void gen221(stack *Stack) +void gen_runtime221(stack *Stack) { path3 g=vm::pop<path3>(Stack); realarray2 * t=vm::pop<realarray2 *>(Stack); -#line 2966 "runtime.in" +#line 2930 "runtime.in" {Stack->push<path3>(transformed(*t,g)); return;} } // Guide operations -#line 2972 "runtime.in" +#line 2936 "runtime.in" void nullGuide(stack *Stack) { -#line 2973 "runtime.in" +#line 2937 "runtime.in" {Stack->push<guide*>(new pathguide(path())); return;} } -#line 2978 "runtime.in" +#line 2942 "runtime.in" void dotsGuide(stack *Stack) { guidearray * a=vm::pop<guidearray *>(Stack); -#line 2979 "runtime.in" +#line 2943 "runtime.in" guidevector v; size_t size=checkArray(a); for (size_t i=0; i < size; ++i) @@ -4014,11 +4013,11 @@ void dotsGuide(stack *Stack) {Stack->push<guide*>(new multiguide(v)); return;} } -#line 2988 "runtime.in" +#line 2952 "runtime.in" void dashesGuide(stack *Stack) { guidearray * a=vm::pop<guidearray *>(Stack); -#line 2989 "runtime.in" +#line 2953 "runtime.in" static camp::curlSpec curly; static specguide curlout(&curly, camp::OUT); static specguide curlin(&curly, camp::IN); @@ -4044,179 +4043,179 @@ void dashesGuide(stack *Stack) {Stack->push<guide*>(new multiguide(v)); return;} } -#line 3015 "runtime.in" +#line 2979 "runtime.in" void newCycleToken(stack *Stack) { -#line 3016 "runtime.in" +#line 2980 "runtime.in" {Stack->push<cycleToken>(cycleToken()); return;} } -#line 3020 "runtime.in" +#line 2984 "runtime.in" // guide* operator cast(cycleToken tok); -void gen226(stack *Stack) +void gen_runtime226(stack *Stack) { cycleToken tok=vm::pop<cycleToken>(Stack); -#line 3021 "runtime.in" +#line 2985 "runtime.in" // Avoid unused variable warning messages. unused(&tok); {Stack->push<guide*>(new cycletokguide()); return;} } -#line 3027 "runtime.in" +#line 2991 "runtime.in" // guide* operator spec(pair z, Int p); -void gen227(stack *Stack) +void gen_runtime227(stack *Stack) { Int p=vm::pop<Int>(Stack); pair z=vm::pop<pair>(Stack); -#line 3028 "runtime.in" +#line 2992 "runtime.in" camp::side d=(camp::side) p; camp::dirSpec *sp=new camp::dirSpec(z); {Stack->push<guide*>(new specguide(sp,d)); return;} } -#line 3035 "runtime.in" +#line 2999 "runtime.in" // curlSpecifier operator curl(real gamma, Int p); -void gen228(stack *Stack) +void gen_runtime228(stack *Stack) { Int p=vm::pop<Int>(Stack); real gamma=vm::pop<real>(Stack); -#line 3036 "runtime.in" +#line 3000 "runtime.in" camp::side s=(camp::side) p; {Stack->push<curlSpecifier>(curlSpecifier(gamma,s)); return;} } -#line 3041 "runtime.in" +#line 3005 "runtime.in" void curlSpecifierValuePart(stack *Stack) { curlSpecifier spec=vm::pop<curlSpecifier>(Stack); -#line 3042 "runtime.in" +#line 3006 "runtime.in" {Stack->push<real>(spec.getValue()); return;} } -#line 3046 "runtime.in" +#line 3010 "runtime.in" void curlSpecifierSidePart(stack *Stack) { curlSpecifier spec=vm::pop<curlSpecifier>(Stack); -#line 3047 "runtime.in" +#line 3011 "runtime.in" {Stack->push<Int>(spec.getSide()); return;} } -#line 3051 "runtime.in" +#line 3015 "runtime.in" // guide* operator cast(curlSpecifier spec); -void gen231(stack *Stack) +void gen_runtime231(stack *Stack) { curlSpecifier spec=vm::pop<curlSpecifier>(Stack); -#line 3052 "runtime.in" +#line 3016 "runtime.in" {Stack->push<guide*>(new specguide(spec)); return;} } -#line 3056 "runtime.in" +#line 3020 "runtime.in" // tensionSpecifier operator tension(real tout, real tin, bool atleast); -void gen232(stack *Stack) +void gen_runtime232(stack *Stack) { bool atleast=vm::pop<bool>(Stack); real tin=vm::pop<real>(Stack); real tout=vm::pop<real>(Stack); -#line 3057 "runtime.in" +#line 3021 "runtime.in" {Stack->push<tensionSpecifier>(tensionSpecifier(tout, tin, atleast)); return;} } -#line 3061 "runtime.in" +#line 3025 "runtime.in" void tensionSpecifierOutPart(stack *Stack) { tensionSpecifier t=vm::pop<tensionSpecifier>(Stack); -#line 3062 "runtime.in" +#line 3026 "runtime.in" {Stack->push<real>(t.getOut()); return;} } -#line 3066 "runtime.in" +#line 3030 "runtime.in" void tensionSpecifierInPart(stack *Stack) { tensionSpecifier t=vm::pop<tensionSpecifier>(Stack); -#line 3067 "runtime.in" +#line 3031 "runtime.in" {Stack->push<real>(t.getIn()); return;} } -#line 3071 "runtime.in" +#line 3035 "runtime.in" void tensionSpecifierAtleastPart(stack *Stack) { tensionSpecifier t=vm::pop<tensionSpecifier>(Stack); -#line 3072 "runtime.in" +#line 3036 "runtime.in" {Stack->push<bool>(t.getAtleast()); return;} } -#line 3076 "runtime.in" +#line 3040 "runtime.in" // guide* operator cast(tensionSpecifier t); -void gen236(stack *Stack) +void gen_runtime236(stack *Stack) { tensionSpecifier t=vm::pop<tensionSpecifier>(Stack); -#line 3077 "runtime.in" +#line 3041 "runtime.in" {Stack->push<guide*>(new tensionguide(t)); return;} } -#line 3081 "runtime.in" +#line 3045 "runtime.in" // guide* operator controls(pair zout, pair zin); -void gen237(stack *Stack) +void gen_runtime237(stack *Stack) { pair zin=vm::pop<pair>(Stack); pair zout=vm::pop<pair>(Stack); -#line 3082 "runtime.in" +#line 3046 "runtime.in" {Stack->push<guide*>(new controlguide(zout, zin)); return;} } -#line 3086 "runtime.in" +#line 3050 "runtime.in" // Int size(guide *g); -void gen238(stack *Stack) +void gen_runtime238(stack *Stack) { guide * g=vm::pop<guide *>(Stack); -#line 3087 "runtime.in" +#line 3051 "runtime.in" flatguide f; g->flatten(f,false); {Stack->push<Int>(f.size()); return;} } -#line 3093 "runtime.in" +#line 3057 "runtime.in" // Int length(guide *g); -void gen239(stack *Stack) +void gen_runtime239(stack *Stack) { guide * g=vm::pop<guide *>(Stack); -#line 3094 "runtime.in" +#line 3058 "runtime.in" flatguide f; g->flatten(f,false); {Stack->push<Int>(g->cyclic() ? f.size() : f.size()-1); return;} } -#line 3100 "runtime.in" +#line 3064 "runtime.in" // bool cyclic(guide *g); -void gen240(stack *Stack) +void gen_runtime240(stack *Stack) { guide * g=vm::pop<guide *>(Stack); -#line 3101 "runtime.in" +#line 3065 "runtime.in" flatguide f; g->flatten(f,false); {Stack->push<bool>(g->cyclic()); return;} } -#line 3107 "runtime.in" +#line 3071 "runtime.in" // pair point(guide *g, Int t); -void gen241(stack *Stack) +void gen_runtime241(stack *Stack) { Int t=vm::pop<Int>(Stack); guide * g=vm::pop<guide *>(Stack); -#line 3108 "runtime.in" +#line 3072 "runtime.in" flatguide f; g->flatten(f,false); {Stack->push<pair>(f.Nodes(adjustedIndex(t,f.size(),g->cyclic())).z); return;} } -#line 3114 "runtime.in" +#line 3078 "runtime.in" // pairarray* dirSpecifier(guide *g, Int t); -void gen242(stack *Stack) +void gen_runtime242(stack *Stack) { Int t=vm::pop<Int>(Stack); guide * g=vm::pop<guide *>(Stack); -#line 3115 "runtime.in" +#line 3079 "runtime.in" flatguide f; g->flatten(f,false); Int n=f.size(); @@ -4227,13 +4226,13 @@ void gen242(stack *Stack) {Stack->push<pairarray*>(c); return;} } -#line 3126 "runtime.in" +#line 3090 "runtime.in" // pairarray* controlSpecifier(guide *g, Int t); -void gen243(stack *Stack) +void gen_runtime243(stack *Stack) { Int t=vm::pop<Int>(Stack); guide * g=vm::pop<guide *>(Stack); -#line 3127 "runtime.in" +#line 3091 "runtime.in" flatguide f; g->flatten(f,false); Int n=f.size(); @@ -4249,13 +4248,13 @@ void gen243(stack *Stack) } else {Stack->push<pairarray*>(new array(0)); return;} } -#line 3143 "runtime.in" +#line 3107 "runtime.in" // tensionSpecifier tensionSpecifier(guide *g, Int t); -void gen244(stack *Stack) +void gen_runtime244(stack *Stack) { Int t=vm::pop<Int>(Stack); guide * g=vm::pop<guide *>(Stack); -#line 3144 "runtime.in" +#line 3108 "runtime.in" flatguide f; g->flatten(f,false); Int n=f.size(); @@ -4264,13 +4263,13 @@ void gen244(stack *Stack) {Stack->push<tensionSpecifier>(tensionSpecifier(curr.tout.val,f.Nodes(t+1).tin.val,curr.tout.atleast)); return;} } -#line 3153 "runtime.in" +#line 3117 "runtime.in" // realarray* curlSpecifier(guide *g, Int t); -void gen245(stack *Stack) +void gen_runtime245(stack *Stack) { Int t=vm::pop<Int>(Stack); guide * g=vm::pop<guide *>(Stack); -#line 3154 "runtime.in" +#line 3118 "runtime.in" flatguide f; g->flatten(f,false); Int n=f.size(); @@ -4283,12 +4282,12 @@ void gen245(stack *Stack) {Stack->push<realarray*>(c); return;} } -#line 3167 "runtime.in" +#line 3131 "runtime.in" // guide* reverse(guide *g); -void gen246(stack *Stack) +void gen_runtime246(stack *Stack) { guide * g=vm::pop<guide *>(Stack); -#line 3168 "runtime.in" +#line 3132 "runtime.in" flatguide f; g->flatten(f,false); if(f.precyclic()) @@ -4343,106 +4342,81 @@ void gen246(stack *Stack) // Three-dimensional picture and surface operations -#line 3223 "runtime.in" +#line 3187 "runtime.in" // void _draw(picture *f, path3 g, pen p); -void gen247(stack *Stack) +void gen_runtime247(stack *Stack) { pen p=vm::pop<pen>(Stack); path3 g=vm::pop<path3>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 3224 "runtime.in" +#line 3188 "runtime.in" if(g.size() > 0) f->append(new drawPath3(g,p)); } -#line 3230 "runtime.in" -// void draw(picture *f, triplearray2 *g, bool straight, penarray *p, real opacity, real shininess, real granularity, triple normal, bool lighton, penarray *colors); -void gen248(stack *Stack) +#line 3194 "runtime.in" +// void draw(picture *f, triplearray2 *g, bool straight, penarray *p, real opacity, real shininess, real PRCshininess, real granularity, triple normal, bool lighton, penarray *colors); +void gen_runtime248(stack *Stack) { penarray * colors=vm::pop<penarray *>(Stack); bool lighton=vm::pop<bool>(Stack); triple normal=vm::pop<triple>(Stack); real granularity=vm::pop<real>(Stack); + real PRCshininess=vm::pop<real>(Stack); real shininess=vm::pop<real>(Stack); real opacity=vm::pop<real>(Stack); penarray * p=vm::pop<penarray *>(Stack); bool straight=vm::pop<bool>(Stack); triplearray2 * g=vm::pop<triplearray2 *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 3233 "runtime.in" - f->append(new drawSurface(*g,straight,*p,opacity,shininess,granularity, - normal,lighton,*colors)); +#line 3197 "runtime.in" + f->append(new drawSurface(*g,straight,*p,opacity,shininess,PRCshininess, + granularity,normal,lighton,*colors)); } -#line 3238 "runtime.in" +#line 3202 "runtime.in" // triple min3(picture *f); -void gen249(stack *Stack) +void gen_runtime249(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 3239 "runtime.in" +#line 3203 "runtime.in" {Stack->push<triple>(f->bounds3().Min()); return;} } -#line 3243 "runtime.in" +#line 3207 "runtime.in" // triple max3(picture *f); -void gen250(stack *Stack) +void gen_runtime250(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 3244 "runtime.in" +#line 3208 "runtime.in" {Stack->push<triple>(f->bounds3().Max()); return;} } -#line 3248 "runtime.in" -// pair min(picture *f, realarray2 *t); -void gen251(stack *Stack) -{ - realarray2 * t=vm::pop<realarray2 *>(Stack); - picture * f=vm::pop<picture *>(Stack); -#line 3249 "runtime.in" - real *T=copyArray2C(t,4); - pair m=f->bounds(::min,xproject,yproject,T); - delete[] T; - {Stack->push<pair>(m); return;} -} - -#line 3256 "runtime.in" -// pair max(picture *f, realarray2 *t); -void gen252(stack *Stack) -{ - realarray2 * t=vm::pop<realarray2 *>(Stack); - picture * f=vm::pop<picture *>(Stack); -#line 3257 "runtime.in" - real *T=copyArray2C(t,4); - pair M=f->bounds(::max,xproject,yproject,T); - delete[] T; - {Stack->push<pair>(M); return;} -} - -#line 3264 "runtime.in" +#line 3212 "runtime.in" // pair minratio(picture *f); -void gen253(stack *Stack) +void gen_runtime251(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 3265 "runtime.in" - {Stack->push<pair>(f->bounds(::min,xratio,yratio)); return;} +#line 3213 "runtime.in" + {Stack->push<pair>(f->ratio(::min)); return;} } -#line 3269 "runtime.in" +#line 3217 "runtime.in" // pair maxratio(picture *f); -void gen254(stack *Stack) +void gen_runtime252(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 3270 "runtime.in" - {Stack->push<pair>(f->bounds(::max,xratio,yratio)); return;} +#line 3218 "runtime.in" + {Stack->push<pair>(f->ratio(::max)); return;} } -#line 3274 "runtime.in" +#line 3222 "runtime.in" // triple minbezier(triplearray2 *P, triple b); -void gen255(stack *Stack) +void gen_runtime253(stack *Stack) { triple b=vm::pop<triple>(Stack); triplearray2 * P=vm::pop<triplearray2 *>(Stack); -#line 3275 "runtime.in" +#line 3223 "runtime.in" real *A=copyTripleArray2Components(P,true,4); b=triple(bound(A,::min,b.getx(),sqrtFuzz*norm(A,16)), bound(A+16,::min,b.gety(),sqrtFuzz*norm(A+16,16)), @@ -4451,13 +4425,13 @@ void gen255(stack *Stack) {Stack->push<triple>(b); return;} } -#line 3284 "runtime.in" +#line 3232 "runtime.in" // triple maxbezier(triplearray2 *P, triple b); -void gen256(stack *Stack) +void gen_runtime254(stack *Stack) { triple b=vm::pop<triple>(Stack); triplearray2 * P=vm::pop<triplearray2 *>(Stack); -#line 3285 "runtime.in" +#line 3233 "runtime.in" real *A=copyTripleArray2Components(P,true,4); b=triple(bound(A,::max,b.getx(),sqrtFuzz*norm(A,16)), bound(A+16,::max,b.gety(),sqrtFuzz*norm(A+16,16)), @@ -4466,74 +4440,113 @@ void gen256(stack *Stack) {Stack->push<triple>(b); return;} } -#line 3294 "runtime.in" -// pair minbezier(triplearray2 *P, realarray2 *t, pair b); -void gen257(stack *Stack) +#line 3242 "runtime.in" +// pair minratio(triplearray2 *P, pair b); +void gen_runtime255(stack *Stack) { pair b=vm::pop<pair>(Stack); - realarray2 * t=vm::pop<realarray2 *>(Stack); triplearray2 * P=vm::pop<triplearray2 *>(Stack); -#line 3295 "runtime.in" +#line 3243 "runtime.in" triple *A=copyTripleArray2C(P,true,4); - real *T=copyArray2C(t,4); real fuzz=sqrtFuzz*norm(A,16); - b=pair(bound(A,::min,xproject,T,b.getx(),fuzz), - bound(A,::min,yproject,T,b.gety(),fuzz)); - delete[] T; + b=pair(bound(A,::min,xratio,b.getx(),fuzz), + bound(A,::min,yratio,b.gety(),fuzz)); delete[] A; {Stack->push<pair>(b); return;} } -#line 3306 "runtime.in" -// pair maxbezier(triplearray2 *P, realarray2 *t, pair b); -void gen258(stack *Stack) +#line 3252 "runtime.in" +// pair maxratio(triplearray2 *P, pair b); +void gen_runtime256(stack *Stack) { pair b=vm::pop<pair>(Stack); - realarray2 * t=vm::pop<realarray2 *>(Stack); triplearray2 * P=vm::pop<triplearray2 *>(Stack); -#line 3307 "runtime.in" +#line 3253 "runtime.in" triple *A=copyTripleArray2C(P,true,4); - real *T=copyArray2C(t,4); real fuzz=sqrtFuzz*norm(A,16); - b=pair(bound(A,::max,xproject,T,b.getx(),fuzz), - bound(A,::max,yproject,T,b.gety(),fuzz)); - delete[] T; + b=pair(bound(A,::max,xratio,b.getx(),fuzz), + bound(A,::max,yratio,b.gety(),fuzz)); delete[] A; {Stack->push<pair>(b); return;} } -#line 3318 "runtime.in" -// pair max(path3 g, realarray2 *t); -void gen259(stack *Stack) +#line 3262 "runtime.in" +// pair minratio(path3 g); +void gen_runtime257(stack *Stack) { - realarray2 * t=vm::pop<realarray2 *>(Stack); path3 g=vm::pop<path3>(Stack); -#line 3319 "runtime.in" - real *T=copyArray2C(t,4); - pair b=g.bounds(::max,xproject,yproject,T); - delete[] T; - {Stack->push<pair>(b); return;} +#line 3263 "runtime.in" + {Stack->push<pair>(g.ratio(::min)); return;} } -#line 3326 "runtime.in" -// pair min(path3 g, realarray2 *t); -void gen260(stack *Stack) +#line 3267 "runtime.in" +// pair maxratio(path3 g); +void gen_runtime258(stack *Stack) { - realarray2 * t=vm::pop<realarray2 *>(Stack); path3 g=vm::pop<path3>(Stack); -#line 3327 "runtime.in" - real *T=copyArray2C(t,4); - pair b=g.bounds(::min,xproject,yproject,T); - delete[] T; - {Stack->push<pair>(b); return;} +#line 3268 "runtime.in" + {Stack->push<pair>(g.ratio(::max)); return;} } -#line 3334 "runtime.in" +#line 3272 "runtime.in" +// real norm(realarray *a); +void gen_runtime259(stack *Stack) +{ + realarray * a=vm::pop<realarray *>(Stack); +#line 3273 "runtime.in" + size_t n=checkArray(a); + real M=0.0; + for(size_t i=0; i < n; ++i) { + real x=fabs(vm::read<real>(a,i)); + if(x > M) M=x; + } + {Stack->push<real>(M); return;} +} + +#line 3283 "runtime.in" +// real norm(realarray2 *a); +void gen_runtime260(stack *Stack) +{ + realarray2 * a=vm::pop<realarray2 *>(Stack); +#line 3284 "runtime.in" + size_t n=checkArray(a); + real M=0.0; + for(size_t i=0; i < n; ++i) { + vm::array *ai=vm::read<vm::array*>(a,i); + size_t m=checkArray(ai); + for(size_t j=0; j < m; ++j) { + real a=fabs(vm::read<real>(ai,j)); + if(a > M) M=a; + } + } + {Stack->push<real>(M); return;} +} + +#line 3298 "runtime.in" +// real norm(triplearray2 *a); +void gen_runtime261(stack *Stack) +{ + triplearray2 * a=vm::pop<triplearray2 *>(Stack); +#line 3299 "runtime.in" + size_t n=checkArray(a); + real M=0.0; + for(size_t i=0; i < n; ++i) { + vm::array *ai=vm::read<vm::array*>(a,i); + size_t m=checkArray(ai); + for(size_t j=0; j < m; ++j) { + real a=vm::read<triple>(ai,j).abs2(); + if(a > M) M=a; + } + } + {Stack->push<real>(sqrt(M)); return;} +} + +#line 3313 "runtime.in" // real change2(triplearray2 *a); -void gen261(stack *Stack) +void gen_runtime262(stack *Stack) { triplearray2 * a=vm::pop<triplearray2 *>(Stack); -#line 3335 "runtime.in" +#line 3314 "runtime.in" size_t n=checkArray(a); if(n == 0) {Stack->push<real>(0.0); return;} @@ -4554,241 +4567,241 @@ void gen261(stack *Stack) {Stack->push<real>(M); return;} } -#line 3356 "runtime.in" +#line 3335 "runtime.in" // bool is3D(picture *f); -void gen262(stack *Stack) +void gen_runtime263(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 3357 "runtime.in" +#line 3336 "runtime.in" {Stack->push<bool>(f->have3D()); return;} } -#line 3361 "runtime.in" +#line 3340 "runtime.in" // pair bezier(pair a, pair b, pair c, pair d, real t); -void gen263(stack *Stack) +void gen_runtime264(stack *Stack) { real t=vm::pop<real>(Stack); pair d=vm::pop<pair>(Stack); pair c=vm::pop<pair>(Stack); pair b=vm::pop<pair>(Stack); pair a=vm::pop<pair>(Stack); -#line 3362 "runtime.in" +#line 3341 "runtime.in" real onemt=1-t; real onemt2=onemt*onemt; {Stack->push<pair>(onemt2*onemt*a+t*(3.0*(onemt2*b+t*onemt*c)+t*t*d)); return;} } -#line 3368 "runtime.in" +#line 3347 "runtime.in" // pair bezierP(pair a, pair b, pair c, pair d, real t); -void gen264(stack *Stack) +void gen_runtime265(stack *Stack) { real t=vm::pop<real>(Stack); pair d=vm::pop<pair>(Stack); pair c=vm::pop<pair>(Stack); pair b=vm::pop<pair>(Stack); pair a=vm::pop<pair>(Stack); -#line 3369 "runtime.in" +#line 3348 "runtime.in" {Stack->push<pair>(3.0*(t*t*(d-a+3.0*(b-c))+t*(2.0*(a+c)-4.0*b)+b-a)); return;} } -#line 3373 "runtime.in" +#line 3352 "runtime.in" // pair bezierPP(pair a, pair b, pair c, pair d, real t); -void gen265(stack *Stack) +void gen_runtime266(stack *Stack) { real t=vm::pop<real>(Stack); pair d=vm::pop<pair>(Stack); pair c=vm::pop<pair>(Stack); pair b=vm::pop<pair>(Stack); pair a=vm::pop<pair>(Stack); -#line 3374 "runtime.in" +#line 3353 "runtime.in" {Stack->push<pair>(6.0*(t*(d-a+3.0*(b-c))+a+c-2.0*b)); return;} } -#line 3378 "runtime.in" +#line 3357 "runtime.in" // pair bezierPPP(pair a, pair b, pair c, pair d); -void gen266(stack *Stack) +void gen_runtime267(stack *Stack) { pair d=vm::pop<pair>(Stack); pair c=vm::pop<pair>(Stack); pair b=vm::pop<pair>(Stack); pair a=vm::pop<pair>(Stack); -#line 3379 "runtime.in" +#line 3358 "runtime.in" {Stack->push<pair>(6.0*(d-a+3.0*(b-c))); return;} } -#line 3383 "runtime.in" +#line 3362 "runtime.in" // triple bezier(triple a, triple b, triple c, triple d, real t); -void gen267(stack *Stack) +void gen_runtime268(stack *Stack) { real t=vm::pop<real>(Stack); triple d=vm::pop<triple>(Stack); triple c=vm::pop<triple>(Stack); triple b=vm::pop<triple>(Stack); triple a=vm::pop<triple>(Stack); -#line 3384 "runtime.in" +#line 3363 "runtime.in" real onemt=1-t; real onemt2=onemt*onemt; {Stack->push<triple>(onemt2*onemt*a+t*(3.0*(onemt2*b+t*onemt*c)+t*t*d)); return;} } -#line 3390 "runtime.in" +#line 3369 "runtime.in" // triple bezierP(triple a, triple b, triple c, triple d, real t); -void gen268(stack *Stack) +void gen_runtime269(stack *Stack) { real t=vm::pop<real>(Stack); triple d=vm::pop<triple>(Stack); triple c=vm::pop<triple>(Stack); triple b=vm::pop<triple>(Stack); triple a=vm::pop<triple>(Stack); -#line 3391 "runtime.in" +#line 3370 "runtime.in" {Stack->push<triple>(3.0*(t*t*(d-a+3.0*(b-c))+t*(2.0*(a+c)-4.0*b)+b-a)); return;} } -#line 3395 "runtime.in" +#line 3374 "runtime.in" // triple bezierPP(triple a, triple b, triple c, triple d, real t); -void gen269(stack *Stack) +void gen_runtime270(stack *Stack) { real t=vm::pop<real>(Stack); triple d=vm::pop<triple>(Stack); triple c=vm::pop<triple>(Stack); triple b=vm::pop<triple>(Stack); triple a=vm::pop<triple>(Stack); -#line 3396 "runtime.in" +#line 3375 "runtime.in" {Stack->push<triple>(6.0*(t*(d-a+3.0*(b-c))+a+c-2.0*b)); return;} } -#line 3400 "runtime.in" +#line 3379 "runtime.in" // triple bezierPPP(triple a, triple b, triple c, triple d); -void gen270(stack *Stack) +void gen_runtime271(stack *Stack) { triple d=vm::pop<triple>(Stack); triple c=vm::pop<triple>(Stack); triple b=vm::pop<triple>(Stack); triple a=vm::pop<triple>(Stack); -#line 3401 "runtime.in" +#line 3380 "runtime.in" {Stack->push<triple>(6.0*(d-a+3.0*(b-c))); return;} } // String operations -#line 3407 "runtime.in" +#line 3386 "runtime.in" void emptyString(stack *Stack) { -#line 3408 "runtime.in" +#line 3387 "runtime.in" {Stack->push<string>(emptystring); return;} } -#line 3413 "runtime.in" +#line 3392 "runtime.in" // Int length(string *s); -void gen272(stack *Stack) +void gen_runtime273(stack *Stack) { string * s=vm::pop<string *>(Stack); -#line 3414 "runtime.in" +#line 3393 "runtime.in" {Stack->push<Int>((Int) s->length()); return;} } -#line 3418 "runtime.in" +#line 3397 "runtime.in" // Int find(string *s, string t, Int pos=0); -void gen273(stack *Stack) +void gen_runtime274(stack *Stack) { Int pos=vm::pop<Int>(Stack,0); string t=vm::pop<string>(Stack); string * s=vm::pop<string *>(Stack); -#line 3419 "runtime.in" +#line 3398 "runtime.in" size_t n=s->find(t,pos); {Stack->push<Int>(n == string::npos ? (Int) -1 : (Int) n); return;} } -#line 3424 "runtime.in" +#line 3403 "runtime.in" // Int rfind(string *s, string t, Int pos=-1); -void gen274(stack *Stack) +void gen_runtime275(stack *Stack) { Int pos=vm::pop<Int>(Stack,-1); string t=vm::pop<string>(Stack); string * s=vm::pop<string *>(Stack); -#line 3425 "runtime.in" +#line 3404 "runtime.in" size_t n=s->rfind(t,pos); {Stack->push<Int>(n == string::npos ? (Int) -1 : (Int) n); return;} } -#line 3430 "runtime.in" +#line 3409 "runtime.in" // string reverse(string s); -void gen275(stack *Stack) +void gen_runtime276(stack *Stack) { string s=vm::pop<string>(Stack); -#line 3431 "runtime.in" +#line 3410 "runtime.in" reverse(s.begin(),s.end()); {Stack->push<string>(s); return;} } -#line 3436 "runtime.in" +#line 3415 "runtime.in" // string insert(string s, Int pos, string t); -void gen276(stack *Stack) +void gen_runtime277(stack *Stack) { string t=vm::pop<string>(Stack); Int pos=vm::pop<Int>(Stack); string s=vm::pop<string>(Stack); -#line 3437 "runtime.in" +#line 3416 "runtime.in" if ((size_t) pos < s.length()) {Stack->push<string>(s.insert(pos,t)); return;} {Stack->push<string>(s); return;} } -#line 3443 "runtime.in" +#line 3422 "runtime.in" // string substr(string* s, Int pos, Int n=-1); -void gen277(stack *Stack) +void gen_runtime278(stack *Stack) { Int n=vm::pop<Int>(Stack,-1); Int pos=vm::pop<Int>(Stack); string* s=vm::pop<string*>(Stack); -#line 3444 "runtime.in" +#line 3423 "runtime.in" if ((size_t) pos < s->length()) {Stack->push<string>(s->substr(pos,n)); return;} {Stack->push<string>(emptystring); return;} } -#line 3450 "runtime.in" +#line 3429 "runtime.in" // string erase(string s, Int pos, Int n); -void gen278(stack *Stack) +void gen_runtime279(stack *Stack) { Int n=vm::pop<Int>(Stack); Int pos=vm::pop<Int>(Stack); string s=vm::pop<string>(Stack); -#line 3451 "runtime.in" +#line 3430 "runtime.in" if ((size_t) pos < s.length()) {Stack->push<string>(s.erase(pos,n)); return;} {Stack->push<string>(s); return;} } -#line 3457 "runtime.in" +#line 3436 "runtime.in" // string downcase(string s); -void gen279(stack *Stack) +void gen_runtime280(stack *Stack) { string s=vm::pop<string>(Stack); -#line 3458 "runtime.in" +#line 3437 "runtime.in" std::transform(s.begin(),s.end(),s.begin(),tolower); {Stack->push<string>(s); return;} } -#line 3463 "runtime.in" +#line 3442 "runtime.in" // string upcase(string s); -void gen280(stack *Stack) +void gen_runtime281(stack *Stack) { string s=vm::pop<string>(Stack); -#line 3464 "runtime.in" +#line 3443 "runtime.in" std::transform(s.begin(),s.end(),s.begin(),toupper); {Stack->push<string>(s); return;} } // returns a string constructed by translating all occurrences of the string // from in an array of string pairs {from,to} to the string to in string s. -#line 3471 "runtime.in" +#line 3450 "runtime.in" // string replace(string *S, stringarray2 *translate); -void gen281(stack *Stack) +void gen_runtime282(stack *Stack) { stringarray2 * translate=vm::pop<stringarray2 *>(Stack); string * S=vm::pop<string *>(Stack); -#line 3472 "runtime.in" +#line 3451 "runtime.in" size_t size=checkArray(translate); for(size_t i=0; i < size; i++) { array *a=read<array*>(translate,i); @@ -4812,13 +4825,13 @@ void gen281(stack *Stack) {Stack->push<string>(buf.str()); return;} } -#line 3496 "runtime.in" +#line 3475 "runtime.in" // string format(string *format, Int x); -void gen282(stack *Stack) +void gen_runtime283(stack *Stack) { Int x=vm::pop<Int>(Stack); string * format=vm::pop<string *>(Stack); -#line 3497 "runtime.in" +#line 3476 "runtime.in" const char *f=format->c_str(); checkformat(f,true); @@ -4832,14 +4845,14 @@ void gen282(stack *Stack) {Stack->push<string>(s); return;} } -#line 3511 "runtime.in" +#line 3490 "runtime.in" // string format(string *format, real x, string locale=emptystring); -void gen283(stack *Stack) +void gen_runtime284(stack *Stack) { string locale=vm::pop<string>(Stack,emptystring); real x=vm::pop<real>(Stack); string * format=vm::pop<string *>(Stack); -#line 3512 "runtime.in" +#line 3491 "runtime.in" bool tex=getSetting<string>("tex") != "none"; bool texify=false; ostringstream out; @@ -4963,12 +4976,12 @@ void gen283(stack *Stack) {Stack->push<string>(out.str()); return;} } -#line 3636 "runtime.in" +#line 3615 "runtime.in" // Int hex(string s); -void gen284(stack *Stack) +void gen_runtime285(stack *Stack) { string s=vm::pop<string>(Stack); -#line 3637 "runtime.in" +#line 3616 "runtime.in" istringstream is(s); is.setf(std::ios::hex,std::ios::basefield); Int value; @@ -4978,36 +4991,36 @@ void gen284(stack *Stack) error(buf); } -#line 3647 "runtime.in" +#line 3626 "runtime.in" // string string(Int x); -void gen285(stack *Stack) +void gen_runtime286(stack *Stack) { Int x=vm::pop<Int>(Stack); -#line 3648 "runtime.in" +#line 3627 "runtime.in" ostringstream buf; buf << x; {Stack->push<string>(buf.str()); return;} } -#line 3654 "runtime.in" +#line 3633 "runtime.in" // string string(real x, Int digits=DBL_DIG); -void gen286(stack *Stack) +void gen_runtime287(stack *Stack) { Int digits=vm::pop<Int>(Stack,DBL_DIG); real x=vm::pop<real>(Stack); -#line 3655 "runtime.in" +#line 3634 "runtime.in" ostringstream buf; buf.precision(digits); buf << x; {Stack->push<string>(buf.str()); return;} } -#line 3662 "runtime.in" +#line 3641 "runtime.in" // string time(string format=defaulttimeformat); -void gen287(stack *Stack) +void gen_runtime288(stack *Stack) { string format=vm::pop<string>(Stack,defaulttimeformat); -#line 3663 "runtime.in" +#line 3642 "runtime.in" #ifdef HAVE_STRFTIME const time_t bintime=time(NULL); if(!strftime(Time,nTime,format.c_str(),localtime(&bintime))) {Stack->push<string>(""); return;} @@ -5017,13 +5030,13 @@ void gen287(stack *Stack) #endif } -#line 3673 "runtime.in" +#line 3652 "runtime.in" // string time(Int seconds, string format=defaulttimeformat); -void gen288(stack *Stack) +void gen_runtime289(stack *Stack) { string format=vm::pop<string>(Stack,defaulttimeformat); Int seconds=vm::pop<Int>(Stack); -#line 3674 "runtime.in" +#line 3653 "runtime.in" #ifdef HAVE_STRFTIME const time_t bintime=seconds; if(!strftime(Time,nTime,format.c_str(),localtime(&bintime))) {Stack->push<string>(""); return;} @@ -5035,13 +5048,13 @@ void gen288(stack *Stack) #endif } -#line 3686 "runtime.in" +#line 3665 "runtime.in" // Int seconds(string t=emptystring, string format=emptystring); -void gen289(stack *Stack) +void gen_runtime290(stack *Stack) { string format=vm::pop<string>(Stack,emptystring); string t=vm::pop<string>(Stack,emptystring); -#line 3687 "runtime.in" +#line 3666 "runtime.in" #if defined(HAVE_STRPTIME) const time_t bintime=time(NULL); tm tm=*localtime(&bintime); @@ -5052,11 +5065,11 @@ void gen289(stack *Stack) #endif } -#line 3698 "runtime.in" +#line 3677 "runtime.in" // realarray* _cputime(); -void gen290(stack *Stack) +void gen_runtime291(stack *Stack) { -#line 3699 "runtime.in" +#line 3678 "runtime.in" static const real ticktime=1.0/sysconf(_SC_CLK_TCK); struct tms buf; @@ -5071,234 +5084,234 @@ void gen290(stack *Stack) // Math -#line 3714 "runtime.in" +#line 3693 "runtime.in" // real ^(real x, Int y); -void gen291(stack *Stack) +void gen_runtime292(stack *Stack) { Int y=vm::pop<Int>(Stack); real x=vm::pop<real>(Stack); -#line 3715 "runtime.in" +#line 3694 "runtime.in" {Stack->push<real>(pow(x,y)); return;} } -#line 3720 "runtime.in" +#line 3699 "runtime.in" // pair ^(pair z, Int y); -void gen292(stack *Stack) +void gen_runtime293(stack *Stack) { Int y=vm::pop<Int>(Stack); pair z=vm::pop<pair>(Stack); -#line 3721 "runtime.in" +#line 3700 "runtime.in" {Stack->push<pair>(pow(z,y)); return;} } -#line 3725 "runtime.in" +#line 3704 "runtime.in" // Int quotient(Int x, Int y); -void gen293(stack *Stack) +void gen_runtime294(stack *Stack) { Int y=vm::pop<Int>(Stack); Int x=vm::pop<Int>(Stack); -#line 3726 "runtime.in" +#line 3705 "runtime.in" if(y == 0) dividebyzero(); if(y == -1) {Stack->push<Int>(Negate(x)); return;} // Implementation-independent definition of integer division: round down {Stack->push<Int>((x-portableMod(x,y))/y); return;} } -#line 3733 "runtime.in" +#line 3712 "runtime.in" // Int abs(Int x); -void gen294(stack *Stack) +void gen_runtime295(stack *Stack) { Int x=vm::pop<Int>(Stack); -#line 3734 "runtime.in" +#line 3713 "runtime.in" {Stack->push<Int>(Abs(x)); return;} } -#line 3738 "runtime.in" +#line 3717 "runtime.in" // Int sgn(real x); -void gen295(stack *Stack) +void gen_runtime296(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3739 "runtime.in" +#line 3718 "runtime.in" {Stack->push<Int>(sgn(x)); return;} } -#line 3743 "runtime.in" +#line 3722 "runtime.in" // Int rand(); -void gen296(stack *Stack) +void gen_runtime297(stack *Stack) { -#line 3744 "runtime.in" +#line 3723 "runtime.in" {Stack->push<Int>(rand()); return;} } -#line 3748 "runtime.in" +#line 3727 "runtime.in" // void srand(Int seed); -void gen297(stack *Stack) +void gen_runtime298(stack *Stack) { Int seed=vm::pop<Int>(Stack); -#line 3749 "runtime.in" +#line 3728 "runtime.in" srand(intcast(seed)); } // a random number uniformly distributed in the interval [0,1] -#line 3754 "runtime.in" +#line 3733 "runtime.in" // real unitrand(); -void gen298(stack *Stack) +void gen_runtime299(stack *Stack) { -#line 3755 "runtime.in" +#line 3734 "runtime.in" {Stack->push<real>(((real) rand())/RAND_MAX); return;} } -#line 3759 "runtime.in" +#line 3738 "runtime.in" // Int ceil(real x); -void gen299(stack *Stack) +void gen_runtime300(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3760 "runtime.in" +#line 3739 "runtime.in" {Stack->push<Int>(Intcast(ceil(x))); return;} } -#line 3764 "runtime.in" +#line 3743 "runtime.in" // Int floor(real x); -void gen300(stack *Stack) +void gen_runtime301(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3765 "runtime.in" +#line 3744 "runtime.in" {Stack->push<Int>(Intcast(floor(x))); return;} } -#line 3769 "runtime.in" +#line 3748 "runtime.in" // Int round(real x); -void gen301(stack *Stack) +void gen_runtime302(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3770 "runtime.in" +#line 3749 "runtime.in" if(validInt(x)) {Stack->push<Int>(Round(x)); return;} integeroverflow(0); } -#line 3775 "runtime.in" +#line 3754 "runtime.in" // Int Ceil(real x); -void gen302(stack *Stack) +void gen_runtime303(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3776 "runtime.in" +#line 3755 "runtime.in" {Stack->push<Int>(Ceil(x)); return;} } -#line 3780 "runtime.in" +#line 3759 "runtime.in" // Int Floor(real x); -void gen303(stack *Stack) +void gen_runtime304(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3781 "runtime.in" +#line 3760 "runtime.in" {Stack->push<Int>(Floor(x)); return;} } -#line 3785 "runtime.in" +#line 3764 "runtime.in" // Int Round(real x); -void gen304(stack *Stack) +void gen_runtime305(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3786 "runtime.in" +#line 3765 "runtime.in" {Stack->push<Int>(Round(Intcap(x))); return;} } -#line 3790 "runtime.in" +#line 3769 "runtime.in" // real fmod(real x, real y); -void gen305(stack *Stack) +void gen_runtime306(stack *Stack) { real y=vm::pop<real>(Stack); real x=vm::pop<real>(Stack); -#line 3791 "runtime.in" +#line 3770 "runtime.in" if (y == 0.0) dividebyzero(); {Stack->push<real>(fmod(x,y)); return;} } -#line 3796 "runtime.in" +#line 3775 "runtime.in" // real atan2(real y, real x); -void gen306(stack *Stack) +void gen_runtime307(stack *Stack) { real x=vm::pop<real>(Stack); real y=vm::pop<real>(Stack); -#line 3797 "runtime.in" +#line 3776 "runtime.in" {Stack->push<real>(atan2(y,x)); return;} } -#line 3801 "runtime.in" +#line 3780 "runtime.in" // real hypot(real x, real y); -void gen307(stack *Stack) +void gen_runtime308(stack *Stack) { real y=vm::pop<real>(Stack); real x=vm::pop<real>(Stack); -#line 3802 "runtime.in" +#line 3781 "runtime.in" {Stack->push<real>(hypot(x,y)); return;} } -#line 3806 "runtime.in" +#line 3785 "runtime.in" // real remainder(real x, real y); -void gen308(stack *Stack) +void gen_runtime309(stack *Stack) { real y=vm::pop<real>(Stack); real x=vm::pop<real>(Stack); -#line 3807 "runtime.in" +#line 3786 "runtime.in" {Stack->push<real>(remainder(x,y)); return;} } -#line 3811 "runtime.in" +#line 3790 "runtime.in" // real J(Int n, real x); -void gen309(stack *Stack) +void gen_runtime310(stack *Stack) { real x=vm::pop<real>(Stack); Int n=vm::pop<Int>(Stack); -#line 3812 "runtime.in" +#line 3791 "runtime.in" {Stack->push<real>(jn(n,x)); return;} } -#line 3816 "runtime.in" +#line 3795 "runtime.in" // real Y(Int n, real x); -void gen310(stack *Stack) +void gen_runtime311(stack *Stack) { real x=vm::pop<real>(Stack); Int n=vm::pop<Int>(Stack); -#line 3817 "runtime.in" +#line 3796 "runtime.in" {Stack->push<real>(yn(n,x)); return;} } -#line 3821 "runtime.in" +#line 3800 "runtime.in" // real erf(real x); -void gen311(stack *Stack) +void gen_runtime312(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3822 "runtime.in" +#line 3801 "runtime.in" {Stack->push<real>(erf(x)); return;} } -#line 3826 "runtime.in" +#line 3805 "runtime.in" // real erfc(real x); -void gen312(stack *Stack) +void gen_runtime313(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3827 "runtime.in" +#line 3806 "runtime.in" {Stack->push<real>(erfc(x)); return;} } -#line 3831 "runtime.in" +#line 3810 "runtime.in" // Int factorial(Int n); -void gen313(stack *Stack) +void gen_runtime314(stack *Stack) { Int n=vm::pop<Int>(Stack); -#line 3832 "runtime.in" +#line 3811 "runtime.in" if(n < 0) error(invalidargument); {Stack->push<Int>(factorial(n)); return;} } -#line 3836 "runtime.in" +#line 3815 "runtime.in" // Int choose(Int n, Int k); -void gen314(stack *Stack) +void gen_runtime315(stack *Stack) { Int k=vm::pop<Int>(Stack); Int n=vm::pop<Int>(Stack); -#line 3837 "runtime.in" +#line 3816 "runtime.in" if(n < 0 || k < 0 || k > n) error(invalidargument); Int f=1; Int r=n-k; @@ -5309,12 +5322,12 @@ void gen314(stack *Stack) {Stack->push<Int>(f); return;} } -#line 3847 "runtime.in" +#line 3826 "runtime.in" // real gamma(real x); -void gen315(stack *Stack) +void gen_runtime316(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3848 "runtime.in" +#line 3827 "runtime.in" #ifdef HAVE_TGAMMA {Stack->push<real>(tgamma(x)); return;} #else @@ -5324,23 +5337,23 @@ void gen315(stack *Stack) } // Complex Gamma function -#line 3858 "runtime.in" +#line 3837 "runtime.in" // pair gamma(explicit pair z); -void gen316(stack *Stack) +void gen_runtime317(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 3859 "runtime.in" +#line 3838 "runtime.in" {Stack->push<pair>(gamma(z)); return;} } -#line 3863 "runtime.in" +#line 3842 "runtime.in" // realarray* quadraticroots(real a, real b, real c); -void gen317(stack *Stack) +void gen_runtime318(stack *Stack) { real c=vm::pop<real>(Stack); real b=vm::pop<real>(Stack); real a=vm::pop<real>(Stack); -#line 3864 "runtime.in" +#line 3843 "runtime.in" quadraticroots q(a,b,c); array *roots=new array(q.roots); if(q.roots >= 1) (*roots)[0]=q.t1; @@ -5348,14 +5361,14 @@ void gen317(stack *Stack) {Stack->push<realarray*>(roots); return;} } -#line 3872 "runtime.in" +#line 3851 "runtime.in" // pairarray* quadraticroots(explicit pair a, explicit pair b, explicit pair c); -void gen318(stack *Stack) +void gen_runtime319(stack *Stack) { pair c=vm::pop<pair>(Stack); pair b=vm::pop<pair>(Stack); pair a=vm::pop<pair>(Stack); -#line 3873 "runtime.in" +#line 3852 "runtime.in" Quadraticroots q(a,b,c); array *roots=new array(q.roots); if(q.roots >= 1) (*roots)[0]=q.z1; @@ -5363,15 +5376,15 @@ void gen318(stack *Stack) {Stack->push<pairarray*>(roots); return;} } -#line 3881 "runtime.in" +#line 3860 "runtime.in" // realarray* cubicroots(real a, real b, real c, real d); -void gen319(stack *Stack) +void gen_runtime320(stack *Stack) { real d=vm::pop<real>(Stack); real c=vm::pop<real>(Stack); real b=vm::pop<real>(Stack); real a=vm::pop<real>(Stack); -#line 3882 "runtime.in" +#line 3861 "runtime.in" cubicroots q(a,b,c,d); array *roots=new array(q.roots); if(q.roots >= 1) (*roots)[0]=q.t1; @@ -5382,103 +5395,103 @@ void gen319(stack *Stack) // Transforms -#line 3893 "runtime.in" +#line 3872 "runtime.in" // bool ==(transform a, transform b); -void gen320(stack *Stack) +void gen_runtime321(stack *Stack) { transform b=vm::pop<transform>(Stack); transform a=vm::pop<transform>(Stack); -#line 3894 "runtime.in" +#line 3873 "runtime.in" {Stack->push<bool>(a == b); return;} } -#line 3899 "runtime.in" +#line 3878 "runtime.in" // bool !=(transform a, transform b); -void gen321(stack *Stack) +void gen_runtime322(stack *Stack) { transform b=vm::pop<transform>(Stack); transform a=vm::pop<transform>(Stack); -#line 3900 "runtime.in" +#line 3879 "runtime.in" {Stack->push<bool>(a != b); return;} } -#line 3904 "runtime.in" +#line 3883 "runtime.in" // transform +(transform a, transform b); -void gen322(stack *Stack) +void gen_runtime323(stack *Stack) { transform b=vm::pop<transform>(Stack); transform a=vm::pop<transform>(Stack); -#line 3905 "runtime.in" +#line 3884 "runtime.in" {Stack->push<transform>(a+b); return;} } -#line 3909 "runtime.in" +#line 3888 "runtime.in" // transform *(transform a, transform b); -void gen323(stack *Stack) +void gen_runtime324(stack *Stack) { transform b=vm::pop<transform>(Stack); transform a=vm::pop<transform>(Stack); -#line 3910 "runtime.in" +#line 3889 "runtime.in" {Stack->push<transform>(a*b); return;} } -#line 3914 "runtime.in" +#line 3893 "runtime.in" // pair *(transform t, pair z); -void gen324(stack *Stack) +void gen_runtime325(stack *Stack) { pair z=vm::pop<pair>(Stack); transform t=vm::pop<transform>(Stack); -#line 3915 "runtime.in" +#line 3894 "runtime.in" {Stack->push<pair>(t*z); return;} } -#line 3919 "runtime.in" +#line 3898 "runtime.in" // path *(transform t, path g); -void gen325(stack *Stack) +void gen_runtime326(stack *Stack) { path g=vm::pop<path>(Stack); transform t=vm::pop<transform>(Stack); -#line 3920 "runtime.in" +#line 3899 "runtime.in" {Stack->push<path>(transformed(t,g)); return;} } -#line 3924 "runtime.in" +#line 3903 "runtime.in" // pen *(transform t, pen p); -void gen326(stack *Stack) +void gen_runtime327(stack *Stack) { pen p=vm::pop<pen>(Stack); transform t=vm::pop<transform>(Stack); -#line 3925 "runtime.in" +#line 3904 "runtime.in" {Stack->push<pen>(transformed(t,p)); return;} } -#line 3929 "runtime.in" +#line 3908 "runtime.in" // picture* *(transform t, picture *f); -void gen327(stack *Stack) +void gen_runtime328(stack *Stack) { picture * f=vm::pop<picture *>(Stack); transform t=vm::pop<transform>(Stack); -#line 3930 "runtime.in" +#line 3909 "runtime.in" {Stack->push<picture*>(transformed(t,f)); return;} } -#line 3934 "runtime.in" +#line 3913 "runtime.in" // picture* *(realarray2 *t, picture *f); -void gen328(stack *Stack) +void gen_runtime329(stack *Stack) { picture * f=vm::pop<picture *>(Stack); realarray2 * t=vm::pop<realarray2 *>(Stack); -#line 3935 "runtime.in" +#line 3914 "runtime.in" {Stack->push<picture*>(transformed(*t,f)); return;} } -#line 3939 "runtime.in" +#line 3918 "runtime.in" // transform ^(transform t, Int n); -void gen329(stack *Stack) +void gen_runtime330(stack *Stack) { Int n=vm::pop<Int>(Stack); transform t=vm::pop<transform>(Stack); -#line 3940 "runtime.in" +#line 3919 "runtime.in" transform T; if(n < 0) { n=-n; @@ -5488,55 +5501,55 @@ void gen329(stack *Stack) {Stack->push<transform>(T); return;} } -#line 3950 "runtime.in" +#line 3929 "runtime.in" void transformXPart(stack *Stack) { transform t=vm::pop<transform>(Stack); -#line 3951 "runtime.in" +#line 3930 "runtime.in" {Stack->push<real>(t.getx()); return;} } -#line 3955 "runtime.in" +#line 3934 "runtime.in" void transformYPart(stack *Stack) { transform t=vm::pop<transform>(Stack); -#line 3956 "runtime.in" +#line 3935 "runtime.in" {Stack->push<real>(t.gety()); return;} } -#line 3960 "runtime.in" +#line 3939 "runtime.in" void transformXXPart(stack *Stack) { transform t=vm::pop<transform>(Stack); -#line 3961 "runtime.in" +#line 3940 "runtime.in" {Stack->push<real>(t.getxx()); return;} } -#line 3965 "runtime.in" +#line 3944 "runtime.in" void transformXYPart(stack *Stack) { transform t=vm::pop<transform>(Stack); -#line 3966 "runtime.in" +#line 3945 "runtime.in" {Stack->push<real>(t.getxy()); return;} } -#line 3970 "runtime.in" +#line 3949 "runtime.in" void transformYXPart(stack *Stack) { transform t=vm::pop<transform>(Stack); -#line 3971 "runtime.in" +#line 3950 "runtime.in" {Stack->push<real>(t.getyx()); return;} } -#line 3975 "runtime.in" +#line 3954 "runtime.in" void transformYYPart(stack *Stack) { transform t=vm::pop<transform>(Stack); -#line 3976 "runtime.in" +#line 3955 "runtime.in" {Stack->push<real>(t.getyy()); return;} } -#line 3980 "runtime.in" +#line 3959 "runtime.in" void real6ToTransform(stack *Stack) { real yy=vm::pop<real>(Stack); @@ -5545,783 +5558,806 @@ void real6ToTransform(stack *Stack) real xx=vm::pop<real>(Stack); real y=vm::pop<real>(Stack); real x=vm::pop<real>(Stack); -#line 3982 "runtime.in" +#line 3961 "runtime.in" {Stack->push<transform>(transform(x,y,xx,xy,yx,yy)); return;} } -#line 3986 "runtime.in" +#line 3965 "runtime.in" // transform shift(transform t); -void gen337(stack *Stack) +void gen_runtime338(stack *Stack) { transform t=vm::pop<transform>(Stack); -#line 3987 "runtime.in" +#line 3966 "runtime.in" {Stack->push<transform>(transform(t.getx(),t.gety(),0,0,0,0)); return;} } -#line 3991 "runtime.in" +#line 3970 "runtime.in" // transform shiftless(transform t); -void gen338(stack *Stack) +void gen_runtime339(stack *Stack) { transform t=vm::pop<transform>(Stack); -#line 3992 "runtime.in" +#line 3971 "runtime.in" {Stack->push<transform>(transform(0,0,t.getxx(),t.getxy(),t.getyx(),t.getyy())); return;} } -#line 3996 "runtime.in" +#line 3975 "runtime.in" // transform identity(); void transformIdentity(stack *Stack) { -#line 3997 "runtime.in" +#line 3976 "runtime.in" {Stack->push<transform>(identity); return;} } -#line 4001 "runtime.in" +#line 3980 "runtime.in" // transform inverse(transform t); -void gen340(stack *Stack) +void gen_runtime341(stack *Stack) { transform t=vm::pop<transform>(Stack); -#line 4002 "runtime.in" +#line 3981 "runtime.in" {Stack->push<transform>(inverse(t)); return;} } -#line 4006 "runtime.in" +#line 3985 "runtime.in" // transform shift(pair z); -void gen341(stack *Stack) +void gen_runtime342(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4007 "runtime.in" +#line 3986 "runtime.in" {Stack->push<transform>(shift(z)); return;} } -#line 4011 "runtime.in" +#line 3990 "runtime.in" // transform shift(real x, real y); -void gen342(stack *Stack) +void gen_runtime343(stack *Stack) { real y=vm::pop<real>(Stack); real x=vm::pop<real>(Stack); -#line 4012 "runtime.in" +#line 3991 "runtime.in" {Stack->push<transform>(shift(pair(x,y))); return;} } -#line 4016 "runtime.in" +#line 3995 "runtime.in" // transform xscale(real x); -void gen343(stack *Stack) +void gen_runtime344(stack *Stack) { real x=vm::pop<real>(Stack); -#line 4017 "runtime.in" +#line 3996 "runtime.in" {Stack->push<transform>(xscale(x)); return;} } -#line 4021 "runtime.in" +#line 4000 "runtime.in" // transform yscale(real y); -void gen344(stack *Stack) +void gen_runtime345(stack *Stack) { real y=vm::pop<real>(Stack); -#line 4022 "runtime.in" +#line 4001 "runtime.in" {Stack->push<transform>(yscale(y)); return;} } -#line 4026 "runtime.in" +#line 4005 "runtime.in" // transform scale(real x); -void gen345(stack *Stack) +void gen_runtime346(stack *Stack) { real x=vm::pop<real>(Stack); -#line 4027 "runtime.in" +#line 4006 "runtime.in" {Stack->push<transform>(scale(x)); return;} } -#line 4031 "runtime.in" +#line 4010 "runtime.in" // transform scale(real x, real y); -void gen346(stack *Stack) +void gen_runtime347(stack *Stack) { real y=vm::pop<real>(Stack); real x=vm::pop<real>(Stack); -#line 4032 "runtime.in" +#line 4011 "runtime.in" {Stack->push<transform>(xscale(x)*yscale(y)); return;} } -#line 4036 "runtime.in" +#line 4015 "runtime.in" // transform slant(real s); -void gen347(stack *Stack) +void gen_runtime348(stack *Stack) { real s=vm::pop<real>(Stack); -#line 4037 "runtime.in" +#line 4016 "runtime.in" {Stack->push<transform>(slant(s)); return;} } -#line 4041 "runtime.in" +#line 4020 "runtime.in" // transform rotate(real angle, pair z=0); -void gen348(stack *Stack) +void gen_runtime349(stack *Stack) { pair z=vm::pop<pair>(Stack,0); real angle=vm::pop<real>(Stack); -#line 4042 "runtime.in" +#line 4021 "runtime.in" {Stack->push<transform>(rotatearound(z,radians(angle))); return;} } -#line 4046 "runtime.in" +#line 4025 "runtime.in" // transform reflect(pair a, pair b); -void gen349(stack *Stack) +void gen_runtime350(stack *Stack) { pair b=vm::pop<pair>(Stack); pair a=vm::pop<pair>(Stack); -#line 4047 "runtime.in" +#line 4026 "runtime.in" {Stack->push<transform>(reflectabout(a,b)); return;} } // Pair operations -#line 4053 "runtime.in" +#line 4032 "runtime.in" void pairZero(stack *Stack) { -#line 4054 "runtime.in" +#line 4033 "runtime.in" {Stack->push<pair>(zero); return;} } -#line 4059 "runtime.in" +#line 4038 "runtime.in" void realRealToPair(stack *Stack) { real y=vm::pop<real>(Stack); real x=vm::pop<real>(Stack); -#line 4060 "runtime.in" +#line 4039 "runtime.in" {Stack->push<pair>(pair(x,y)); return;} } -#line 4064 "runtime.in" +#line 4043 "runtime.in" void pairNegate(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4065 "runtime.in" +#line 4044 "runtime.in" {Stack->push<pair>(-z); return;} } -#line 4069 "runtime.in" +#line 4048 "runtime.in" // real xpart(pair z); void pairXPart(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4070 "runtime.in" +#line 4049 "runtime.in" {Stack->push<real>(z.getx()); return;} } -#line 4074 "runtime.in" +#line 4053 "runtime.in" // real ypart(pair z); void pairYPart(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4075 "runtime.in" +#line 4054 "runtime.in" {Stack->push<real>(z.gety()); return;} } -#line 4079 "runtime.in" +#line 4058 "runtime.in" // real length(pair z); -void gen355(stack *Stack) +void gen_runtime356(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4080 "runtime.in" +#line 4059 "runtime.in" {Stack->push<real>(z.length()); return;} } -#line 4084 "runtime.in" +#line 4063 "runtime.in" // real abs(pair z); -void gen356(stack *Stack) +void gen_runtime357(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4085 "runtime.in" +#line 4064 "runtime.in" {Stack->push<real>(z.length()); return;} } -#line 4089 "runtime.in" +#line 4068 "runtime.in" // pair sqrt(explicit pair z); -void gen357(stack *Stack) +void gen_runtime358(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4090 "runtime.in" +#line 4069 "runtime.in" {Stack->push<pair>(Sqrt(z)); return;} } // Return the angle of z in radians. -#line 4095 "runtime.in" +#line 4074 "runtime.in" // real angle(pair z, bool warn=true); -void gen358(stack *Stack) +void gen_runtime359(stack *Stack) { bool warn=vm::pop<bool>(Stack,true); pair z=vm::pop<pair>(Stack); -#line 4096 "runtime.in" +#line 4075 "runtime.in" if(!warn && z.getx() == 0.0 && z.gety() == 0.0) {Stack->push<real>(0.0); return;} {Stack->push<real>(z.angle()); return;} } // Return the angle of z in degrees in the interval [0,360). -#line 4102 "runtime.in" +#line 4081 "runtime.in" // real degrees(pair z, bool warn=true); -void gen359(stack *Stack) +void gen_runtime360(stack *Stack) { bool warn=vm::pop<bool>(Stack,true); pair z=vm::pop<pair>(Stack); -#line 4103 "runtime.in" +#line 4082 "runtime.in" if(!warn && z.getx() == 0.0 && z.gety() == 0.0) {Stack->push<real>(0.0); return;} {Stack->push<real>(principalBranch(degrees(z.angle()))); return;} } // Convert degrees to radians. -#line 4109 "runtime.in" +#line 4088 "runtime.in" // real radians(real degrees); -void gen360(stack *Stack) +void gen_runtime361(stack *Stack) { real degrees=vm::pop<real>(Stack); -#line 4110 "runtime.in" +#line 4089 "runtime.in" {Stack->push<real>(radians(degrees)); return;} } // Convert radians to degrees. -#line 4115 "runtime.in" +#line 4094 "runtime.in" // real degrees(real radians); -void gen361(stack *Stack) +void gen_runtime362(stack *Stack) { real radians=vm::pop<real>(Stack); -#line 4116 "runtime.in" +#line 4095 "runtime.in" {Stack->push<real>(degrees(radians)); return;} } // Convert radians to degrees in [0,360). -#line 4121 "runtime.in" +#line 4100 "runtime.in" // real Degrees(real radians); -void gen362(stack *Stack) +void gen_runtime363(stack *Stack) { real radians=vm::pop<real>(Stack); -#line 4122 "runtime.in" +#line 4101 "runtime.in" {Stack->push<real>(principalBranch(degrees(radians))); return;} } -#line 4126 "runtime.in" +#line 4105 "runtime.in" // real Sin(real deg); -void gen363(stack *Stack) +void gen_runtime364(stack *Stack) { real deg=vm::pop<real>(Stack); -#line 4127 "runtime.in" +#line 4106 "runtime.in" {Stack->push<real>(sin(radians(deg))); return;} } -#line 4131 "runtime.in" +#line 4110 "runtime.in" // real Cos(real deg); -void gen364(stack *Stack) +void gen_runtime365(stack *Stack) { real deg=vm::pop<real>(Stack); -#line 4132 "runtime.in" +#line 4111 "runtime.in" {Stack->push<real>(cos(radians(deg))); return;} } -#line 4136 "runtime.in" +#line 4115 "runtime.in" // real Tan(real deg); -void gen365(stack *Stack) +void gen_runtime366(stack *Stack) { real deg=vm::pop<real>(Stack); -#line 4137 "runtime.in" +#line 4116 "runtime.in" {Stack->push<real>(tan(radians(deg))); return;} } -#line 4141 "runtime.in" +#line 4120 "runtime.in" // real aSin(real x); -void gen366(stack *Stack) +void gen_runtime367(stack *Stack) { real x=vm::pop<real>(Stack); -#line 4142 "runtime.in" +#line 4121 "runtime.in" {Stack->push<real>(degrees(asin(x))); return;} } -#line 4146 "runtime.in" +#line 4125 "runtime.in" // real aCos(real x); -void gen367(stack *Stack) +void gen_runtime368(stack *Stack) { real x=vm::pop<real>(Stack); -#line 4147 "runtime.in" +#line 4126 "runtime.in" {Stack->push<real>(degrees(acos(x))); return;} } -#line 4151 "runtime.in" +#line 4130 "runtime.in" // real aTan(real x); -void gen368(stack *Stack) +void gen_runtime369(stack *Stack) { real x=vm::pop<real>(Stack); -#line 4152 "runtime.in" +#line 4131 "runtime.in" {Stack->push<real>(degrees(atan(x))); return;} } -#line 4156 "runtime.in" +#line 4135 "runtime.in" // pair unit(pair z); -void gen369(stack *Stack) +void gen_runtime370(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4157 "runtime.in" +#line 4136 "runtime.in" {Stack->push<pair>(unit(z)); return;} } -#line 4161 "runtime.in" +#line 4140 "runtime.in" // pair dir(real degrees); -void gen370(stack *Stack) +void gen_runtime371(stack *Stack) { real degrees=vm::pop<real>(Stack); -#line 4162 "runtime.in" +#line 4141 "runtime.in" {Stack->push<pair>(expi(radians(degrees))); return;} } -#line 4166 "runtime.in" +#line 4145 "runtime.in" // pair dir(explicit pair z); -void gen371(stack *Stack) +void gen_runtime372(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4167 "runtime.in" +#line 4146 "runtime.in" {Stack->push<pair>(unit(z)); return;} } -#line 4171 "runtime.in" +#line 4150 "runtime.in" // pair expi(real angle); -void gen372(stack *Stack) +void gen_runtime373(stack *Stack) { real angle=vm::pop<real>(Stack); -#line 4172 "runtime.in" +#line 4151 "runtime.in" {Stack->push<pair>(expi(angle)); return;} } -#line 4176 "runtime.in" +#line 4155 "runtime.in" // pair exp(explicit pair z); -void gen373(stack *Stack) +void gen_runtime374(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4177 "runtime.in" +#line 4156 "runtime.in" {Stack->push<pair>(exp(z)); return;} } -#line 4181 "runtime.in" +#line 4160 "runtime.in" // pair log(explicit pair z); -void gen374(stack *Stack) +void gen_runtime375(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4182 "runtime.in" +#line 4161 "runtime.in" {Stack->push<pair>(pair(log(z.length()),z.angle())); return;} } -#line 4186 "runtime.in" +#line 4165 "runtime.in" // pair sin(explicit pair z); -void gen375(stack *Stack) +void gen_runtime376(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4187 "runtime.in" +#line 4166 "runtime.in" {Stack->push<pair>(sin(z)); return;} } -#line 4191 "runtime.in" +#line 4170 "runtime.in" // pair cos(explicit pair z); -void gen376(stack *Stack) +void gen_runtime377(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4192 "runtime.in" +#line 4171 "runtime.in" {Stack->push<pair>(pair(cos(z.getx())*cosh(z.gety()),-sin(z.getx())*sinh(z.gety()))); return;} } -#line 4196 "runtime.in" +#line 4175 "runtime.in" // pair conj(pair z); -void gen377(stack *Stack) +void gen_runtime378(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4197 "runtime.in" +#line 4176 "runtime.in" {Stack->push<pair>(conj(z)); return;} } -#line 4201 "runtime.in" +#line 4180 "runtime.in" // pair realmult(pair z, pair w); -void gen378(stack *Stack) +void gen_runtime379(stack *Stack) { pair w=vm::pop<pair>(Stack); pair z=vm::pop<pair>(Stack); -#line 4202 "runtime.in" +#line 4181 "runtime.in" {Stack->push<pair>(pair (z.getx()*w.getx(),z.gety()*w.gety())); return;} } -#line 4206 "runtime.in" +#line 4185 "runtime.in" // triple realmult(triple u, triple v); -void gen379(stack *Stack) +void gen_runtime380(stack *Stack) { triple v=vm::pop<triple>(Stack); triple u=vm::pop<triple>(Stack); -#line 4207 "runtime.in" +#line 4186 "runtime.in" {Stack->push<triple>(triple (u.getx()*v.getx(),u.gety()*v.gety(),u.getz()*v.getz())); return;} } // To avoid confusion, a dot product requires explicit pair arguments. -#line 4212 "runtime.in" +#line 4191 "runtime.in" // real dot(explicit pair z, explicit pair w); -void gen380(stack *Stack) +void gen_runtime381(stack *Stack) { pair w=vm::pop<pair>(Stack); pair z=vm::pop<pair>(Stack); -#line 4213 "runtime.in" +#line 4192 "runtime.in" {Stack->push<real>(dot(z,w)); return;} } // Triple operations -#line 4219 "runtime.in" +#line 4198 "runtime.in" void tripleZero(stack *Stack) { -#line 4220 "runtime.in" +#line 4199 "runtime.in" static triple zero; {Stack->push<triple>(zero); return;} } -#line 4226 "runtime.in" +#line 4205 "runtime.in" void realRealRealToTriple(stack *Stack) { real z=vm::pop<real>(Stack); real y=vm::pop<real>(Stack); real x=vm::pop<real>(Stack); -#line 4227 "runtime.in" +#line 4206 "runtime.in" {Stack->push<triple>(triple(x,y,z)); return;} } -#line 4231 "runtime.in" +#line 4210 "runtime.in" // real xpart(triple v); void tripleXPart(stack *Stack) { triple v=vm::pop<triple>(Stack); -#line 4232 "runtime.in" +#line 4211 "runtime.in" {Stack->push<real>(v.getx()); return;} } -#line 4236 "runtime.in" +#line 4215 "runtime.in" // real ypart(triple v); void tripleYPart(stack *Stack) { triple v=vm::pop<triple>(Stack); -#line 4237 "runtime.in" +#line 4216 "runtime.in" {Stack->push<real>(v.gety()); return;} } -#line 4241 "runtime.in" +#line 4220 "runtime.in" // real zpart(triple v); void tripleZPart(stack *Stack) { triple v=vm::pop<triple>(Stack); -#line 4242 "runtime.in" +#line 4221 "runtime.in" {Stack->push<real>(v.getz()); return;} } -#line 4246 "runtime.in" +#line 4225 "runtime.in" // triple *(real x, triple v); -void gen386(stack *Stack) +void gen_runtime387(stack *Stack) { triple v=vm::pop<triple>(Stack); real x=vm::pop<real>(Stack); -#line 4247 "runtime.in" +#line 4226 "runtime.in" {Stack->push<triple>(x*v); return;} } -#line 4251 "runtime.in" +#line 4230 "runtime.in" // triple *(triple v, real x); -void gen387(stack *Stack) +void gen_runtime388(stack *Stack) { real x=vm::pop<real>(Stack); triple v=vm::pop<triple>(Stack); -#line 4252 "runtime.in" +#line 4231 "runtime.in" {Stack->push<triple>(v*x); return;} } -#line 4256 "runtime.in" +#line 4235 "runtime.in" // triple /(triple v, real x); -void gen388(stack *Stack) +void gen_runtime389(stack *Stack) { real x=vm::pop<real>(Stack); triple v=vm::pop<triple>(Stack); -#line 4257 "runtime.in" +#line 4236 "runtime.in" {Stack->push<triple>(v/x); return;} } -#line 4261 "runtime.in" +#line 4240 "runtime.in" // real length(triple v); -void gen389(stack *Stack) +void gen_runtime390(stack *Stack) { triple v=vm::pop<triple>(Stack); -#line 4262 "runtime.in" +#line 4241 "runtime.in" {Stack->push<real>(v.length()); return;} } -#line 4266 "runtime.in" +#line 4245 "runtime.in" // real abs(triple v); -void gen390(stack *Stack) +void gen_runtime391(stack *Stack) { triple v=vm::pop<triple>(Stack); -#line 4267 "runtime.in" +#line 4246 "runtime.in" {Stack->push<real>(v.length()); return;} } -#line 4271 "runtime.in" +#line 4250 "runtime.in" // real polar(triple v, bool warn=true); -void gen391(stack *Stack) +void gen_runtime392(stack *Stack) { bool warn=vm::pop<bool>(Stack,true); triple v=vm::pop<triple>(Stack); -#line 4272 "runtime.in" +#line 4251 "runtime.in" if(!warn && v.getx() == 0.0 && v.gety() == 0.0 && v.getz() == 0.0) {Stack->push<real>(0.0); return;} {Stack->push<real>(v.polar()); return;} } -#line 4277 "runtime.in" +#line 4256 "runtime.in" // real azimuth(triple v, bool warn=true); -void gen392(stack *Stack) +void gen_runtime393(stack *Stack) { bool warn=vm::pop<bool>(Stack,true); triple v=vm::pop<triple>(Stack); -#line 4278 "runtime.in" +#line 4257 "runtime.in" if(!warn && v.getx() == 0.0 && v.gety() == 0.0) {Stack->push<real>(0.0); return;} {Stack->push<real>(v.azimuth()); return;} } -#line 4283 "runtime.in" +#line 4262 "runtime.in" // real colatitude(triple v, bool warn=true); -void gen393(stack *Stack) +void gen_runtime394(stack *Stack) { bool warn=vm::pop<bool>(Stack,true); triple v=vm::pop<triple>(Stack); -#line 4284 "runtime.in" +#line 4263 "runtime.in" if(!warn && v.getx() == 0.0 && v.gety() == 0.0 && v.getz() == 0.0) {Stack->push<real>(0.0); return;} {Stack->push<real>(degrees(v.polar())); return;} } -#line 4289 "runtime.in" +#line 4268 "runtime.in" // real latitude(triple v, bool warn=true); -void gen394(stack *Stack) +void gen_runtime395(stack *Stack) { bool warn=vm::pop<bool>(Stack,true); triple v=vm::pop<triple>(Stack); -#line 4290 "runtime.in" +#line 4269 "runtime.in" if(!warn && v.getx() == 0.0 && v.gety() == 0.0 && v.getz() == 0.0) {Stack->push<real>(0.0); return;} {Stack->push<real>(90.0-degrees(v.polar())); return;} } // Return the longitude of v in [0,360). -#line 4296 "runtime.in" +#line 4275 "runtime.in" // real longitude(triple v, bool warn=true); -void gen395(stack *Stack) +void gen_runtime396(stack *Stack) { bool warn=vm::pop<bool>(Stack,true); triple v=vm::pop<triple>(Stack); -#line 4297 "runtime.in" +#line 4276 "runtime.in" if(!warn && v.getx() == 0.0 && v.gety() == 0.0) {Stack->push<real>(0.0); return;} {Stack->push<real>(principalBranch(degrees(v.azimuth()))); return;} } -#line 4302 "runtime.in" +#line 4281 "runtime.in" // triple unit(triple v); -void gen396(stack *Stack) +void gen_runtime397(stack *Stack) { triple v=vm::pop<triple>(Stack); -#line 4303 "runtime.in" +#line 4282 "runtime.in" {Stack->push<triple>(unit(v)); return;} } -#line 4307 "runtime.in" +#line 4286 "runtime.in" // real dot(triple u, triple v); -void gen397(stack *Stack) +void gen_runtime398(stack *Stack) { triple v=vm::pop<triple>(Stack); triple u=vm::pop<triple>(Stack); -#line 4308 "runtime.in" +#line 4287 "runtime.in" {Stack->push<real>(dot(u,v)); return;} } -#line 4312 "runtime.in" +#line 4291 "runtime.in" // triple cross(triple u, triple v); -void gen398(stack *Stack) +void gen_runtime399(stack *Stack) { triple v=vm::pop<triple>(Stack); triple u=vm::pop<triple>(Stack); -#line 4313 "runtime.in" +#line 4292 "runtime.in" {Stack->push<triple>(cross(u,v)); return;} } -#line 4317 "runtime.in" +#line 4296 "runtime.in" +// triple dir(explicit triple z); +void gen_runtime400(stack *Stack) +{ + triple z=vm::pop<triple>(Stack); +#line 4297 "runtime.in" + {Stack->push<triple>(unit(z)); return;} +} + +#line 4301 "runtime.in" // triple expi(real polar, real azimuth); -void gen399(stack *Stack) +void gen_runtime401(stack *Stack) { real azimuth=vm::pop<real>(Stack); real polar=vm::pop<real>(Stack); -#line 4318 "runtime.in" +#line 4302 "runtime.in" {Stack->push<triple>(expi(polar,azimuth)); return;} } -#line 4322 "runtime.in" +#line 4306 "runtime.in" // triple dir(real colatitude, real longitude); -void gen400(stack *Stack) +void gen_runtime402(stack *Stack) { real longitude=vm::pop<real>(Stack); real colatitude=vm::pop<real>(Stack); -#line 4323 "runtime.in" +#line 4307 "runtime.in" {Stack->push<triple>(expi(radians(colatitude),radians(longitude))); return;} } // System routines -#line 4329 "runtime.in" +#line 4313 "runtime.in" // void atupdate(callable *f); -void gen401(stack *Stack) +void gen_runtime403(stack *Stack) { callable * f=vm::pop<callable *>(Stack); -#line 4330 "runtime.in" +#line 4314 "runtime.in" processData().atUpdateFunction=f; } -#line 4335 "runtime.in" +#line 4319 "runtime.in" // callable* atupdate(); -void gen402(stack *Stack) +void gen_runtime404(stack *Stack) { -#line 4336 "runtime.in" +#line 4320 "runtime.in" {Stack->push<callable*>(processData().atUpdateFunction); return;} } -#line 4340 "runtime.in" +#line 4324 "runtime.in" // void atexit(callable *f); -void gen403(stack *Stack) +void gen_runtime405(stack *Stack) { callable * f=vm::pop<callable *>(Stack); -#line 4341 "runtime.in" +#line 4325 "runtime.in" processData().atExitFunction=f; } -#line 4345 "runtime.in" +#line 4329 "runtime.in" // callable* atexit(); -void gen404(stack *Stack) +void gen_runtime406(stack *Stack) { -#line 4346 "runtime.in" +#line 4330 "runtime.in" {Stack->push<callable*>(processData().atExitFunction); return;} } -#line 4350 "runtime.in" +#line 4334 "runtime.in" // void atbreakpoint(callableBp *f); -void gen405(stack *Stack) +void gen_runtime407(stack *Stack) { callableBp * f=vm::pop<callableBp *>(Stack); -#line 4351 "runtime.in" +#line 4335 "runtime.in" processData().atBreakpointFunction=f; } -#line 4355 "runtime.in" +#line 4339 "runtime.in" // void breakpoint(runnable *s=NULL); -void gen406(stack *Stack) +void gen_runtime408(stack *Stack) { runnable * s=vm::pop<runnable *>(Stack,NULL); -#line 4356 "runtime.in" +#line 4340 "runtime.in" breakpoint(Stack,s); } -#line 4360 "runtime.in" +#line 4344 "runtime.in" // string locatefile(string file); -void gen407(stack *Stack) +void gen_runtime409(stack *Stack) { string file=vm::pop<string>(Stack); -#line 4361 "runtime.in" +#line 4345 "runtime.in" {Stack->push<string>(locateFile(file)); return;} } -#line 4365 "runtime.in" +#line 4349 "runtime.in" // void stop(string file, Int line, runnable *s=NULL); -void gen408(stack *Stack) +void gen_runtime410(stack *Stack) { runnable * s=vm::pop<runnable *>(Stack,NULL); Int line=vm::pop<Int>(Stack); string file=vm::pop<string>(Stack); -#line 4366 "runtime.in" +#line 4350 "runtime.in" file=locateFile(file); clear(file,line); cout << "setting breakpoint at " << file << ": " << line << endl; bplist.push_back(bpinfo(file,line,s)); } -#line 4373 "runtime.in" +#line 4357 "runtime.in" // void breakpoints(); -void gen409(stack *) +void gen_runtime411(stack *) { -#line 4374 "runtime.in" +#line 4358 "runtime.in" for(mem::list<bpinfo>::iterator p=bplist.begin(); p != bplist.end(); ++p) cout << p->f.name() << ": " << p->f.line() << endl; } -#line 4379 "runtime.in" +#line 4363 "runtime.in" // void clear(string file, Int line); -void gen410(stack *Stack) +void gen_runtime412(stack *Stack) { Int line=vm::pop<Int>(Stack); string file=vm::pop<string>(Stack); -#line 4380 "runtime.in" +#line 4364 "runtime.in" file=locateFile(file); clear(file,line,true); } -#line 4385 "runtime.in" +#line 4369 "runtime.in" // void clear(); -void gen411(stack *) +void gen_runtime413(stack *) { -#line 4386 "runtime.in" +#line 4370 "runtime.in" bplist.clear(); } -#line 4390 "runtime.in" +#line 4374 "runtime.in" // void warn(string s); -void gen412(stack *Stack) +void gen_runtime414(stack *Stack) { string s=vm::pop<string>(Stack); -#line 4391 "runtime.in" +#line 4375 "runtime.in" Warn(s); } -#line 4395 "runtime.in" +#line 4379 "runtime.in" // void nowarn(string s); -void gen413(stack *Stack) +void gen_runtime415(stack *Stack) { string s=vm::pop<string>(Stack); -#line 4396 "runtime.in" +#line 4380 "runtime.in" noWarn(s); } +#line 4384 "runtime.in" +// void warning(string s, string t, bool position=false); +void gen_runtime416(stack *Stack) +{ + bool position=vm::pop<bool>(Stack,false); + string t=vm::pop<string>(Stack); + string s=vm::pop<string>(Stack); +#line 4385 "runtime.in" + if(settings::warn(s)) { + em.warning(position ? getPos() : nullPos,s); + em << t; + } +} + // Strip directory from string -#line 4401 "runtime.in" +#line 4393 "runtime.in" // string stripdirectory(string *s); -void gen414(stack *Stack) +void gen_runtime417(stack *Stack) { string * s=vm::pop<string *>(Stack); -#line 4402 "runtime.in" +#line 4394 "runtime.in" {Stack->push<string>(stripDir(*s)); return;} } // Strip directory from string -#line 4407 "runtime.in" +#line 4399 "runtime.in" // string stripfile(string *s); -void gen415(stack *Stack) +void gen_runtime418(stack *Stack) { string * s=vm::pop<string *>(Stack); -#line 4408 "runtime.in" +#line 4400 "runtime.in" {Stack->push<string>(stripFile(*s)); return;} } // Strip file extension from string -#line 4413 "runtime.in" +#line 4405 "runtime.in" // string stripextension(string *s); -void gen416(stack *Stack) +void gen_runtime419(stack *Stack) { string * s=vm::pop<string *>(Stack); -#line 4414 "runtime.in" +#line 4406 "runtime.in" {Stack->push<string>(stripExt(*s)); return;} } // Call ImageMagick convert. -#line 4419 "runtime.in" +#line 4411 "runtime.in" // Int convert(string args=emptystring, string file=emptystring, string format=emptystring); -void gen417(stack *Stack) +void gen_runtime420(stack *Stack) { string format=vm::pop<string>(Stack,emptystring); string file=vm::pop<string>(Stack,emptystring); string args=vm::pop<string>(Stack,emptystring); -#line 4421 "runtime.in" +#line 4413 "runtime.in" string name=convertname(file,format); mem::vector<string> cmd; cmd.push_back(getSetting<string>("convert")); @@ -6338,14 +6374,14 @@ void gen417(stack *Stack) } // Call ImageMagick animate. -#line 4438 "runtime.in" +#line 4430 "runtime.in" // Int animate(string args=emptystring, string file=emptystring, string format=emptystring); -void gen418(stack *Stack) +void gen_runtime421(stack *Stack) { string format=vm::pop<string>(Stack,emptystring); string file=vm::pop<string>(Stack,emptystring); string args=vm::pop<string>(Stack,emptystring); -#line 4440 "runtime.in" +#line 4432 "runtime.in" #ifndef __CYGWIN__ string name=convertname(file,format,false); if(view()) { @@ -6360,12 +6396,12 @@ void gen418(stack *Stack) } // Delete file named s. -#line 4455 "runtime.in" +#line 4447 "runtime.in" // Int delete(string *s); -void gen419(stack *Stack) +void gen_runtime422(stack *Stack) { string * s=vm::pop<string *>(Stack); -#line 4456 "runtime.in" +#line 4448 "runtime.in" checkLocal(*s); Int rc=unlink(s->c_str()); if(rc == 0 && verbose > 0) @@ -6374,13 +6410,13 @@ void gen419(stack *Stack) } // Rename file "from" to file "to". -#line 4465 "runtime.in" +#line 4457 "runtime.in" // Int rename(string *from, string *to); -void gen420(stack *Stack) +void gen_runtime423(stack *Stack) { string * to=vm::pop<string *>(Stack); string * from=vm::pop<string *>(Stack); -#line 4466 "runtime.in" +#line 4458 "runtime.in" checkLocal(*from); checkLocal(*to); Int rc=rename(from->c_str(),to->c_str()); @@ -6393,10 +6429,10 @@ void gen420(stack *Stack) // Array operations // Create an empty array. -#line 4479 "runtime.in" +#line 4471 "runtime.in" void emptyArray(stack *Stack) { -#line 4480 "runtime.in" +#line 4472 "runtime.in" {Stack->push<array*>(new array(0)); return;} } @@ -6405,11 +6441,11 @@ void emptyArray(stack *Stack) // is popped off the stack, followed by each dimension in reverse order. // The array itself is technically a one dimensional array of one // dimension arrays and so on. -#line 4489 "runtime.in" +#line 4481 "runtime.in" void newDeepArray(stack *Stack) { Int depth=vm::pop<Int>(Stack); -#line 4490 "runtime.in" +#line 4482 "runtime.in" assert(depth > 0); Int *dims = new Int[depth]; @@ -6428,11 +6464,11 @@ void newDeepArray(stack *Stack) // Creates an array with elements already specified. First, the number // of elements is popped off the stack, followed by each element in // reverse order. -#line 4509 "runtime.in" +#line 4501 "runtime.in" void newInitializedArray(stack *Stack) { Int n=vm::pop<Int>(Stack); -#line 4510 "runtime.in" +#line 4502 "runtime.in" assert(n >= 0); array *a = new array(n); @@ -6445,12 +6481,12 @@ void newInitializedArray(stack *Stack) // Similar to newInitializedArray, but after the n elements, append another // array to it. -#line 4523 "runtime.in" +#line 4515 "runtime.in" void newAppendedArray(stack *Stack) { Int n=vm::pop<Int>(Stack); array* tail=vm::pop<array*>(Stack); -#line 4524 "runtime.in" +#line 4516 "runtime.in" assert(n >= 0); array *a = new array(n); @@ -6465,13 +6501,13 @@ void newAppendedArray(stack *Stack) // The function T[] array(int n, T value, int depth=0) produces a array of n // copies of x, where each copy is copied up to depth. -#line 4539 "runtime.in" +#line 4531 "runtime.in" void newDuplicateArray(stack *Stack) { Int depth=vm::pop<Int>(Stack,Int_MAX); item value=vm::pop(Stack); Int n=vm::pop<Int>(Stack); -#line 4540 "runtime.in" +#line 4532 "runtime.in" if(n < 0) error("cannot create a negative length array"); if(depth < 0) error("cannot copy to a negative depth"); @@ -6479,12 +6515,12 @@ void newDuplicateArray(stack *Stack) } // Read an element from an array. Checks for initialization & bounds. -#line 4548 "runtime.in" +#line 4540 "runtime.in" void arrayRead(stack *Stack) { Int n=vm::pop<Int>(Stack); array * a=vm::pop<array *>(Stack); -#line 4549 "runtime.in" +#line 4541 "runtime.in" item& i=arrayRead(a,n); if (i.empty()) { ostringstream buf; @@ -6495,50 +6531,50 @@ void arrayRead(stack *Stack) } // Slice a substring from an array. -#line 4560 "runtime.in" +#line 4552 "runtime.in" void arraySliceRead(stack *Stack) { Int right=vm::pop<Int>(Stack); Int left=vm::pop<Int>(Stack); array * a=vm::pop<array *>(Stack); -#line 4561 "runtime.in" +#line 4553 "runtime.in" checkArray(a); {Stack->push(a->slice(left, right)); return;} } // Slice a substring from an array. This implements the cases a[i:] and a[:] // where the endpoint is not given, and assumed to be the length of the array. -#line 4568 "runtime.in" +#line 4560 "runtime.in" void arraySliceReadToEnd(stack *Stack) { Int left=vm::pop<Int>(Stack); array * a=vm::pop<array *>(Stack); -#line 4569 "runtime.in" +#line 4561 "runtime.in" size_t len=checkArray(a); {Stack->push(a->slice(left, (Int)len)); return;} } // Read an element from an array of arrays. Check bounds and initialize // as necessary. -#line 4576 "runtime.in" +#line 4568 "runtime.in" void arrayArrayRead(stack *Stack) { Int n=vm::pop<Int>(Stack); array * a=vm::pop<array *>(Stack); -#line 4577 "runtime.in" +#line 4569 "runtime.in" item& i=arrayRead(a,n); if (i.empty()) i=new array(0); {Stack->push(i); return;} } // Write an element to an array. Increase size if necessary. -#line 4584 "runtime.in" +#line 4576 "runtime.in" void arrayWrite(stack *Stack) { Int n=vm::pop<Int>(Stack); array * a=vm::pop<array *>(Stack); item value=vm::pop(Stack); -#line 4585 "runtime.in" +#line 4577 "runtime.in" size_t len=checkArray(a); bool cyclic=a->cyclic(); if(cyclic && len > 0) n=imod(n,len); @@ -6552,27 +6588,27 @@ void arrayWrite(stack *Stack) {Stack->push(value); return;} } -#line 4599 "runtime.in" +#line 4591 "runtime.in" void arraySliceWrite(stack *Stack) { Int right=vm::pop<Int>(Stack); Int left=vm::pop<Int>(Stack); array * dest=vm::pop<array *>(Stack); array * src=vm::pop<array *>(Stack); -#line 4600 "runtime.in" +#line 4592 "runtime.in" checkArray(src); checkArray(dest); dest->setSlice(left, right, src); {Stack->push<array*>(src); return;} } -#line 4607 "runtime.in" +#line 4599 "runtime.in" void arraySliceWriteToEnd(stack *Stack) { Int left=vm::pop<Int>(Stack); array * dest=vm::pop<array *>(Stack); array * src=vm::pop<array *>(Stack); -#line 4608 "runtime.in" +#line 4600 "runtime.in" checkArray(src); size_t len=checkArray(dest); dest->setSlice(left, (Int) len, src); @@ -6580,20 +6616,20 @@ void arraySliceWriteToEnd(stack *Stack) } // Returns the length of an array. -#line 4616 "runtime.in" +#line 4608 "runtime.in" void arrayLength(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4617 "runtime.in" +#line 4609 "runtime.in" {Stack->push<Int>((Int) checkArray(a)); return;} } // Returns an array of integers representing the keys of the array. -#line 4622 "runtime.in" +#line 4614 "runtime.in" void arrayKeys(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4623 "runtime.in" +#line 4615 "runtime.in" size_t size=checkArray(a); array *keys=new array(); @@ -6607,22 +6643,33 @@ void arrayKeys(stack *Stack) } // Return the cyclic flag for an array. -#line 4637 "runtime.in" +#line 4629 "runtime.in" void arrayCyclicFlag(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4638 "runtime.in" +#line 4630 "runtime.in" checkArray(a); {Stack->push<bool>(a->cyclic()); return;} } +#line 4635 "runtime.in" +void arraySetCyclicFlag(stack *Stack) +{ + array * a=vm::pop<array *>(Stack); + bool b=vm::pop<bool>(Stack); +#line 4636 "runtime.in" + checkArray(a); + a->cyclic(b); + {Stack->push<bool>(b); return;} +} + // Check to see if an array element is initialized. -#line 4644 "runtime.in" +#line 4643 "runtime.in" void arrayInitializedHelper(stack *Stack) { array * a=vm::pop<array *>(Stack); Int n=vm::pop<Int>(Stack); -#line 4645 "runtime.in" +#line 4644 "runtime.in" size_t len=checkArray(a); bool cyclic=a->cyclic(); if(cyclic && len > 0) n=imod(n,len); @@ -6632,62 +6679,62 @@ void arrayInitializedHelper(stack *Stack) } // Returns the initialize method for an array. -#line 4655 "runtime.in" +#line 4654 "runtime.in" void arrayInitialized(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4656 "runtime.in" +#line 4655 "runtime.in" {Stack->push<callable*>(new thunk(new bfunc(arrayInitializedHelper),a)); return;} } // The helper function for the cyclic method that sets the cyclic flag. -#line 4661 "runtime.in" +#line 4660 "runtime.in" void arrayCyclicHelper(stack *Stack) { array * a=vm::pop<array *>(Stack); bool b=vm::pop<bool>(Stack); -#line 4662 "runtime.in" +#line 4661 "runtime.in" checkArray(a); a->cyclic(b); } // Set the cyclic flag for an array. -#line 4668 "runtime.in" +#line 4667 "runtime.in" void arrayCyclic(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4669 "runtime.in" +#line 4668 "runtime.in" {Stack->push<callable*>(new thunk(new bfunc(arrayCyclicHelper),a)); return;} } // The helper function for the push method that does the actual operation. -#line 4674 "runtime.in" +#line 4673 "runtime.in" void arrayPushHelper(stack *Stack) { array * a=vm::pop<array *>(Stack); item x=vm::pop(Stack); -#line 4675 "runtime.in" +#line 4674 "runtime.in" checkArray(a); a->push(x); {Stack->push(x); return;} } // Returns the push method for an array. -#line 4682 "runtime.in" +#line 4681 "runtime.in" void arrayPush(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4683 "runtime.in" +#line 4682 "runtime.in" {Stack->push<callable*>(new thunk(new bfunc(arrayPushHelper),a)); return;} } // The helper function for the append method that appends b to a. -#line 4688 "runtime.in" +#line 4687 "runtime.in" void arrayAppendHelper(stack *Stack) { array * a=vm::pop<array *>(Stack); array * b=vm::pop<array *>(Stack); -#line 4689 "runtime.in" +#line 4688 "runtime.in" checkArray(a); size_t size=checkArray(b); for(size_t i=0; i < size; i++) @@ -6695,20 +6742,20 @@ void arrayAppendHelper(stack *Stack) } // Returns the append method for an array. -#line 4697 "runtime.in" +#line 4696 "runtime.in" void arrayAppend(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4698 "runtime.in" +#line 4697 "runtime.in" {Stack->push<callable*>(new thunk(new bfunc(arrayAppendHelper),a)); return;} } // The helper function for the pop method. -#line 4703 "runtime.in" +#line 4702 "runtime.in" void arrayPopHelper(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4704 "runtime.in" +#line 4703 "runtime.in" size_t asize=checkArray(a); if(asize == 0) error("cannot pop element from empty array"); @@ -6716,22 +6763,22 @@ void arrayPopHelper(stack *Stack) } // Returns the pop method for an array. -#line 4712 "runtime.in" +#line 4711 "runtime.in" void arrayPop(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4713 "runtime.in" +#line 4712 "runtime.in" {Stack->push<callable*>(new thunk(new bfunc(arrayPopHelper),a)); return;} } // The helper function for the insert method. -#line 4718 "runtime.in" +#line 4717 "runtime.in" void arrayInsertHelper(stack *Stack) { array * a=vm::pop<array *>(Stack); array * x=vm::pop<array *>(Stack); Int i=vm::pop<Int>(Stack); -#line 4719 "runtime.in" +#line 4718 "runtime.in" size_t asize=checkArray(a); checkArray(x); if(a->cyclic() && asize > 0) i=imod(i,asize); @@ -6741,39 +6788,39 @@ void arrayInsertHelper(stack *Stack) } // Returns the insert method for an array. -#line 4729 "runtime.in" +#line 4728 "runtime.in" void arrayInsert(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4730 "runtime.in" +#line 4729 "runtime.in" {Stack->push<callable*>(new thunk(new bfunc(arrayInsertHelper),a)); return;} } // Returns the delete method for an array. -#line 4735 "runtime.in" +#line 4734 "runtime.in" void arrayDelete(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4736 "runtime.in" +#line 4735 "runtime.in" {Stack->push<callable*>(new thunk(new bfunc(arrayDeleteHelper),a)); return;} } -#line 4740 "runtime.in" +#line 4739 "runtime.in" void arrayAlias(stack *Stack) { array * b=vm::pop<array *>(Stack); array * a=vm::pop<array *>(Stack); -#line 4741 "runtime.in" +#line 4740 "runtime.in" {Stack->push<bool>(a==b); return;} } // Return array formed by indexing array a with elements of integer array b -#line 4746 "runtime.in" +#line 4745 "runtime.in" void arrayIntArray(stack *Stack) { array * b=vm::pop<array *>(Stack); array * a=vm::pop<array *>(Stack); -#line 4747 "runtime.in" +#line 4746 "runtime.in" size_t asize=checkArray(a); size_t bsize=checkArray(b); array *r=new array(bsize); @@ -6791,13 +6838,13 @@ void arrayIntArray(stack *Stack) // returns the complement of the integer array a in {0,2,...,n-1}, // so that b[complement(a,b.length)] yields the complement of b[a]. -#line 4765 "runtime.in" +#line 4764 "runtime.in" // Intarray* complement(Intarray *a, Int n); -void gen451(stack *Stack) +void gen_runtime455(stack *Stack) { Int n=vm::pop<Int>(Stack); Intarray * a=vm::pop<Intarray *>(Stack); -#line 4766 "runtime.in" +#line 4765 "runtime.in" size_t asize=checkArray(a); array *r=new array(0); bool *keep=new bool[n]; @@ -6814,12 +6861,12 @@ void gen451(stack *Stack) } // Generate the sequence {f(i) : i=0,1,...n-1} given a function f and integer n -#line 4783 "runtime.in" +#line 4782 "runtime.in" void arraySequence(stack *Stack) { Int n=vm::pop<Int>(Stack); callable * f=vm::pop<callable *>(Stack); -#line 4784 "runtime.in" +#line 4783 "runtime.in" if(n < 0) n=0; array *a=new array(n); for(Int i=0; i < n; ++i) { @@ -6831,12 +6878,12 @@ void arraySequence(stack *Stack) } // Return the array {0,1,...n-1} -#line 4796 "runtime.in" +#line 4795 "runtime.in" // Intarray* sequence(Int n); -void gen453(stack *Stack) +void gen_runtime457(stack *Stack) { Int n=vm::pop<Int>(Stack); -#line 4797 "runtime.in" +#line 4796 "runtime.in" if(n < 0) n=0; array *a=new array(n); for(Int i=0; i < n; ++i) { @@ -6846,12 +6893,12 @@ void gen453(stack *Stack) } // Apply a function to each element of an array -#line 4807 "runtime.in" +#line 4806 "runtime.in" void arrayFunction(stack *Stack) { array * a=vm::pop<array *>(Stack); callable * f=vm::pop<callable *>(Stack); -#line 4808 "runtime.in" +#line 4807 "runtime.in" size_t size=checkArray(a); array *b=new array(size); for(size_t i=0; i < size; ++i) { @@ -6862,12 +6909,12 @@ void arrayFunction(stack *Stack) {Stack->push<array*>(b); return;} } -#line 4819 "runtime.in" +#line 4818 "runtime.in" void arraySort(stack *Stack) { callable * f=vm::pop<callable *>(Stack); array * a=vm::pop<array *>(Stack); -#line 4820 "runtime.in" +#line 4819 "runtime.in" array *c=copyArray(a); compareFunc=f; FuncStack=Stack; @@ -6875,12 +6922,12 @@ void arraySort(stack *Stack) {Stack->push<array*>(c); return;} } -#line 4828 "runtime.in" +#line 4827 "runtime.in" // bool all(boolarray *a); -void gen456(stack *Stack) +void gen_runtime460(stack *Stack) { boolarray * a=vm::pop<boolarray *>(Stack); -#line 4829 "runtime.in" +#line 4828 "runtime.in" size_t size=checkArray(a); bool c=true; for(size_t i=0; i < size; i++) @@ -6888,12 +6935,12 @@ void gen456(stack *Stack) {Stack->push<bool>(c); return;} } -#line 4837 "runtime.in" +#line 4836 "runtime.in" // boolarray* !(boolarray* a); -void gen457(stack *Stack) +void gen_runtime461(stack *Stack) { boolarray* a=vm::pop<boolarray*>(Stack); -#line 4838 "runtime.in" +#line 4837 "runtime.in" size_t size=checkArray(a); array *c=new array(size); for(size_t i=0; i < size; i++) @@ -6901,12 +6948,12 @@ void gen457(stack *Stack) {Stack->push<boolarray*>(c); return;} } -#line 4846 "runtime.in" +#line 4845 "runtime.in" // Int sum(boolarray *a); -void gen458(stack *Stack) +void gen_runtime462(stack *Stack) { boolarray * a=vm::pop<boolarray *>(Stack); -#line 4847 "runtime.in" +#line 4846 "runtime.in" size_t size=checkArray(a); Int sum=0; for(size_t i=0; i < size; i++) @@ -6914,19 +6961,19 @@ void gen458(stack *Stack) {Stack->push<Int>(sum); return;} } -#line 4855 "runtime.in" +#line 4854 "runtime.in" void arrayCopy(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4856 "runtime.in" +#line 4855 "runtime.in" {Stack->push<array*>(copyArray(a)); return;} } -#line 4860 "runtime.in" +#line 4859 "runtime.in" void arrayConcat(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4861 "runtime.in" +#line 4860 "runtime.in" // a is an array of arrays to be concatenated together. // The signature is // T[] concat(... T[][] a); @@ -6953,27 +7000,27 @@ void arrayConcat(stack *Stack) {Stack->push<array*>(result); return;} } -#line 4888 "runtime.in" +#line 4887 "runtime.in" void array2Copy(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4889 "runtime.in" +#line 4888 "runtime.in" {Stack->push<array*>(copyArray2(a)); return;} } -#line 4893 "runtime.in" +#line 4892 "runtime.in" void array3Copy(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4894 "runtime.in" +#line 4893 "runtime.in" {Stack->push<array*>(copyArray3(a)); return;} } -#line 4898 "runtime.in" +#line 4897 "runtime.in" void array2Transpose(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4899 "runtime.in" +#line 4898 "runtime.in" size_t asize=checkArray(a); array *c=new array(0); for(size_t i=0; i < asize; i++) { @@ -7000,12 +7047,12 @@ void array2Transpose(stack *Stack) // permutation (021 or 120, etc; original is 012). // Transpose by sending respective members to the permutated locations: // return the array obtained by putting a[i][j][k] into position perm{ijk}. -#line 4926 "runtime.in" +#line 4925 "runtime.in" void array3Transpose(stack *Stack) { array * perm=vm::pop<array *>(Stack); array * a=vm::pop<array *>(Stack); -#line 4927 "runtime.in" +#line 4926 "runtime.in" const size_t DIM=3; if(checkArray(perm) != DIM) { @@ -7089,13 +7136,13 @@ void array3Transpose(stack *Stack) // In a boolean array, find the index of the nth true value or -1 if not found // If n is negative, search backwards. -#line 5011 "runtime.in" +#line 5010 "runtime.in" // Int find(boolarray *a, Int n=1); -void gen465(stack *Stack) +void gen_runtime469(stack *Stack) { Int n=vm::pop<Int>(Stack,1); boolarray * a=vm::pop<boolarray *>(Stack); -#line 5012 "runtime.in" +#line 5011 "runtime.in" size_t size=checkArray(a); Int j=-1; if(n > 0) @@ -7113,13 +7160,13 @@ void gen465(stack *Stack) // construct vector obtained by replacing those elements of b for which the // corresponding elements of a are false by the corresponding element of c. -#line 5030 "runtime.in" +#line 5029 "runtime.in" void arrayConditional(stack *Stack) { array * c=vm::pop<array *>(Stack); array * b=vm::pop<array *>(Stack); array * a=vm::pop<array *>(Stack); -#line 5031 "runtime.in" +#line 5030 "runtime.in" size_t size=checkArray(a); array *r=new array(size); if(b && c) { @@ -7143,21 +7190,21 @@ void arrayConditional(stack *Stack) } // Return an n x n identity matrix. -#line 5055 "runtime.in" +#line 5054 "runtime.in" // realarray2* identity(Int n); -void gen467(stack *Stack) +void gen_runtime471(stack *Stack) { Int n=vm::pop<Int>(Stack); -#line 5056 "runtime.in" +#line 5055 "runtime.in" {Stack->push<realarray2*>(Identity(n)); return;} } // Return the diagonal matrix with diagonal entries given by a. -#line 5061 "runtime.in" +#line 5060 "runtime.in" void diagonal(stack *Stack) { realarray * a=vm::pop<realarray *>(Stack); -#line 5062 "runtime.in" +#line 5061 "runtime.in" size_t n=checkArray(a); array *c=new array(n); for(size_t i=0; i < n; ++i) { @@ -7173,12 +7220,12 @@ void diagonal(stack *Stack) } // Return the inverse of an n x n matrix a using Gauss-Jordan elimination. -#line 5078 "runtime.in" +#line 5077 "runtime.in" // realarray2* inverse(realarray2 *a); -void gen469(stack *Stack) +void gen_runtime473(stack *Stack) { realarray2 * a=vm::pop<realarray2 *>(Stack); -#line 5079 "runtime.in" +#line 5078 "runtime.in" a=copyArray2(a); size_t n=checkArray(a); checkSquare(a); @@ -7271,14 +7318,14 @@ void gen469(stack *Stack) // Solve the linear equation ax=b by LU decomposition, returning the // solution x, where a is an n x n matrix and b is an array of length n. // If no solution exists, return an empty array. -#line 5172 "runtime.in" +#line 5171 "runtime.in" // realarray* solve(realarray2 *a, realarray *b, bool warn=true); -void gen470(stack *Stack) +void gen_runtime474(stack *Stack) { bool warn=vm::pop<bool>(Stack,true); realarray * b=vm::pop<realarray *>(Stack); realarray2 * a=vm::pop<realarray2 *>(Stack); -#line 5173 "runtime.in" +#line 5172 "runtime.in" size_t n=checkArray(a); if(n == 0) {Stack->push<realarray*>(new array(0)); return;} @@ -7328,14 +7375,14 @@ void gen470(stack *Stack) // Solve the linear equation ax=b by LU decomposition, returning the // solution x, where a is an n x n matrix and b is an n x m matrix. // If no solution exists, return an empty array. -#line 5223 "runtime.in" +#line 5222 "runtime.in" // realarray2* solve(realarray2 *a, realarray2 *b, bool warn=true); -void gen471(stack *Stack) +void gen_runtime475(stack *Stack) { bool warn=vm::pop<bool>(Stack,true); realarray2 * b=vm::pop<realarray2 *>(Stack); realarray2 * a=vm::pop<realarray2 *>(Stack); -#line 5224 "runtime.in" +#line 5223 "runtime.in" size_t n=checkArray(a); if(n == 0) {Stack->push<realarray2*>(new array(0)); return;} @@ -7396,12 +7443,12 @@ void gen471(stack *Stack) } // Compute the determinant of an n x n matrix. -#line 5285 "runtime.in" +#line 5284 "runtime.in" // real determinant(realarray2 *a); -void gen472(stack *Stack) +void gen_runtime476(stack *Stack) { realarray2 * a=vm::pop<realarray2 *>(Stack); -#line 5286 "runtime.in" +#line 5285 "runtime.in" real *A=copyArray2C(a); size_t n=checkArray(a); @@ -7415,13 +7462,13 @@ void gen472(stack *Stack) {Stack->push<real>(det); return;} } -#line 5300 "runtime.in" +#line 5299 "runtime.in" // realarray* *(realarray2 *a, realarray *b); -void gen473(stack *Stack) +void gen_runtime477(stack *Stack) { realarray * b=vm::pop<realarray *>(Stack); realarray2 * a=vm::pop<realarray2 *>(Stack); -#line 5301 "runtime.in" +#line 5300 "runtime.in" size_t n=checkArray(a); size_t m=checkArray(b); array *c=new array(n); @@ -7438,13 +7485,13 @@ void gen473(stack *Stack) {Stack->push<realarray*>(c); return;} } -#line 5318 "runtime.in" +#line 5317 "runtime.in" // realarray* *(realarray *a, realarray2 *b); -void gen474(stack *Stack) +void gen_runtime478(stack *Stack) { realarray2 * b=vm::pop<realarray2 *>(Stack); realarray * a=vm::pop<realarray *>(Stack); -#line 5319 "runtime.in" +#line 5318 "runtime.in" size_t n=checkArray(a); if(n != checkArray(b)) error(incommensurate); real *A=copyArrayC(a); @@ -7471,13 +7518,13 @@ void gen474(stack *Stack) {Stack->push<realarray*>(c); return;} } -#line 5346 "runtime.in" +#line 5345 "runtime.in" // realarray2* *(realarray2 *a, realarray2 *b); -void gen475(stack *Stack) +void gen_runtime479(stack *Stack) { realarray2 * b=vm::pop<realarray2 *>(Stack); realarray2 * a=vm::pop<realarray2 *>(Stack); -#line 5347 "runtime.in" +#line 5346 "runtime.in" size_t n=checkArray(a); size_t nb=checkArray(b); @@ -7511,23 +7558,23 @@ void gen475(stack *Stack) {Stack->push<realarray2*>(c); return;} } -#line 5381 "runtime.in" +#line 5380 "runtime.in" // triple *(realarray2 *t, triple v); -void gen476(stack *Stack) +void gen_runtime480(stack *Stack) { triple v=vm::pop<triple>(Stack); realarray2 * t=vm::pop<realarray2 *>(Stack); -#line 5382 "runtime.in" +#line 5381 "runtime.in" {Stack->push<triple>(*t*v); return;} } -#line 5386 "runtime.in" +#line 5385 "runtime.in" // pair project(triple v, realarray2 *t); -void gen477(stack *Stack) +void gen_runtime481(stack *Stack) { realarray2 * t=vm::pop<realarray2 *>(Stack); triple v=vm::pop<triple>(Stack); -#line 5387 "runtime.in" +#line 5386 "runtime.in" size_t n=checkArray(t); if(n != 4) error(incommensurate); array *t0=read<array*>(t,0); @@ -7552,13 +7599,13 @@ void gen477(stack *Stack) } // Compute the dot product of vectors a and b. -#line 5412 "runtime.in" +#line 5411 "runtime.in" // real dot(realarray *a, realarray *b); -void gen478(stack *Stack) +void gen_runtime482(stack *Stack) { realarray * b=vm::pop<realarray *>(Stack); realarray * a=vm::pop<realarray *>(Stack); -#line 5413 "runtime.in" +#line 5412 "runtime.in" size_t n=checkArrays(a,b); real sum=0.0; for(size_t i=0; i < n; ++i) @@ -7573,15 +7620,15 @@ void gen478(stack *Stack) // [ a[2] b[2] c[2] ] // [ ... ] // [ c[n-1] a[n-1] b[n-1] ] -#line 5428 "runtime.in" +#line 5427 "runtime.in" // realarray* tridiagonal(realarray *a, realarray *b, realarray *c, realarray *f); -void gen479(stack *Stack) +void gen_runtime483(stack *Stack) { realarray * f=vm::pop<realarray *>(Stack); realarray * c=vm::pop<realarray *>(Stack); realarray * b=vm::pop<realarray *>(Stack); realarray * a=vm::pop<realarray *>(Stack); -#line 5429 "runtime.in" +#line 5428 "runtime.in" size_t n=checkArrays(a,b); checkEqual(n,checkArray(c)); checkEqual(n,checkArray(f)); @@ -7678,16 +7725,16 @@ void gen479(stack *Stack) } // Root solve by Newton-Raphson -#line 5526 "runtime.in" +#line 5525 "runtime.in" // real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x, bool verbose=false); -void gen480(stack *Stack) +void gen_runtime484(stack *Stack) { bool verbose=vm::pop<bool>(Stack,false); real x=vm::pop<real>(Stack); callableReal * fprime=vm::pop<callableReal *>(Stack); callableReal * f=vm::pop<callableReal *>(Stack); Int iterations=vm::pop<Int>(Stack,100); -#line 5528 "runtime.in" +#line 5527 "runtime.in" static const real fuzz=1000.0*DBL_EPSILON; Int i=0; size_t oldPrec=0; @@ -7733,9 +7780,9 @@ void gen480(stack *Stack) // Root solve by Newton-Raphson bisection // cf. routine rtsafe (Press et al., Numerical Recipes, 1991). -#line 5574 "runtime.in" +#line 5573 "runtime.in" // real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x1, real x2, bool verbose=false); -void gen481(stack *Stack) +void gen_runtime485(stack *Stack) { bool verbose=vm::pop<bool>(Stack,false); real x2=vm::pop<real>(Stack); @@ -7743,7 +7790,7 @@ void gen481(stack *Stack) callableReal * fprime=vm::pop<callableReal *>(Stack); callableReal * f=vm::pop<callableReal *>(Stack); Int iterations=vm::pop<Int>(Stack,100); -#line 5576 "runtime.in" +#line 5575 "runtime.in" static const real fuzz=1000.0*DBL_EPSILON; size_t oldPrec=0; if(verbose) @@ -7821,16 +7868,16 @@ void gen481(stack *Stack) {Stack->push<real>((j == iterations) ? DBL_MAX : x); return;} } -#line 5654 "runtime.in" +#line 5653 "runtime.in" // real simpson(callableReal *f, real a, real b, real acc=DBL_EPSILON, real dxmax=0); -void gen482(stack *Stack) +void gen_runtime486(stack *Stack) { real dxmax=vm::pop<real>(Stack,0); real acc=vm::pop<real>(Stack,DBL_EPSILON); real b=vm::pop<real>(Stack); real a=vm::pop<real>(Stack); callableReal * f=vm::pop<callableReal *>(Stack); -#line 5656 "runtime.in" +#line 5655 "runtime.in" real integral; if(dxmax == 0) dxmax=b-a; Func=f; @@ -7841,12 +7888,12 @@ void gen482(stack *Stack) } // Compute the fast Fourier transform of a pair array -#line 5667 "runtime.in" +#line 5666 "runtime.in" void pairArrayFFT(stack *Stack) { Int sign=vm::pop<Int>(Stack,1); pairarray * a=vm::pop<pairarray *>(Stack); -#line 5668 "runtime.in" +#line 5667 "runtime.in" unsigned n=(unsigned) checkArray(a); #ifdef HAVE_LIBFFTW3 array *c=new array(n); @@ -7874,12 +7921,12 @@ void pairArrayFFT(stack *Stack) {Stack->push<pairarray*>(c); return;} } -#line 5696 "runtime.in" +#line 5695 "runtime.in" // Intarray2* triangulate(pairarray *z); -void gen484(stack *Stack) +void gen_runtime488(stack *Stack) { pairarray * z=vm::pop<pairarray *>(Stack); -#line 5697 "runtime.in" +#line 5696 "runtime.in" size_t nv=checkArray(z); // Call robust version of Gilles Dumoulin's port of Paul Bourke's // triangulation code. @@ -7915,55 +7962,55 @@ void gen484(stack *Stack) // File operations -#line 5733 "runtime.in" +#line 5732 "runtime.in" // bool ==(file *a, file *b); -void gen485(stack *Stack) +void gen_runtime489(stack *Stack) { file * b=vm::pop<file *>(Stack); file * a=vm::pop<file *>(Stack); -#line 5734 "runtime.in" +#line 5733 "runtime.in" {Stack->push<bool>(a == b); return;} } -#line 5739 "runtime.in" +#line 5738 "runtime.in" // bool !=(file *a, file *b); -void gen486(stack *Stack) +void gen_runtime490(stack *Stack) { file * b=vm::pop<file *>(Stack); file * a=vm::pop<file *>(Stack); -#line 5740 "runtime.in" +#line 5739 "runtime.in" {Stack->push<bool>(a != b); return;} } -#line 5744 "runtime.in" +#line 5743 "runtime.in" void nullFile(stack *Stack) { -#line 5745 "runtime.in" +#line 5744 "runtime.in" {Stack->push<file*>(&camp::nullfile); return;} } -#line 5749 "runtime.in" +#line 5748 "runtime.in" // file* input(string name, bool check=true, string comment=commentchar); -void gen488(stack *Stack) +void gen_runtime492(stack *Stack) { string comment=vm::pop<string>(Stack,commentchar); bool check=vm::pop<bool>(Stack,true); string name=vm::pop<string>(Stack); -#line 5750 "runtime.in" +#line 5749 "runtime.in" char c=comment.empty() ? (char) 0 : comment[0]; file *f=new ifile(name,c,check); f->open(); {Stack->push<file*>(f); return;} } -#line 5757 "runtime.in" +#line 5756 "runtime.in" // file* output(string name, bool update=false, string comment=commentchar); -void gen489(stack *Stack) +void gen_runtime493(stack *Stack) { string comment=vm::pop<string>(Stack,commentchar); bool update=vm::pop<bool>(Stack,false); string name=vm::pop<string>(Stack); -#line 5758 "runtime.in" +#line 5757 "runtime.in" file *f; if(update) { char c=comment.empty() ? (char) 0 : comment[0]; @@ -7974,13 +8021,13 @@ void gen489(stack *Stack) {Stack->push<file*>(f); return;} } -#line 5769 "runtime.in" +#line 5768 "runtime.in" // file* xinput(string name, bool check=true); -void gen490(stack *Stack) +void gen_runtime494(stack *Stack) { bool check=vm::pop<bool>(Stack,true); string name=vm::pop<string>(Stack); -#line 5770 "runtime.in" +#line 5769 "runtime.in" #ifdef HAVE_RPC_RPC_H file *f=new ixfile(name,check); f->open(); @@ -7993,13 +8040,13 @@ void gen490(stack *Stack) #endif } -#line 5783 "runtime.in" +#line 5782 "runtime.in" // file* xoutput(string name, bool update=false); -void gen491(stack *Stack) +void gen_runtime495(stack *Stack) { bool update=vm::pop<bool>(Stack,false); string name=vm::pop<string>(Stack); -#line 5784 "runtime.in" +#line 5783 "runtime.in" #ifdef HAVE_RPC_RPC_H file *f; if(update) @@ -8016,25 +8063,25 @@ void gen491(stack *Stack) #endif } -#line 5801 "runtime.in" +#line 5800 "runtime.in" // file* binput(string name, bool check=true); -void gen492(stack *Stack) +void gen_runtime496(stack *Stack) { bool check=vm::pop<bool>(Stack,true); string name=vm::pop<string>(Stack); -#line 5802 "runtime.in" +#line 5801 "runtime.in" file *f=new ibfile(name,check); f->open(); {Stack->push<file*>(f); return;} } -#line 5808 "runtime.in" +#line 5807 "runtime.in" // file* boutput(string name, bool update=false); -void gen493(stack *Stack) +void gen_runtime497(stack *Stack) { bool update=vm::pop<bool>(Stack,false); string name=vm::pop<string>(Stack); -#line 5809 "runtime.in" +#line 5808 "runtime.in" file *f; if(update) f=new iobfile(name); else f=new obfile(name); @@ -8043,77 +8090,77 @@ void gen493(stack *Stack) {Stack->push<file*>(f); return;} } -#line 5818 "runtime.in" +#line 5817 "runtime.in" // bool eof(file *f); -void gen494(stack *Stack) +void gen_runtime498(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5819 "runtime.in" +#line 5818 "runtime.in" {Stack->push<bool>(f->eof()); return;} } -#line 5823 "runtime.in" +#line 5822 "runtime.in" // bool eol(file *f); -void gen495(stack *Stack) +void gen_runtime499(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5824 "runtime.in" +#line 5823 "runtime.in" {Stack->push<bool>(f->eol()); return;} } -#line 5828 "runtime.in" +#line 5827 "runtime.in" // bool error(file *f); -void gen496(stack *Stack) +void gen_runtime500(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5829 "runtime.in" +#line 5828 "runtime.in" {Stack->push<bool>(f->error()); return;} } -#line 5833 "runtime.in" +#line 5832 "runtime.in" // void clear(file *f); -void gen497(stack *Stack) +void gen_runtime501(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5834 "runtime.in" +#line 5833 "runtime.in" f->clear(); } -#line 5838 "runtime.in" +#line 5837 "runtime.in" // void close(file *f); -void gen498(stack *Stack) +void gen_runtime502(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5839 "runtime.in" +#line 5838 "runtime.in" f->close(); } -#line 5843 "runtime.in" +#line 5842 "runtime.in" // Int precision(file *f=NULL, Int digits=0); -void gen499(stack *Stack) +void gen_runtime503(stack *Stack) { Int digits=vm::pop<Int>(Stack,0); file * f=vm::pop<file *>(Stack,NULL); -#line 5844 "runtime.in" +#line 5843 "runtime.in" if(f == 0) f=&camp::Stdout; {Stack->push<Int>(f->precision(digits)); return;} } -#line 5849 "runtime.in" +#line 5848 "runtime.in" // void flush(file *f); -void gen500(stack *Stack) +void gen_runtime504(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5850 "runtime.in" +#line 5849 "runtime.in" f->flush(); } -#line 5854 "runtime.in" +#line 5853 "runtime.in" // string getc(file *f); -void gen501(stack *Stack) +void gen_runtime505(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5855 "runtime.in" +#line 5854 "runtime.in" char c=0; if(f->isOpen()) f->read(c); static char str[1]; @@ -8121,236 +8168,288 @@ void gen501(stack *Stack) {Stack->push<string>(string(str)); return;} } -#line 5863 "runtime.in" +#line 5862 "runtime.in" // Int tell(file *f); -void gen502(stack *Stack) +void gen_runtime506(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5864 "runtime.in" +#line 5863 "runtime.in" {Stack->push<Int>(f->tell()); return;} } -#line 5868 "runtime.in" +#line 5867 "runtime.in" // void seek(file *f, Int pos); -void gen503(stack *Stack) +void gen_runtime507(stack *Stack) { Int pos=vm::pop<Int>(Stack); file * f=vm::pop<file *>(Stack); -#line 5869 "runtime.in" +#line 5868 "runtime.in" f->seek(pos,pos >= 0); } -#line 5873 "runtime.in" +#line 5872 "runtime.in" // void seekeof(file *f); -void gen504(stack *Stack) +void gen_runtime508(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5874 "runtime.in" +#line 5873 "runtime.in" f->seek(0,false); } -// Set file dimensions -#line 5879 "runtime.in" -// file* dimension(file *f, Int nx); -void gen505(stack *Stack) +#line 5877 "runtime.in" +void namePart(stack *Stack) { - Int nx=vm::pop<Int>(Stack); - file * f=vm::pop<file *>(Stack); -#line 5880 "runtime.in" - f->dimension(nx); - {Stack->push<file*>(f); return;} + file f=vm::pop<file>(Stack); +#line 5878 "runtime.in" + {Stack->push<string>(f.filename()); return;} } -#line 5885 "runtime.in" -// file* dimension(file *f, Int nx, Int ny); -void gen506(stack *Stack) +#line 5882 "runtime.in" +void modePart(stack *Stack) { - Int ny=vm::pop<Int>(Stack); - Int nx=vm::pop<Int>(Stack); - file * f=vm::pop<file *>(Stack); -#line 5886 "runtime.in" - f->dimension(nx,ny); - {Stack->push<file*>(f); return;} + file f=vm::pop<file>(Stack); +#line 5883 "runtime.in" + {Stack->push<string>(f.FileMode()); return;} } -#line 5891 "runtime.in" -// file* dimension(file *f, Int nx, Int ny, Int nz); -void gen507(stack *Stack) +// Set file dimensions +#line 5888 "runtime.in" +void dimensionSetHelper(stack *Stack) { - Int nz=vm::pop<Int>(Stack); - Int ny=vm::pop<Int>(Stack); - Int nx=vm::pop<Int>(Stack); file * f=vm::pop<file *>(Stack); -#line 5892 "runtime.in" + Int nz=vm::pop<Int>(Stack,-1); + Int ny=vm::pop<Int>(Stack,-1); + Int nx=vm::pop<Int>(Stack,-1); +#line 5889 "runtime.in" f->dimension(nx,ny,nz); {Stack->push<file*>(f); return;} } -// Set file to read comma-separated values -#line 5898 "runtime.in" -// file* csv(file *f, bool b=true); -void gen508(stack *Stack) +#line 5894 "runtime.in" +void dimensionSet(stack *Stack) { - bool b=vm::pop<bool>(Stack,true); file * f=vm::pop<file *>(Stack); -#line 5899 "runtime.in" - f->CSVMode(b); - {Stack->push<file*>(f); return;} +#line 5895 "runtime.in" + {Stack->push<callable*>(new thunk(new bfunc(dimensionSetHelper),f)); return;} } -// Set file to read whitespace-separated values -#line 5905 "runtime.in" -// file* word(file *f, bool b=true); -void gen509(stack *Stack) +#line 5899 "runtime.in" +void dimensionPart(stack *Stack) { - bool b=vm::pop<bool>(Stack,true); - file * f=vm::pop<file *>(Stack); -#line 5906 "runtime.in" - f->WordMode(b); - {Stack->push<file*>(f); return;} + file f=vm::pop<file>(Stack); +#line 5900 "runtime.in" + array *a=new array(3); + (*a)[0]=f.Nx(); + (*a)[1]=f.Ny(); + (*a)[2]=f.Nz(); + {Stack->push<array*>(a); return;} } -// Set file to read arrays in line-at-a-time mode -#line 5912 "runtime.in" -// file* line(file *f, bool b=true); -void gen510(stack *Stack) +// Set file f to read arrays in line-at-a-time mode +#line 5909 "runtime.in" +void lineSetHelper(stack *Stack) { - bool b=vm::pop<bool>(Stack,true); file * f=vm::pop<file *>(Stack); -#line 5913 "runtime.in" + bool b=vm::pop<bool>(Stack,true); +#line 5910 "runtime.in" f->LineMode(b); {Stack->push<file*>(f); return;} } -// Set file to read/write signed int XDR values. -#line 5919 "runtime.in" -// file* signed(file *f, bool b=true); -void gen511(stack *Stack) +#line 5915 "runtime.in" +void lineSet(stack *Stack) { - bool b=vm::pop<bool>(Stack,true); file * f=vm::pop<file *>(Stack); -#line 5920 "runtime.in" - f->SignedInt(b); - {Stack->push<file*>(f); return;} +#line 5916 "runtime.in" + {Stack->push<callable*>(new thunk(new bfunc(lineSetHelper),f)); return;} } -#line 5925 "runtime.in" -void namePart(stack *Stack) +#line 5920 "runtime.in" +void linePart(stack *Stack) { file f=vm::pop<file>(Stack); +#line 5921 "runtime.in" + {Stack->push<bool>(f.LineMode()); return;} +} + +// Set file to read comma-separated values #line 5926 "runtime.in" - {Stack->push<string>(f.filename()); return;} +void csvSetHelper(stack *Stack) +{ + file * f=vm::pop<file *>(Stack); + bool b=vm::pop<bool>(Stack,true); +#line 5927 "runtime.in" + f->CSVMode(b); + {Stack->push<file*>(f); return;} } -#line 5930 "runtime.in" -void modePart(stack *Stack) +#line 5932 "runtime.in" +void csvSet(stack *Stack) { - file f=vm::pop<file>(Stack); -#line 5931 "runtime.in" - {Stack->push<string>(f.FileMode()); return;} + file * f=vm::pop<file *>(Stack); +#line 5933 "runtime.in" + {Stack->push<callable*>(new thunk(new bfunc(csvSetHelper),f)); return;} } -#line 5935 "runtime.in" -void dimensionPart(stack *Stack) +#line 5937 "runtime.in" +void csvPart(stack *Stack) { file f=vm::pop<file>(Stack); -#line 5936 "runtime.in" - array *a=new array(3); - (*a)[0]=f.Nx(); - (*a)[1]=f.Ny(); - (*a)[2]=f.Nz(); - {Stack->push<array*>(a); return;} +#line 5938 "runtime.in" + {Stack->push<bool>(f.CSVMode()); return;} } -#line 5944 "runtime.in" -void lineModePart(stack *Stack) +// Set file to read whitespace-separated values +#line 5943 "runtime.in" +void wordSetHelper(stack *Stack) { - file f=vm::pop<file>(Stack); -#line 5945 "runtime.in" - {Stack->push<bool>(f.LineMode()); return;} + file * f=vm::pop<file *>(Stack); + bool b=vm::pop<bool>(Stack,true); +#line 5944 "runtime.in" + f->WordMode(b); + {Stack->push<file*>(f); return;} } #line 5949 "runtime.in" -void csvModePart(stack *Stack) +void wordSet(stack *Stack) { - file f=vm::pop<file>(Stack); + file * f=vm::pop<file *>(Stack); #line 5950 "runtime.in" - {Stack->push<bool>(f.CSVMode()); return;} + {Stack->push<callable*>(new thunk(new bfunc(wordSetHelper),f)); return;} } #line 5954 "runtime.in" -void wordModePart(stack *Stack) +void wordPart(stack *Stack) { file f=vm::pop<file>(Stack); #line 5955 "runtime.in" {Stack->push<bool>(f.WordMode()); return;} } -#line 5959 "runtime.in" -void singleRealModePart(stack *Stack) +// Set file to read/write single precision real XDR values. +#line 5960 "runtime.in" +void singlerealSetHelper(stack *Stack) +{ + file * f=vm::pop<file *>(Stack); + bool b=vm::pop<bool>(Stack,true); +#line 5961 "runtime.in" + f->SingleReal(b); + {Stack->push<file*>(f); return;} +} + +#line 5966 "runtime.in" +void singlerealSet(stack *Stack) +{ + file * f=vm::pop<file *>(Stack); +#line 5967 "runtime.in" + {Stack->push<callable*>(new thunk(new bfunc(singlerealSetHelper),f)); return;} +} + +#line 5971 "runtime.in" +void singlerealPart(stack *Stack) { file f=vm::pop<file>(Stack); -#line 5960 "runtime.in" +#line 5972 "runtime.in" {Stack->push<bool>(f.SingleReal()); return;} } -#line 5964 "runtime.in" -void singleIntModePart(stack *Stack) +// Set file to read/write single precision int XDR values. +#line 5977 "runtime.in" +void singleintSetHelper(stack *Stack) { - file f=vm::pop<file>(Stack); -#line 5965 "runtime.in" - {Stack->push<bool>(f.SingleInt()); return;} + file * f=vm::pop<file *>(Stack); + bool b=vm::pop<bool>(Stack,true); +#line 5978 "runtime.in" + f->SingleInt(b); + {Stack->push<file*>(f); return;} +} + +#line 5983 "runtime.in" +void singleintSet(stack *Stack) +{ + file * f=vm::pop<file *>(Stack); +#line 5984 "runtime.in" + {Stack->push<callable*>(new thunk(new bfunc(singleintSetHelper),f)); return;} } -#line 5969 "runtime.in" -void signedIntModePart(stack *Stack) +#line 5988 "runtime.in" +void singleintPart(stack *Stack) { file f=vm::pop<file>(Stack); -#line 5970 "runtime.in" - {Stack->push<bool>(f.SignedInt()); return;} +#line 5989 "runtime.in" + {Stack->push<bool>(f.SingleInt()); return;} } -// Set file to read an array1 (1 int size followed by a 1d array) -#line 5975 "runtime.in" -// file* read1(file *f); -void gen521(stack *Stack) +// Set file to read/write signed int XDR values. +#line 5994 "runtime.in" +void signedintSetHelper(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5976 "runtime.in" - f->dimension(-2); + bool b=vm::pop<bool>(Stack,true); +#line 5995 "runtime.in" + f->SignedInt(b); {Stack->push<file*>(f); return;} } -// Set file to read an array2 (2 int sizes followed by a 2d array) -#line 5982 "runtime.in" -// file* read2(file *f); -void gen522(stack *Stack) +#line 6000 "runtime.in" +void signedintSet(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5983 "runtime.in" - f->dimension(-2,-2); - {Stack->push<file*>(f); return;} +#line 6001 "runtime.in" + {Stack->push<callable*>(new thunk(new bfunc(signedintSetHelper),f)); return;} } -// Set file to read an array3 (3 int sizes followed by a 3d array) -#line 5989 "runtime.in" -// file* read3(file *f); -void gen523(stack *Stack) +#line 6005 "runtime.in" +void signedintPart(stack *Stack) +{ + file f=vm::pop<file>(Stack); +#line 6006 "runtime.in" + {Stack->push<bool>(f.SignedInt()); return;} +} + +// Set file to read an arrayi (i int sizes followed by an i-dimensional array) +#line 6011 "runtime.in" +void readSetHelper(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5990 "runtime.in" - f->dimension(-2,-2,-2); + Int i=vm::pop<Int>(Stack); +#line 6012 "runtime.in" + switch(i) { + case 1: + f->dimension(-2); + break; + + case 2: + f->dimension(-2,-2); + break; + + case 3: + f->dimension(-2,-2,-2); + break; + + default: + f->dimension(); + } + {Stack->push<file*>(f); return;} } +#line 6033 "runtime.in" +void readSet(stack *Stack) +{ + file * f=vm::pop<file *>(Stack); +#line 6034 "runtime.in" + {Stack->push<callable*>(new thunk(new bfunc(readSetHelper),f)); return;} +} + // Return the last n lines of the history named name. -#line 5996 "runtime.in" +#line 6039 "runtime.in" // stringarray* history(string name, Int n=1); -void gen524(stack *Stack) +void gen_runtime534(stack *Stack) { Int n=vm::pop<Int>(Stack,1); string name=vm::pop<string>(Stack); -#line 5997 "runtime.in" +#line 6040 "runtime.in" #if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES) bool newhistory=historyMap.find(name) == historyMap.end(); @@ -8382,12 +8481,12 @@ void gen524(stack *Stack) } // Return the last n lines of the interactive history. -#line 6029 "runtime.in" +#line 6072 "runtime.in" // stringarray* history(Int n=0); -void gen525(stack *Stack) +void gen_runtime535(stack *Stack) { Int n=vm::pop<Int>(Stack,0); -#line 6030 "runtime.in" +#line 6073 "runtime.in" #if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES) {Stack->push<stringarray*>(get_history(n)); return;} #else @@ -8398,15 +8497,15 @@ void gen525(stack *Stack) // Prompt for a string using prompt, the GNU readline library, and a // local history named name. -#line 6041 "runtime.in" +#line 6084 "runtime.in" // string readline(string prompt=emptystring, string name=emptystring, bool tabcompletion=false); -void gen526(stack *Stack) +void gen_runtime536(stack *Stack) { bool tabcompletion=vm::pop<bool>(Stack,false); string name=vm::pop<string>(Stack,emptystring); string prompt=vm::pop<string>(Stack,emptystring); -#line 6043 "runtime.in" - if(!isatty(STDIN_FILENO)) +#line 6086 "runtime.in" + if(!(isatty(STDIN_FILENO) || getSetting<bool>("interactive"))) {Stack->push<string>(emptystring); return;} #if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES) init_readline(tabcompletion); @@ -8447,14 +8546,14 @@ void gen526(stack *Stack) // Save a string in a local history named name. // If store=true, store the local history in the file historyfilename(name). -#line 6085 "runtime.in" +#line 6128 "runtime.in" // void saveline(string name, string value, bool store=true); -void gen527(stack *Stack) +void gen_runtime537(stack *Stack) { bool store=vm::pop<bool>(Stack,true); string value=vm::pop<string>(Stack); string name=vm::pop<string>(Stack); -#line 6086 "runtime.in" +#line 6129 "runtime.in" #if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES) store_history(&history_save); bool newhistory=historyMap.find(name) == historyMap.end(); @@ -8481,912 +8580,1088 @@ void gen527(stack *Stack) #endif } -#line 6113 "runtime.in" -// void generate_random_backtrace(); -void gen528(stack *) -{ -#line 6114 "runtime.in" -#if defined(USEGC) && defined(GC_DEBUG) && defined(GC_BACKTRACE) - GC_generate_random_backtrace(); -#else - error("generate_random_backtrace() requires ./configure --enable-gc-debug"); -#endif -} - -#line 6122 "runtime.in" -// void print_random_addresses(Int n=1); -void gen529(stack *Stack) -{ - Int n=vm::pop<Int>(Stack,1); -#line 6123 "runtime.in" -#if defined(USEGC) && defined(GC_DEBUG) && defined(GC_BACKTRACE) - GC_gcollect(); - for (Int i=0; i < n; ++i) - GC_debug_print_heap_obj_proc(GC_base(GC_generate_random_valid_address())); -#else - error("print_random_addresses() requires ./configure --enable-gc-debug"); - unused(&n); // Avoid unused variable warning message. -#endif -} - } // namespace run namespace trans { -void gen_base_venv(venv &ve) -{ -#line 1179 "runtime.in" - addFunc(ve, run::gen8, primBoolean(), "!", formal(primBoolean(), "b", false, false)); -#line 1207 "runtime.in" - addFunc(ve, run::gen13, primInt(), "AND", formal(primInt(), "a", false, false), formal(primInt(), "b", false, false)); -#line 1215 "runtime.in" - addFunc(ve, run::gen14, primInt(), "OR", formal(primInt(), "a", false, false), formal(primInt(), "b", false, false)); -#line 1220 "runtime.in" - addFunc(ve, run::gen15, primInt(), "XOR", formal(primInt(), "a", false, false), formal(primInt(), "b", false, false)); -#line 1225 "runtime.in" - addFunc(ve, run::gen16, primInt(), "NOT", formal(primInt(), "a", false, false)); -#line 1256 "runtime.in" - addFunc(ve, run::gen21, primBoolean(), "empty", formal(primPicture(), "f", false, false)); -#line 1261 "runtime.in" - addFunc(ve, run::gen22, primVoid(), "erase", formal(primPicture(), "f", false, false)); -#line 1266 "runtime.in" - addFunc(ve, run::gen23, primPair(), "min", formal(primPicture(), "f", false, false)); -#line 1271 "runtime.in" - addFunc(ve, run::gen24, primPair(), "max", formal(primPicture(), "f", false, false)); -#line 1276 "runtime.in" - addFunc(ve, run::gen25, primVoid(), "label", formal(primPicture(), "f", false, false), formal(primString(), "s", false, false), formal(primString(), "size", false, false), formal(primTransform(), "t", false, false), formal(primPair(), "position", false, false), formal(primPair(), "align", false, false), formal(primPen(), "p", false, false)); -#line 1282 "runtime.in" - addFunc(ve, run::gen26, primBoolean(), "labels", formal(primPicture(), "f", false, false)); -#line 1287 "runtime.in" - addFunc(ve, run::gen27, realArray(), "texsize", formal(primString(), "s", false, false), formal(primPen(), "p", true, false)); -#line 1307 "runtime.in" - addFunc(ve, run::gen28, pathArray() , "_texpath", formal(primString(), "s", false, false), formal(primPen(), "p", true, false)); -#line 1405 "runtime.in" - addFunc(ve, run::gen29, pathArray() , "textpath", formal(primString(), "s", false, false), formal(primPen(), "p", true, false)); -#line 1476 "runtime.in" - addFunc(ve, run::gen30, pathArray() , "_strokepath", formal(primPath(), "g", false, false), formal(primPen(), "p", true, false)); +void gen_runtime_venv(venv &ve) +{ +#line 1097 "runtime.in" + REGISTER_BLTIN(run::IntZero,"IntZero"); +#line 1105 "runtime.in" + REGISTER_BLTIN(run::realZero,"realZero"); +#line 1110 "runtime.in" + REGISTER_BLTIN(run::boolFalse,"boolFalse"); +#line 1115 "runtime.in" + REGISTER_BLTIN(run::pushNullArray,"pushNullArray"); +#line 1120 "runtime.in" + REGISTER_BLTIN(run::pushNullRecord,"pushNullRecord"); +#line 1125 "runtime.in" + REGISTER_BLTIN(run::pushNullFunction,"pushNullFunction"); +#line 1130 "runtime.in" + REGISTER_BLTIN(run::pushDefault,"pushDefault"); +#line 1140 "runtime.in" + REGISTER_BLTIN(run::isDefault,"isDefault"); +#line 1147 "runtime.in" + addFunc(ve, run::gen_runtime8, primBoolean(), "!", formal(primBoolean(), "b", false, false)); +#line 1155 "runtime.in" + REGISTER_BLTIN(run::boolMemEq,"boolMemEq"); +#line 1160 "runtime.in" + REGISTER_BLTIN(run::boolMemNeq,"boolMemNeq"); +#line 1165 "runtime.in" + REGISTER_BLTIN(run::boolFuncEq,"boolFuncEq"); +#line 1170 "runtime.in" + REGISTER_BLTIN(run::boolFuncNeq,"boolFuncNeq"); +#line 1175 "runtime.in" + addFunc(ve, run::gen_runtime13, primInt(), "AND", formal(primInt(), "a", false, false), formal(primInt(), "b", false, false)); +#line 1183 "runtime.in" + addFunc(ve, run::gen_runtime14, primInt(), "OR", formal(primInt(), "a", false, false), formal(primInt(), "b", false, false)); +#line 1188 "runtime.in" + addFunc(ve, run::gen_runtime15, primInt(), "XOR", formal(primInt(), "a", false, false), formal(primInt(), "b", false, false)); +#line 1193 "runtime.in" + addFunc(ve, run::gen_runtime16, primInt(), "NOT", formal(primInt(), "a", false, false)); +#line 1198 "runtime.in" + REGISTER_BLTIN(run::pairToGuide,"pairToGuide"); +#line 1206 "runtime.in" + REGISTER_BLTIN(run::pathToGuide,"pathToGuide"); +#line 1211 "runtime.in" + REGISTER_BLTIN(run::guideToPath,"guideToPath"); +#line 1216 "runtime.in" + REGISTER_BLTIN(run::newPicture,"newPicture"); +#line 1224 "runtime.in" + addFunc(ve, run::gen_runtime21, primBoolean(), "empty", formal(primPicture(), "f", false, false)); +#line 1229 "runtime.in" + addFunc(ve, run::gen_runtime22, primVoid(), "erase", formal(primPicture(), "f", false, false)); +#line 1234 "runtime.in" + addFunc(ve, run::gen_runtime23, primPair(), "min", formal(primPicture(), "f", false, false)); +#line 1239 "runtime.in" + addFunc(ve, run::gen_runtime24, primPair(), "max", formal(primPicture(), "f", false, false)); +#line 1244 "runtime.in" + addFunc(ve, run::gen_runtime25, primVoid(), "label", formal(primPicture(), "f", false, false), formal(primString(), "s", false, false), formal(primString(), "size", false, false), formal(primTransform(), "t", false, false), formal(primPair(), "position", false, false), formal(primPair(), "align", false, false), formal(primPen(), "p", false, false)); +#line 1250 "runtime.in" + addFunc(ve, run::gen_runtime26, primBoolean(), "labels", formal(primPicture(), "f", false, false)); +#line 1255 "runtime.in" + addFunc(ve, run::gen_runtime27, realArray(), "texsize", formal(primString(), "s", false, false), formal(primPen(), "p", true, false)); +#line 1275 "runtime.in" + addFunc(ve, run::gen_runtime28, pathArray() , "_texpath", formal(primString(), "s", false, false), formal(primPen(), "p", true, false)); +#line 1373 "runtime.in" + addFunc(ve, run::gen_runtime29, pathArray() , "textpath", formal(primString(), "s", false, false), formal(primPen(), "p", true, false)); +#line 1444 "runtime.in" + addFunc(ve, run::gen_runtime30, pathArray() , "_strokepath", formal(primPath(), "g", false, false), formal(primPen(), "p", true, false)); +#line 1469 "runtime.in" + addFunc(ve, run::gen_runtime31, primVoid(), "_draw", formal(primPicture(), "f", false, false), formal(primPath(), "g", false, false), formal(primPen(), "p", false, false)); +#line 1474 "runtime.in" + addFunc(ve, run::gen_runtime32, primVoid(), "fill", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primPen(), "p", true, false), formal(primBoolean(), "copy", true, false)); +#line 1480 "runtime.in" + addFunc(ve, run::gen_runtime33, primVoid(), "latticeshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(penArray2() , "p", false, false), formal(primBoolean(), "copy", true, false)); +#line 1487 "runtime.in" + addFunc(ve, run::gen_runtime34, primVoid(), "axialshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "pena", false, false), formal(primPair(), "a", false, false), formal(primPen(), "penb", false, false), formal(primPair(), "b", false, false), formal(primBoolean(), "copy", true, false)); +#line 1494 "runtime.in" + addFunc(ve, run::gen_runtime35, primVoid(), "radialshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "pena", false, false), formal(primPair(), "a", false, false), formal(primReal(), "ra", false, false), formal(primPen(), "penb", false, false), formal(primPair(), "b", false, false), formal(primReal(), "rb", false, false), formal(primBoolean(), "copy", true, false)); #line 1501 "runtime.in" - addFunc(ve, run::gen31, primVoid(), "_draw", formal(primPicture(), "f", false, false), formal(primPath(), "g", false, false), formal(primPen(), "p", false, false)); -#line 1506 "runtime.in" - addFunc(ve, run::gen32, primVoid(), "fill", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primPen(), "p", true, false), formal(primBoolean(), "copy", true, false)); + addFunc(ve, run::gen_runtime36, primVoid(), "gouraudshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(penArray() , "p", false, false), formal(pairArray(), "z", false, false), formal(IntArray(), "edges", false, false), formal(primBoolean(), "copy", true, false)); #line 1512 "runtime.in" - addFunc(ve, run::gen33, primVoid(), "latticeshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(penArray2() , "p", false, false), formal(primBoolean(), "copy", true, false)); -#line 1519 "runtime.in" - addFunc(ve, run::gen34, primVoid(), "axialshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "pena", false, false), formal(primPair(), "a", false, false), formal(primPen(), "penb", false, false), formal(primPair(), "b", false, false), formal(primBoolean(), "copy", true, false)); -#line 1526 "runtime.in" - addFunc(ve, run::gen35, primVoid(), "radialshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "pena", false, false), formal(primPair(), "a", false, false), formal(primReal(), "ra", false, false), formal(primPen(), "penb", false, false), formal(primPair(), "b", false, false), formal(primReal(), "rb", false, false), formal(primBoolean(), "copy", true, false)); -#line 1533 "runtime.in" - addFunc(ve, run::gen36, primVoid(), "gouraudshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(penArray() , "p", false, false), formal(pairArray(), "z", false, false), formal(IntArray(), "edges", false, false), formal(primBoolean(), "copy", true, false)); -#line 1544 "runtime.in" - addFunc(ve, run::gen37, primVoid(), "gouraudshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(penArray() , "p", false, false), formal(IntArray(), "edges", false, false), formal(primBoolean(), "copy", true, false)); -#line 1568 "runtime.in" - addFunc(ve, run::gen38, primVoid(), "tensorshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(penArray2() , "p", false, false), formal(pathArray() , "b", true, false), formal(pairArray2(), "z", true, false), formal(primBoolean(), "copy", true, false)); -#line 1583 "runtime.in" - addFunc(ve, run::gen39, primVoid(), "functionshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(primString() , "shader", true, false), formal(primBoolean(), "copy", true, false)); + addFunc(ve, run::gen_runtime37, primVoid(), "gouraudshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(penArray() , "p", false, false), formal(IntArray(), "edges", false, false), formal(primBoolean(), "copy", true, false)); +#line 1536 "runtime.in" + addFunc(ve, run::gen_runtime38, primVoid(), "tensorshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(penArray2() , "p", false, false), formal(pathArray() , "b", true, false), formal(pairArray2(), "z", true, false), formal(primBoolean(), "copy", true, false)); +#line 1551 "runtime.in" + addFunc(ve, run::gen_runtime39, primVoid(), "functionshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(primString() , "shader", true, false), formal(primBoolean(), "copy", true, false)); +#line 1559 "runtime.in" + addFunc(ve, run::gen_runtime40, primVoid(), "clip", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(primBoolean(), "copy", true, false)); +#line 1569 "runtime.in" + addFunc(ve, run::gen_runtime41, primVoid(), "beginclip", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(primBoolean(), "copy", true, false)); +#line 1576 "runtime.in" + addFunc(ve, run::gen_runtime42, primVoid(), "endclip", formal(primPicture(), "f", false, false)); +#line 1581 "runtime.in" + addFunc(ve, run::gen_runtime43, primVoid(), "gsave", formal(primPicture(), "f", false, false)); +#line 1586 "runtime.in" + addFunc(ve, run::gen_runtime44, primVoid(), "grestore", formal(primPicture(), "f", false, false)); #line 1591 "runtime.in" - addFunc(ve, run::gen40, primVoid(), "clip", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(primBoolean(), "copy", true, false)); + addFunc(ve, run::gen_runtime45, primVoid(), "begingroup", formal(primPicture(), "f", false, false)); +#line 1596 "runtime.in" + addFunc(ve, run::gen_runtime46, primVoid(), "endgroup", formal(primPicture(), "f", false, false)); #line 1601 "runtime.in" - addFunc(ve, run::gen41, primVoid(), "beginclip", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(primBoolean(), "copy", true, false)); -#line 1608 "runtime.in" - addFunc(ve, run::gen42, primVoid(), "endclip", formal(primPicture(), "f", false, false)); -#line 1613 "runtime.in" - addFunc(ve, run::gen43, primVoid(), "gsave", formal(primPicture(), "f", false, false)); -#line 1618 "runtime.in" - addFunc(ve, run::gen44, primVoid(), "grestore", formal(primPicture(), "f", false, false)); -#line 1623 "runtime.in" - addFunc(ve, run::gen45, primVoid(), "begingroup", formal(primPicture(), "f", false, false)); -#line 1628 "runtime.in" - addFunc(ve, run::gen46, primVoid(), "endgroup", formal(primPicture(), "f", false, false)); -#line 1633 "runtime.in" - addFunc(ve, run::gen47, primVoid(), "add", formal(primPicture(), "dest", false, false), formal(primPicture(), "src", false, false)); -#line 1638 "runtime.in" - addFunc(ve, run::gen48, primVoid(), "prepend", formal(primPicture(), "dest", false, false), formal(primPicture(), "src", false, false)); -#line 1643 "runtime.in" - addFunc(ve, run::gen49, primVoid(), "postscript", formal(primPicture(), "f", false, false), formal(primString() , "s", false, false)); -#line 1648 "runtime.in" - addFunc(ve, run::gen50, primVoid(), "tex", formal(primPicture(), "f", false, false), formal(primString() , "s", false, false)); -#line 1653 "runtime.in" - addFunc(ve, run::gen51, primVoid(), "postscript", formal(primPicture(), "f", false, false), formal(primString() , "s", false, false), formal(primPair(), "min", false, false), formal(primPair(), "max", false, false)); -#line 1658 "runtime.in" - addFunc(ve, run::gen52, primVoid(), "tex", formal(primPicture(), "f", false, false), formal(primString() , "s", false, false), formal(primPair(), "min", false, false), formal(primPair(), "max", false, false)); -#line 1663 "runtime.in" - addFunc(ve, run::gen53, primVoid(), "texpreamble", formal(primString() , "s", false, false)); -#line 1671 "runtime.in" - addFunc(ve, run::gen54, primVoid(), "deletepreamble"); -#line 1678 "runtime.in" - addFunc(ve, run::gen55, primVoid(), "_labelpath", formal(primPicture(), "f", false, false), formal(primString() , "s", false, false), formal(primString() , "size", false, false), formal(primPath(), "g", false, false), formal(primString() , "justify", false, false), formal(primPair(), "offset", false, false), formal(primPen(), "p", false, false)); -#line 1684 "runtime.in" - addFunc(ve, run::gen56, primVoid(), "texreset"); + addFunc(ve, run::gen_runtime47, primVoid(), "add", formal(primPicture(), "dest", false, false), formal(primPicture(), "src", false, false)); +#line 1606 "runtime.in" + addFunc(ve, run::gen_runtime48, primVoid(), "prepend", formal(primPicture(), "dest", false, false), formal(primPicture(), "src", false, false)); +#line 1611 "runtime.in" + addFunc(ve, run::gen_runtime49, primVoid(), "postscript", formal(primPicture(), "f", false, false), formal(primString() , "s", false, false)); +#line 1616 "runtime.in" + addFunc(ve, run::gen_runtime50, primVoid(), "tex", formal(primPicture(), "f", false, false), formal(primString() , "s", false, false)); +#line 1621 "runtime.in" + addFunc(ve, run::gen_runtime51, primVoid(), "postscript", formal(primPicture(), "f", false, false), formal(primString() , "s", false, false), formal(primPair(), "min", false, false), formal(primPair(), "max", false, false)); +#line 1626 "runtime.in" + addFunc(ve, run::gen_runtime52, primVoid(), "tex", formal(primPicture(), "f", false, false), formal(primString() , "s", false, false), formal(primPair(), "min", false, false), formal(primPair(), "max", false, false)); +#line 1631 "runtime.in" + addFunc(ve, run::gen_runtime53, primVoid(), "texpreamble", formal(primString() , "s", false, false)); +#line 1639 "runtime.in" + addFunc(ve, run::gen_runtime54, primVoid(), "deletepreamble"); +#line 1646 "runtime.in" + addFunc(ve, run::gen_runtime55, primVoid(), "_labelpath", formal(primPicture(), "f", false, false), formal(primString() , "s", false, false), formal(primString() , "size", false, false), formal(primPath(), "g", false, false), formal(primString() , "justify", false, false), formal(primPair(), "offset", false, false), formal(primPen(), "p", false, false)); +#line 1652 "runtime.in" + addFunc(ve, run::gen_runtime56, primVoid(), "texreset"); +#line 1660 "runtime.in" + addFunc(ve, run::gen_runtime57, primVoid(), "layer", formal(primPicture(), "f", false, false)); +#line 1665 "runtime.in" + addFunc(ve, run::gen_runtime58, primVoid(), "newpage", formal(primPicture(), "f", false, false)); +#line 1670 "runtime.in" + addFunc(ve, run::gen_runtime59, primVoid(), "_image", formal(primPicture(), "f", false, false), formal(realArray2(), "data", false, false), formal(primPair(), "initial", false, false), formal(primPair(), "final", false, false), formal(penArray() , "palette", true, false), formal(primTransform(), "t", true, false), formal(primBoolean(), "copy", true, false), formal(primBoolean(), "antialias", true, false)); +#line 1680 "runtime.in" + addFunc(ve, run::gen_runtime60, primVoid(), "_image", formal(primPicture(), "f", false, false), formal(penArray2() , "data", false, false), formal(primPair(), "initial", false, false), formal(primPair(), "final", false, false), formal(primTransform(), "t", true, false), formal(primBoolean(), "copy", true, false), formal(primBoolean(), "antialias", true, false)); +#line 1687 "runtime.in" + addFunc(ve, run::gen_runtime61, primString() , "nativeformat"); #line 1692 "runtime.in" - addFunc(ve, run::gen57, primVoid(), "layer", formal(primPicture(), "f", false, false)); + addFunc(ve, run::gen_runtime62, primBoolean(), "latex"); #line 1697 "runtime.in" - addFunc(ve, run::gen58, primVoid(), "newpage", formal(primPicture(), "f", false, false)); + addFunc(ve, run::gen_runtime63, primBoolean(), "pdf"); #line 1702 "runtime.in" - addFunc(ve, run::gen59, primVoid(), "_image", formal(primPicture(), "f", false, false), formal(realArray2(), "data", false, false), formal(primPair(), "initial", false, false), formal(primPair(), "final", false, false), formal(penArray() , "palette", true, false), formal(primTransform(), "t", true, false), formal(primBoolean(), "copy", true, false), formal(primBoolean(), "antialias", true, false)); -#line 1712 "runtime.in" - addFunc(ve, run::gen60, primVoid(), "_image", formal(primPicture(), "f", false, false), formal(penArray2() , "data", false, false), formal(primPair(), "initial", false, false), formal(primPair(), "final", false, false), formal(primTransform(), "t", true, false), formal(primBoolean(), "copy", true, false), formal(primBoolean(), "antialias", true, false)); -#line 1719 "runtime.in" - addFunc(ve, run::gen61, primString() , "nativeformat"); -#line 1724 "runtime.in" - addFunc(ve, run::gen62, primBoolean(), "latex"); -#line 1729 "runtime.in" - addFunc(ve, run::gen63, primBoolean(), "pdf"); -#line 1734 "runtime.in" - addFunc(ve, run::gen64, primVoid(), "shipout", formal(primString() , "prefix", true, false), formal(primPicture(), "f", false, false), formal(primPicture(), "preamble", true, false), formal(primString() , "format", true, false), formal(primBoolean(), "wait", true, false), formal(primBoolean(), "view", true, false), formal(transformFunction(), "xform", false, false)); -#line 1780 "runtime.in" - addFunc(ve, run::gen65, primVoid(), "shipout3", formal(primString() , "prefix", false, false), formal(primPicture(), "f", false, false), formal(primString() , "format", true, false), formal(primReal(), "width", false, false), formal(primReal(), "height", false, false), formal(primReal(), "angle", false, false), formal(primReal(), "zoom", false, false), formal(primTriple(), "m", false, false), formal(primTriple(), "m", false, false), formal(primPair(), "shift", false, false), formal(realArray2(), "t", false, false), formal(realArray(), "background", false, false), formal(tripleArray(), "lights", false, false), formal(realArray2(), "diffuse", false, false), formal(realArray2(), "ambient", false, false), formal(realArray2(), "specular", false, false), formal(primBoolean(), "viewportlighting", false, false), formal(primBoolean(), "view", true, false)); -#line 1798 "runtime.in" - addFunc(ve, run::gen66, primVoid(), "shipout3", formal(primString() , "prefix", false, false), formal(primPicture(), "f", false, false)); -#line 1803 "runtime.in" - addFunc(ve, run::gen67, primVoid(), "deconstruct", formal(primPicture(), "f", false, false), formal(primPicture(), "preamble", true, false), formal(primReal(), "magnification", true, false), formal(transformFunction(), "xform", false, false)); -#line 1926 "runtime.in" - addFunc(ve, run::gen68, primVoid(), "purge", formal(primInt(), "divisor", true, false)); -#line 1939 "runtime.in" - addFunc(ve, run::gen70, primBoolean(), "==", formal(primPen(), "a", false, false), formal(primPen(), "b", false, false)); -#line 1944 "runtime.in" - addFunc(ve, run::gen71, primBoolean(), "!=", formal(primPen(), "a", false, false), formal(primPen(), "b", false, false)); -#line 1949 "runtime.in" - addFunc(ve, run::gen72, primPen(), "+", formal(primPen(), "a", false, false), formal(primPen(), "b", false, false)); -#line 1954 "runtime.in" - addFunc(ve, run::gen73, primPen(), "*", formal(primReal(), "a", false, false), formal(primPen(), "b", false, false)); -#line 1959 "runtime.in" - addFunc(ve, run::gen74, primPen(), "*", formal(primPen(), "a", false, false), formal(primReal(), "b", false, false)); -#line 1964 "runtime.in" - addFunc(ve, run::gen75, primPair(), "max", formal(primPen(), "p", false, false)); -#line 1969 "runtime.in" - addFunc(ve, run::gen76, primPair(), "min", formal(primPen(), "p", false, false)); + addFunc(ve, run::gen_runtime64, primVoid(), "shipout", formal(primString() , "prefix", true, false), formal(primPicture(), "f", false, false), formal(primPicture(), "preamble", true, false), formal(primString() , "format", true, false), formal(primBoolean(), "wait", true, false), formal(primBoolean(), "view", true, false), formal(transformFunction(), "xform", false, false)); +#line 1748 "runtime.in" + addFunc(ve, run::gen_runtime65, primVoid(), "shipout3", formal(primString() , "prefix", false, false), formal(primPicture(), "f", false, false), formal(primString() , "format", true, false), formal(primReal(), "width", false, false), formal(primReal(), "height", false, false), formal(primReal(), "angle", false, false), formal(primReal(), "zoom", false, false), formal(primTriple(), "m", false, false), formal(primTriple(), "m", false, false), formal(primPair(), "shift", false, false), formal(realArray2(), "t", false, false), formal(realArray(), "background", false, false), formal(tripleArray(), "lights", false, false), formal(realArray2(), "diffuse", false, false), formal(realArray2(), "ambient", false, false), formal(realArray2(), "specular", false, false), formal(primBoolean(), "viewportlighting", false, false), formal(primBoolean(), "view", true, false)); +#line 1766 "runtime.in" + addFunc(ve, run::gen_runtime66, primVoid(), "shipout3", formal(primString() , "prefix", false, false), formal(primPicture(), "f", false, false)); +#line 1771 "runtime.in" + addFunc(ve, run::gen_runtime67, primVoid(), "deconstruct", formal(primPicture(), "f", false, false), formal(primPicture(), "preamble", true, false), formal(primReal(), "magnification", true, false), formal(transformFunction(), "xform", false, false)); +#line 1894 "runtime.in" + addFunc(ve, run::gen_runtime68, primVoid(), "purge", formal(primInt(), "divisor", true, false)); +#line 1899 "runtime.in" + REGISTER_BLTIN(run::newPen,"newPen"); +#line 1907 "runtime.in" + addFunc(ve, run::gen_runtime70, primBoolean(), "==", formal(primPen(), "a", false, false), formal(primPen(), "b", false, false)); +#line 1912 "runtime.in" + addFunc(ve, run::gen_runtime71, primBoolean(), "!=", formal(primPen(), "a", false, false), formal(primPen(), "b", false, false)); +#line 1917 "runtime.in" + addFunc(ve, run::gen_runtime72, primPen(), "+", formal(primPen(), "a", false, false), formal(primPen(), "b", false, false)); +#line 1922 "runtime.in" + addFunc(ve, run::gen_runtime73, primPen(), "*", formal(primReal(), "a", false, false), formal(primPen(), "b", false, false)); +#line 1927 "runtime.in" + addFunc(ve, run::gen_runtime74, primPen(), "*", formal(primPen(), "a", false, false), formal(primReal(), "b", false, false)); +#line 1932 "runtime.in" + addFunc(ve, run::gen_runtime75, primPair(), "max", formal(primPen(), "p", false, false)); +#line 1937 "runtime.in" + addFunc(ve, run::gen_runtime76, primPair(), "min", formal(primPen(), "p", false, false)); +#line 1942 "runtime.in" + addFunc(ve, run::gen_runtime77, primVoid(), "resetdefaultpen"); +#line 1948 "runtime.in" + addFunc(ve, run::gen_runtime78, primVoid(), "defaultpen", formal(primPen(), "p", false, false)); +#line 1953 "runtime.in" + addFunc(ve, run::gen_runtime79, primPen(), "defaultpen"); +#line 1958 "runtime.in" + addFunc(ve, run::gen_runtime80, primBoolean(), "invisible", formal(primPen(), "p", false, false)); +#line 1963 "runtime.in" + addFunc(ve, run::gen_runtime81, primPen(), "invisible"); +#line 1968 "runtime.in" + addFunc(ve, run::gen_runtime82, primPen(), "gray", formal(primPen(), "p", false, false)); #line 1974 "runtime.in" - addFunc(ve, run::gen77, primVoid(), "resetdefaultpen"); + addFunc(ve, run::gen_runtime83, primPen(), "rgb", formal(primPen(), "p", false, false)); #line 1980 "runtime.in" - addFunc(ve, run::gen78, primVoid(), "defaultpen", formal(primPen(), "p", false, false)); -#line 1985 "runtime.in" - addFunc(ve, run::gen79, primPen(), "defaultpen"); -#line 1990 "runtime.in" - addFunc(ve, run::gen80, primBoolean(), "invisible", formal(primPen(), "p", false, false)); -#line 1995 "runtime.in" - addFunc(ve, run::gen81, primPen(), "invisible"); -#line 2000 "runtime.in" - addFunc(ve, run::gen82, primPen(), "gray", formal(primPen(), "p", false, false)); + addFunc(ve, run::gen_runtime84, primPen(), "cmyk", formal(primPen(), "p", false, false)); +#line 1986 "runtime.in" + addFunc(ve, run::gen_runtime85, primPen(), "interp", formal(primPen(), "a", false, false), formal(primPen(), "b", false, false), formal(primReal(), "t", false, false)); +#line 1991 "runtime.in" + addFunc(ve, run::gen_runtime86, primPen(), "rgb", formal(primReal(), "r", false, false), formal(primReal(), "g", false, false), formal(primReal(), "b", false, false)); +#line 1996 "runtime.in" + addFunc(ve, run::gen_runtime87, primPen(), "cmyk", formal(primReal(), "c", false, false), formal(primReal(), "m", false, false), formal(primReal(), "y", false, false), formal(primReal(), "k", false, false)); +#line 2001 "runtime.in" + addFunc(ve, run::gen_runtime88, primPen(), "gray", formal(primReal(), "gray", false, false)); #line 2006 "runtime.in" - addFunc(ve, run::gen83, primPen(), "rgb", formal(primPen(), "p", false, false)); -#line 2012 "runtime.in" - addFunc(ve, run::gen84, primPen(), "cmyk", formal(primPen(), "p", false, false)); -#line 2018 "runtime.in" - addFunc(ve, run::gen85, primPen(), "interp", formal(primPen(), "a", false, false), formal(primPen(), "b", false, false), formal(primReal(), "t", false, false)); -#line 2023 "runtime.in" - addFunc(ve, run::gen86, primPen(), "rgb", formal(primReal(), "r", false, false), formal(primReal(), "g", false, false), formal(primReal(), "b", false, false)); -#line 2028 "runtime.in" - addFunc(ve, run::gen87, primPen(), "cmyk", formal(primReal(), "c", false, false), formal(primReal(), "m", false, false), formal(primReal(), "y", false, false), formal(primReal(), "k", false, false)); -#line 2033 "runtime.in" - addFunc(ve, run::gen88, primPen(), "gray", formal(primReal(), "gray", false, false)); -#line 2038 "runtime.in" - addFunc(ve, run::gen89, realArray(), "colors", formal(primPen(), "p", false, false)); -#line 2066 "runtime.in" - addFunc(ve, run::gen90, primString() , "colorspace", formal(primPen(), "p", false, false)); -#line 2073 "runtime.in" - addFunc(ve, run::gen91, primPen(), "pattern", formal(primString(), "s", false, false)); -#line 2078 "runtime.in" - addFunc(ve, run::gen92, primString() , "pattern", formal(primPen(), "p", false, false)); -#line 2083 "runtime.in" - addFunc(ve, run::gen93, primPen(), "fillrule", formal(primInt(), "n", false, false)); -#line 2088 "runtime.in" - addFunc(ve, run::gen94, primInt(), "fillrule", formal(primPen(), "p", false, false)); -#line 2093 "runtime.in" - addFunc(ve, run::gen95, primPen(), "opacity", formal(primReal(), "opacity", true, false), formal(primString() , "blend", true, false)); -#line 2103 "runtime.in" - addFunc(ve, run::gen96, primReal(), "opacity", formal(primPen(), "p", false, false)); -#line 2108 "runtime.in" - addFunc(ve, run::gen97, primString() , "blend", formal(primPen(), "p", false, false)); -#line 2113 "runtime.in" - addFunc(ve, run::gen98, primPen(), "linetype", formal(primString(), "s", false, false), formal(primReal(), "offset", true, false), formal(primBoolean(), "scale", true, false), formal(primBoolean(), "adjust", true, false)); -#line 2118 "runtime.in" - addFunc(ve, run::gen99, primString() , "linetype", formal(primPen(), "p", true, false)); -#line 2123 "runtime.in" - addFunc(ve, run::gen100, primReal(), "offset", formal(primPen(), "p", false, false)); -#line 2128 "runtime.in" - addFunc(ve, run::gen101, primBoolean(), "scale", formal(primPen(), "p", false, false)); -#line 2133 "runtime.in" - addFunc(ve, run::gen102, primBoolean(), "adjust", formal(primPen(), "p", false, false)); -#line 2138 "runtime.in" - addFunc(ve, run::gen103, primPen(), "adjust", formal(primPen(), "p", false, false), formal(primReal(), "arclength", false, false), formal(primBoolean(), "cyclic", false, false)); -#line 2143 "runtime.in" - addFunc(ve, run::gen104, primPen(), "linecap", formal(primInt(), "n", false, false)); -#line 2148 "runtime.in" - addFunc(ve, run::gen105, primInt(), "linecap", formal(primPen(), "p", true, false)); -#line 2153 "runtime.in" - addFunc(ve, run::gen106, primPen(), "linejoin", formal(primInt(), "n", false, false)); -#line 2158 "runtime.in" - addFunc(ve, run::gen107, primInt(), "linejoin", formal(primPen(), "p", true, false)); -#line 2163 "runtime.in" - addFunc(ve, run::gen108, primPen(), "miterlimit", formal(primReal(), "x", false, false)); -#line 2168 "runtime.in" - addFunc(ve, run::gen109, primReal(), "miterlimit", formal(primPen(), "p", true, false)); -#line 2173 "runtime.in" - addFunc(ve, run::gen110, primPen(), "linewidth", formal(primReal(), "x", false, false)); -#line 2178 "runtime.in" - addFunc(ve, run::gen111, primReal(), "linewidth", formal(primPen(), "p", true, false)); + addFunc(ve, run::gen_runtime89, realArray(), "colors", formal(primPen(), "p", false, false)); +#line 2034 "runtime.in" + addFunc(ve, run::gen_runtime90, primString() , "colorspace", formal(primPen(), "p", false, false)); +#line 2041 "runtime.in" + addFunc(ve, run::gen_runtime91, primPen(), "pattern", formal(primString(), "s", false, false)); +#line 2046 "runtime.in" + addFunc(ve, run::gen_runtime92, primString() , "pattern", formal(primPen(), "p", false, false)); +#line 2051 "runtime.in" + addFunc(ve, run::gen_runtime93, primPen(), "fillrule", formal(primInt(), "n", false, false)); +#line 2056 "runtime.in" + addFunc(ve, run::gen_runtime94, primInt(), "fillrule", formal(primPen(), "p", false, false)); +#line 2061 "runtime.in" + addFunc(ve, run::gen_runtime95, primPen(), "opacity", formal(primReal(), "opacity", true, false), formal(primString() , "blend", true, false)); +#line 2071 "runtime.in" + addFunc(ve, run::gen_runtime96, primReal(), "opacity", formal(primPen(), "p", false, false)); +#line 2076 "runtime.in" + addFunc(ve, run::gen_runtime97, primString() , "blend", formal(primPen(), "p", false, false)); +#line 2081 "runtime.in" + addFunc(ve, run::gen_runtime98, primPen(), "linetype", formal(primString(), "s", false, false), formal(primReal(), "offset", true, false), formal(primBoolean(), "scale", true, false), formal(primBoolean(), "adjust", true, false)); +#line 2086 "runtime.in" + addFunc(ve, run::gen_runtime99, primString() , "linetype", formal(primPen(), "p", true, false)); +#line 2091 "runtime.in" + addFunc(ve, run::gen_runtime100, primReal(), "offset", formal(primPen(), "p", false, false)); +#line 2096 "runtime.in" + addFunc(ve, run::gen_runtime101, primBoolean(), "scale", formal(primPen(), "p", false, false)); +#line 2101 "runtime.in" + addFunc(ve, run::gen_runtime102, primBoolean(), "adjust", formal(primPen(), "p", false, false)); +#line 2106 "runtime.in" + addFunc(ve, run::gen_runtime103, primPen(), "adjust", formal(primPen(), "p", false, false), formal(primReal(), "arclength", false, false), formal(primBoolean(), "cyclic", false, false)); +#line 2111 "runtime.in" + addFunc(ve, run::gen_runtime104, primPen(), "linecap", formal(primInt(), "n", false, false)); +#line 2116 "runtime.in" + addFunc(ve, run::gen_runtime105, primInt(), "linecap", formal(primPen(), "p", true, false)); +#line 2121 "runtime.in" + addFunc(ve, run::gen_runtime106, primPen(), "linejoin", formal(primInt(), "n", false, false)); +#line 2126 "runtime.in" + addFunc(ve, run::gen_runtime107, primInt(), "linejoin", formal(primPen(), "p", true, false)); +#line 2131 "runtime.in" + addFunc(ve, run::gen_runtime108, primPen(), "miterlimit", formal(primReal(), "x", false, false)); +#line 2136 "runtime.in" + addFunc(ve, run::gen_runtime109, primReal(), "miterlimit", formal(primPen(), "p", true, false)); +#line 2141 "runtime.in" + addFunc(ve, run::gen_runtime110, primPen(), "linewidth", formal(primReal(), "x", false, false)); +#line 2146 "runtime.in" + addFunc(ve, run::gen_runtime111, primReal(), "linewidth", formal(primPen(), "p", true, false)); +#line 2151 "runtime.in" + addFunc(ve, run::gen_runtime112, primPen(), "fontcommand", formal(primString(), "s", false, false)); +#line 2156 "runtime.in" + addFunc(ve, run::gen_runtime113, primString() , "font", formal(primPen(), "p", true, false)); +#line 2161 "runtime.in" + addFunc(ve, run::gen_runtime114, primPen(), "fontsize", formal(primReal(), "size", false, false), formal(primReal(), "lineskip", false, false)); +#line 2167 "runtime.in" + addFunc(ve, run::gen_runtime115, primReal(), "fontsize", formal(primPen(), "p", true, false)); +#line 2172 "runtime.in" + addFunc(ve, run::gen_runtime116, primReal(), "lineskip", formal(primPen(), "p", true, false)); +#line 2177 "runtime.in" + addFunc(ve, run::gen_runtime117, primPen(), "overwrite", formal(primInt(), "n", false, false)); #line 2183 "runtime.in" - addFunc(ve, run::gen112, primPen(), "fontcommand", formal(primString(), "s", false, false)); + addFunc(ve, run::gen_runtime118, primInt(), "overwrite", formal(primPen(), "p", true, false)); #line 2188 "runtime.in" - addFunc(ve, run::gen113, primString() , "font", formal(primPen(), "p", true, false)); + addFunc(ve, run::gen_runtime119, primPen(), "basealign", formal(primInt(), "n", false, false)); #line 2193 "runtime.in" - addFunc(ve, run::gen114, primPen(), "fontsize", formal(primReal(), "size", false, false), formal(primReal(), "lineskip", false, false)); -#line 2199 "runtime.in" - addFunc(ve, run::gen115, primReal(), "fontsize", formal(primPen(), "p", true, false)); -#line 2204 "runtime.in" - addFunc(ve, run::gen116, primReal(), "lineskip", formal(primPen(), "p", true, false)); -#line 2209 "runtime.in" - addFunc(ve, run::gen117, primPen(), "overwrite", formal(primInt(), "n", false, false)); -#line 2215 "runtime.in" - addFunc(ve, run::gen118, primInt(), "overwrite", formal(primPen(), "p", true, false)); -#line 2220 "runtime.in" - addFunc(ve, run::gen119, primPen(), "basealign", formal(primInt(), "n", false, false)); -#line 2225 "runtime.in" - addFunc(ve, run::gen120, primInt(), "basealign", formal(primPen(), "p", true, false)); -#line 2230 "runtime.in" - addFunc(ve, run::gen121, primTransform(), "transform", formal(primPen(), "p", false, false)); -#line 2235 "runtime.in" - addFunc(ve, run::gen122, primPath(), "nib", formal(primPen(), "p", false, false)); -#line 2240 "runtime.in" - addFunc(ve, run::gen123, primPen(), "makepen", formal(primPath(), "p", false, false)); + addFunc(ve, run::gen_runtime120, primInt(), "basealign", formal(primPen(), "p", true, false)); +#line 2198 "runtime.in" + addFunc(ve, run::gen_runtime121, primTransform(), "transform", formal(primPen(), "p", false, false)); +#line 2203 "runtime.in" + addFunc(ve, run::gen_runtime122, primPath(), "nib", formal(primPen(), "p", false, false)); +#line 2208 "runtime.in" + addFunc(ve, run::gen_runtime123, primPen(), "makepen", formal(primPath(), "p", false, false)); +#line 2213 "runtime.in" + addFunc(ve, run::gen_runtime124, primPen(), "colorless", formal(primPen(), "p", false, false)); +#line 2219 "runtime.in" + addFunc(ve, run::gen_runtime125, primBoolean(), "interactive"); +#line 2226 "runtime.in" + addFunc(ve, run::gen_runtime126, primBoolean(), "uptodate"); +#line 2231 "runtime.in" + addFunc(ve, run::gen_runtime127, primInt(), "system", formal(stringArray(), "s", false, false)); #line 2245 "runtime.in" - addFunc(ve, run::gen124, primPen(), "colorless", formal(primPen(), "p", false, false)); -#line 2251 "runtime.in" - addFunc(ve, run::gen125, primBoolean(), "interactive"); -#line 2258 "runtime.in" - addFunc(ve, run::gen126, primBoolean(), "uptodate"); -#line 2263 "runtime.in" - addFunc(ve, run::gen127, primInt(), "system", formal(stringArray(), "s", false, false)); -#line 2277 "runtime.in" - addFunc(ve, run::gen128, primBoolean(), "view"); -#line 2282 "runtime.in" - addFunc(ve, run::gen129, primString() , "asydir"); -#line 2287 "runtime.in" - addFunc(ve, run::gen130, primString() , "locale", formal(primString() , "s", true, false)); -#line 2293 "runtime.in" - addFunc(ve, run::gen131, primVoid(), "abort", formal(primString() , "s", true, false)); -#line 2299 "runtime.in" - addFunc(ve, run::gen132, primVoid(), "exit"); -#line 2304 "runtime.in" - addFunc(ve, run::gen133, primVoid(), "assert", formal(primBoolean(), "b", false, false), formal(primString() , "s", true, false)); -#line 2315 "runtime.in" - addFunc(ve, run::gen134, primVoid(), "sleep", formal(primInt(), "seconds", false, false)); -#line 2321 "runtime.in" - addFunc(ve, run::gen135, primVoid(), "usleep", formal(primInt(), "microseconds", false, false)); -#line 2327 "runtime.in" - addFunc(ve, run::gen136, primVoid(), "_eval", formal(primString(), "s", false, false), formal(primBoolean(), "embedded", false, false), formal(primBoolean(), "interactivewrite", true, false)); + addFunc(ve, run::gen_runtime128, primBoolean(), "view"); +#line 2250 "runtime.in" + addFunc(ve, run::gen_runtime129, primString() , "asydir"); +#line 2255 "runtime.in" + addFunc(ve, run::gen_runtime130, primString() , "locale", formal(primString() , "s", true, false)); +#line 2261 "runtime.in" + addFunc(ve, run::gen_runtime131, primVoid(), "abort", formal(primString() , "s", true, false)); +#line 2267 "runtime.in" + addFunc(ve, run::gen_runtime132, primVoid(), "exit"); +#line 2272 "runtime.in" + addFunc(ve, run::gen_runtime133, primVoid(), "assert", formal(primBoolean(), "b", false, false), formal(primString() , "s", true, false)); +#line 2283 "runtime.in" + addFunc(ve, run::gen_runtime134, primVoid(), "sleep", formal(primInt(), "seconds", false, false)); +#line 2289 "runtime.in" + addFunc(ve, run::gen_runtime135, primVoid(), "usleep", formal(primInt(), "microseconds", false, false)); +#line 2295 "runtime.in" + addFunc(ve, run::gen_runtime136, primVoid(), "_eval", formal(primString(), "s", false, false), formal(primBoolean(), "embedded", false, false), formal(primBoolean(), "interactivewrite", true, false)); +#line 2308 "runtime.in" + addFunc(ve, run::gen_runtime137, primVoid(), "_eval", formal(primCode(), "s", false, false), formal(primBoolean(), "embedded", false, false)); +#line 2324 "runtime.in" + addFunc(ve, run::gen_runtime138, primString() , "location"); +#line 2330 "runtime.in" + REGISTER_BLTIN(run::loadModule,"loadModule"); +#line 2336 "runtime.in" + addFunc(ve, run::gen_runtime140, primString() , "cd", formal(primString() , "s", true, false)); #line 2342 "runtime.in" - addFunc(ve, run::gen137, primVoid(), "_eval", formal(primCode(), "s", false, false), formal(primBoolean(), "embedded", false, false)); -#line 2360 "runtime.in" - addFunc(ve, run::gen138, primString() , "location"); -#line 2372 "runtime.in" - addFunc(ve, run::gen140, primString() , "cd", formal(primString() , "s", true, false)); -#line 2378 "runtime.in" - addFunc(ve, run::gen141, primVoid(), "list", formal(primString(), "s", false, false), formal(primBoolean(), "imports", true, false)); -#line 2395 "runtime.in" - addFunc(ve, run::gen143, primBoolean(), "==", formal(primPath(), "a", false, false), formal(primPath(), "b", false, false)); -#line 2400 "runtime.in" - addFunc(ve, run::gen144, primBoolean(), "!=", formal(primPath(), "a", false, false), formal(primPath(), "b", false, false)); -#line 2405 "runtime.in" - addFunc(ve, run::gen145, primPair(), "point", formal(primPath(), "p", false, false), formal(primInt(), "t", false, false)); -#line 2410 "runtime.in" - addFunc(ve, run::gen146, primPair(), "point", formal(primPath(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2415 "runtime.in" - addFunc(ve, run::gen147, primPair(), "precontrol", formal(primPath(), "p", false, false), formal(primInt(), "t", false, false)); -#line 2420 "runtime.in" - addFunc(ve, run::gen148, primPair(), "precontrol", formal(primPath(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2425 "runtime.in" - addFunc(ve, run::gen149, primPair(), "postcontrol", formal(primPath(), "p", false, false), formal(primInt(), "t", false, false)); -#line 2430 "runtime.in" - addFunc(ve, run::gen150, primPair(), "postcontrol", formal(primPath(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2435 "runtime.in" - addFunc(ve, run::gen151, primPair(), "dir", formal(primPath(), "p", false, false), formal(primInt(), "t", false, false), formal(primInt(), "sign", true, false), formal(primBoolean(), "normalize", true, false)); -#line 2440 "runtime.in" - addFunc(ve, run::gen152, primPair(), "dir", formal(primPath(), "p", false, false), formal(primReal(), "t", false, false), formal(primBoolean(), "normalize", true, false)); -#line 2445 "runtime.in" - addFunc(ve, run::gen153, primPair(), "accel", formal(primPath(), "p", false, false), formal(primInt(), "t", false, false), formal(primInt(), "sign", true, false)); -#line 2450 "runtime.in" - addFunc(ve, run::gen154, primPair(), "accel", formal(primPath(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2455 "runtime.in" - addFunc(ve, run::gen155, primReal(), "radius", formal(primPath(), "p", false, false), formal(primReal(), "t", false, false)); + addFunc(ve, run::gen_runtime141, primVoid(), "list", formal(primString(), "s", false, false), formal(primBoolean(), "imports", true, false)); +#line 2351 "runtime.in" + REGISTER_BLTIN(run::nullPath,"nullPath"); +#line 2359 "runtime.in" + addFunc(ve, run::gen_runtime143, primBoolean(), "==", formal(primPath(), "a", false, false), formal(primPath(), "b", false, false)); +#line 2364 "runtime.in" + addFunc(ve, run::gen_runtime144, primBoolean(), "!=", formal(primPath(), "a", false, false), formal(primPath(), "b", false, false)); +#line 2369 "runtime.in" + addFunc(ve, run::gen_runtime145, primPair(), "point", formal(primPath(), "p", false, false), formal(primInt(), "t", false, false)); +#line 2374 "runtime.in" + addFunc(ve, run::gen_runtime146, primPair(), "point", formal(primPath(), "p", false, false), formal(primReal(), "t", false, false)); +#line 2379 "runtime.in" + addFunc(ve, run::gen_runtime147, primPair(), "precontrol", formal(primPath(), "p", false, false), formal(primInt(), "t", false, false)); +#line 2384 "runtime.in" + addFunc(ve, run::gen_runtime148, primPair(), "precontrol", formal(primPath(), "p", false, false), formal(primReal(), "t", false, false)); +#line 2389 "runtime.in" + addFunc(ve, run::gen_runtime149, primPair(), "postcontrol", formal(primPath(), "p", false, false), formal(primInt(), "t", false, false)); +#line 2394 "runtime.in" + addFunc(ve, run::gen_runtime150, primPair(), "postcontrol", formal(primPath(), "p", false, false), formal(primReal(), "t", false, false)); +#line 2399 "runtime.in" + addFunc(ve, run::gen_runtime151, primPair(), "dir", formal(primPath(), "p", false, false), formal(primInt(), "t", false, false), formal(primInt(), "sign", true, false), formal(primBoolean(), "normalize", true, false)); +#line 2404 "runtime.in" + addFunc(ve, run::gen_runtime152, primPair(), "dir", formal(primPath(), "p", false, false), formal(primReal(), "t", false, false), formal(primBoolean(), "normalize", true, false)); +#line 2409 "runtime.in" + addFunc(ve, run::gen_runtime153, primPair(), "accel", formal(primPath(), "p", false, false), formal(primInt(), "t", false, false), formal(primInt(), "sign", true, false)); +#line 2414 "runtime.in" + addFunc(ve, run::gen_runtime154, primPair(), "accel", formal(primPath(), "p", false, false), formal(primReal(), "t", false, false)); +#line 2419 "runtime.in" + addFunc(ve, run::gen_runtime155, primReal(), "radius", formal(primPath(), "p", false, false), formal(primReal(), "t", false, false)); +#line 2431 "runtime.in" + addFunc(ve, run::gen_runtime156, primPath(), "reverse", formal(primPath(), "p", false, false)); +#line 2436 "runtime.in" + addFunc(ve, run::gen_runtime157, primPath(), "subpath", formal(primPath(), "p", false, false), formal(primInt(), "a", false, false), formal(primInt(), "b", false, false)); +#line 2441 "runtime.in" + addFunc(ve, run::gen_runtime158, primPath(), "subpath", formal(primPath(), "p", false, false), formal(primReal(), "a", false, false), formal(primReal(), "b", false, false)); +#line 2446 "runtime.in" + addFunc(ve, run::gen_runtime159, primPath(), "nurb", formal(primPair(), "z0", false, false), formal(primPair(), "z1", false, false), formal(primPair(), "z2", false, false), formal(primPair(), "z3", false, false), formal(primReal(), "w0", false, false), formal(primReal(), "w1", false, false), formal(primReal(), "w2", false, false), formal(primReal(), "w3", false, false), formal(primInt(), "m", false, false)); +#line 2452 "runtime.in" + addFunc(ve, run::gen_runtime160, primInt(), "length", formal(primPath(), "p", false, false)); +#line 2457 "runtime.in" + addFunc(ve, run::gen_runtime161, primBoolean(), "cyclic", formal(primPath(), "p", false, false)); +#line 2462 "runtime.in" + addFunc(ve, run::gen_runtime162, primBoolean(), "straight", formal(primPath(), "p", false, false), formal(primInt(), "t", false, false)); #line 2467 "runtime.in" - addFunc(ve, run::gen156, primPath(), "reverse", formal(primPath(), "p", false, false)); + addFunc(ve, run::gen_runtime163, primPath(), "unstraighten", formal(primPath(), "p", false, false)); #line 2472 "runtime.in" - addFunc(ve, run::gen157, primPath(), "subpath", formal(primPath(), "p", false, false), formal(primInt(), "a", false, false), formal(primInt(), "b", false, false)); + addFunc(ve, run::gen_runtime164, primBoolean(), "piecewisestraight", formal(primPath(), "p", false, false)); #line 2477 "runtime.in" - addFunc(ve, run::gen158, primPath(), "subpath", formal(primPath(), "p", false, false), formal(primReal(), "a", false, false), formal(primReal(), "b", false, false)); + addFunc(ve, run::gen_runtime165, primReal(), "arclength", formal(primPath(), "p", false, false)); #line 2482 "runtime.in" - addFunc(ve, run::gen159, primPath(), "nurb", formal(primPair(), "z0", false, false), formal(primPair(), "z1", false, false), formal(primPair(), "z2", false, false), formal(primPair(), "z3", false, false), formal(primReal(), "w0", false, false), formal(primReal(), "w1", false, false), formal(primReal(), "w2", false, false), formal(primReal(), "w3", false, false), formal(primInt(), "m", false, false)); -#line 2488 "runtime.in" - addFunc(ve, run::gen160, primInt(), "length", formal(primPath(), "p", false, false)); -#line 2493 "runtime.in" - addFunc(ve, run::gen161, primBoolean(), "cyclic", formal(primPath(), "p", false, false)); -#line 2498 "runtime.in" - addFunc(ve, run::gen162, primBoolean(), "straight", formal(primPath(), "p", false, false), formal(primInt(), "t", false, false)); -#line 2503 "runtime.in" - addFunc(ve, run::gen163, primPath(), "unstraighten", formal(primPath(), "p", false, false)); -#line 2508 "runtime.in" - addFunc(ve, run::gen164, primBoolean(), "piecewisestraight", formal(primPath(), "p", false, false)); -#line 2513 "runtime.in" - addFunc(ve, run::gen165, primReal(), "arclength", formal(primPath(), "p", false, false)); -#line 2518 "runtime.in" - addFunc(ve, run::gen166, primReal(), "arctime", formal(primPath(), "p", false, false), formal(primReal(), "dval", false, false)); -#line 2523 "runtime.in" - addFunc(ve, run::gen167, primReal(), "dirtime", formal(primPath(), "p", false, false), formal(primPair(), "z", false, false)); -#line 2528 "runtime.in" - addFunc(ve, run::gen168, realArray(), "intersect", formal(primPath(), "p", false, false), formal(primPath(), "q", false, false), formal(primReal(), "fuzz", true, false)); -#line 2545 "runtime.in" - addFunc(ve, run::gen169, realArray2(), "intersections", formal(primPath(), "p", false, false), formal(primPath(), "q", false, false), formal(primReal(), "fuzz", true, false)); + addFunc(ve, run::gen_runtime166, primReal(), "arctime", formal(primPath(), "p", false, false), formal(primReal(), "dval", false, false)); +#line 2487 "runtime.in" + addFunc(ve, run::gen_runtime167, primReal(), "dirtime", formal(primPath(), "p", false, false), formal(primPair(), "z", false, false)); +#line 2492 "runtime.in" + addFunc(ve, run::gen_runtime168, realArray(), "intersect", formal(primPath(), "p", false, false), formal(primPath(), "q", false, false), formal(primReal(), "fuzz", true, false)); +#line 2509 "runtime.in" + addFunc(ve, run::gen_runtime169, realArray2(), "intersections", formal(primPath(), "p", false, false), formal(primPath(), "q", false, false), formal(primReal(), "fuzz", true, false)); +#line 2540 "runtime.in" + addFunc(ve, run::gen_runtime170, realArray(), "intersections", formal(primPath(), "p", false, false), formal(primPair(), "a", false, true), formal(primPair(), "b", false, true), formal(primReal(), "fuzz", true, false)); +#line 2555 "runtime.in" + addFunc(ve, run::gen_runtime171, primPair(), "extension", formal(primPair(), "p", false, false), formal(primPair(), "q", false, false), formal(primPair(), "p", false, false), formal(primPair(), "q", false, false)); +#line 2566 "runtime.in" + addFunc(ve, run::gen_runtime172, primInt(), "size", formal(primPath(), "p", false, false)); +#line 2571 "runtime.in" + addFunc(ve, run::gen_runtime173, primPath(), "&", formal(primPath(), "p", false, false), formal(primPath(), "q", false, false)); #line 2576 "runtime.in" - addFunc(ve, run::gen170, realArray(), "intersections", formal(primPath(), "p", false, false), formal(primPair(), "a", false, true), formal(primPair(), "b", false, true), formal(primReal(), "fuzz", true, false)); -#line 2591 "runtime.in" - addFunc(ve, run::gen171, primPair(), "extension", formal(primPair(), "p", false, false), formal(primPair(), "q", false, false), formal(primPair(), "p", false, false), formal(primPair(), "q", false, false)); -#line 2602 "runtime.in" - addFunc(ve, run::gen172, primInt(), "size", formal(primPath(), "p", false, false)); -#line 2607 "runtime.in" - addFunc(ve, run::gen173, primPath(), "&", formal(primPath(), "p", false, false), formal(primPath(), "q", false, false)); -#line 2612 "runtime.in" - addFunc(ve, run::gen174, primPair(), "min", formal(primPath(), "p", false, false)); -#line 2617 "runtime.in" - addFunc(ve, run::gen175, primPair(), "max", formal(primPath(), "p", false, false)); -#line 2622 "runtime.in" - addFunc(ve, run::gen176, realArray(), "mintimes", formal(primPath(), "p", false, false)); + addFunc(ve, run::gen_runtime174, primPair(), "min", formal(primPath(), "p", false, false)); +#line 2581 "runtime.in" + addFunc(ve, run::gen_runtime175, primPair(), "max", formal(primPath(), "p", false, false)); +#line 2586 "runtime.in" + addFunc(ve, run::gen_runtime176, realArray(), "mintimes", formal(primPath(), "p", false, false)); +#line 2595 "runtime.in" + addFunc(ve, run::gen_runtime177, realArray(), "maxtimes", formal(primPath(), "p", false, false)); +#line 2604 "runtime.in" + addFunc(ve, run::gen_runtime178, primReal(), "relativedistance", formal(primReal(), "theta", false, false), formal(primReal(), "phi", false, false), formal(primReal(), "t", false, false), formal(primBoolean(), "atleast", false, false)); +#line 2609 "runtime.in" + addFunc(ve, run::gen_runtime179, primInt(), "windingnumber", formal(pathArray() , "p", false, false), formal(primPair(), "z", false, false)); +#line 2614 "runtime.in" + addFunc(ve, run::gen_runtime180, primBoolean(), "inside", formal(pathArray() , "g", false, true), formal(primPair(), "z", false, false), formal(primPen(), "fillrule", true, false)); +#line 2619 "runtime.in" + addFunc(ve, run::gen_runtime181, primBoolean(), "inside", formal(primPath(), "g", false, false), formal(primPair(), "z", false, false), formal(primPen(), "fillrule", true, false)); +#line 2624 "runtime.in" + addFunc(ve, run::gen_runtime182, primReal(), "side", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false), formal(primPair(), "c", false, false)); #line 2631 "runtime.in" - addFunc(ve, run::gen177, realArray(), "maxtimes", formal(primPath(), "p", false, false)); -#line 2640 "runtime.in" - addFunc(ve, run::gen178, primReal(), "relativedistance", formal(primReal(), "theta", false, false), formal(primReal(), "phi", false, false), formal(primReal(), "t", false, false), formal(primBoolean(), "atleast", false, false)); -#line 2645 "runtime.in" - addFunc(ve, run::gen179, primInt(), "windingnumber", formal(pathArray() , "p", false, false), formal(primPair(), "z", false, false)); -#line 2650 "runtime.in" - addFunc(ve, run::gen180, primBoolean(), "inside", formal(pathArray() , "g", false, true), formal(primPair(), "z", false, false), formal(primPen(), "fillrule", true, false)); -#line 2655 "runtime.in" - addFunc(ve, run::gen181, primBoolean(), "inside", formal(primPath(), "g", false, false), formal(primPair(), "z", false, false), formal(primPen(), "fillrule", true, false)); -#line 2660 "runtime.in" - addFunc(ve, run::gen182, primReal(), "side", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false), formal(primPair(), "c", false, false)); -#line 2667 "runtime.in" - addFunc(ve, run::gen183, primReal(), "incircle", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false), formal(primPair(), "c", false, false), formal(primPair(), "d", false, false)); -#line 2675 "runtime.in" - addFunc(ve, run::gen184, primPath3(), "path3", formal(tripleArray(), "pre", false, false), formal(tripleArray(), "point", false, false), formal(tripleArray(), "post", false, false), formal(boolArray(), "straight", false, false), formal(primBoolean(), "cyclic", false, false)); -#line 2700 "runtime.in" - addFunc(ve, run::gen186, primBoolean(), "==", formal(primPath3(), "a", false, false), formal(primPath3(), "b", false, false)); -#line 2705 "runtime.in" - addFunc(ve, run::gen187, primBoolean(), "!=", formal(primPath3(), "a", false, false), formal(primPath3(), "b", false, false)); -#line 2710 "runtime.in" - addFunc(ve, run::gen188, primTriple(), "point", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false)); -#line 2715 "runtime.in" - addFunc(ve, run::gen189, primTriple(), "point", formal(primPath3(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2720 "runtime.in" - addFunc(ve, run::gen190, primTriple(), "precontrol", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false)); -#line 2725 "runtime.in" - addFunc(ve, run::gen191, primTriple(), "precontrol", formal(primPath3(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2730 "runtime.in" - addFunc(ve, run::gen192, primTriple(), "postcontrol", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false)); -#line 2735 "runtime.in" - addFunc(ve, run::gen193, primTriple(), "postcontrol", formal(primPath3(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2740 "runtime.in" - addFunc(ve, run::gen194, primTriple(), "dir", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false), formal(primInt(), "sign", true, false), formal(primBoolean(), "normalize", true, false)); -#line 2745 "runtime.in" - addFunc(ve, run::gen195, primTriple(), "dir", formal(primPath3(), "p", false, false), formal(primReal(), "t", false, false), formal(primBoolean(), "normalize", true, false)); -#line 2750 "runtime.in" - addFunc(ve, run::gen196, primTriple(), "accel", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false), formal(primInt(), "sign", true, false)); -#line 2755 "runtime.in" - addFunc(ve, run::gen197, primTriple(), "accel", formal(primPath3(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2760 "runtime.in" - addFunc(ve, run::gen198, primReal(), "radius", formal(primPath3(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2772 "runtime.in" - addFunc(ve, run::gen199, primReal(), "radius", formal(primTriple(), "z0", false, false), formal(primTriple(), "c0", false, false), formal(primTriple(), "c1", false, false), formal(primTriple(), "z1", false, false), formal(primReal(), "t", false, false)); + addFunc(ve, run::gen_runtime183, primReal(), "incircle", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false), formal(primPair(), "c", false, false), formal(primPair(), "d", false, false)); +#line 2639 "runtime.in" + addFunc(ve, run::gen_runtime184, primPath3(), "path3", formal(tripleArray(), "pre", false, false), formal(tripleArray(), "point", false, false), formal(tripleArray(), "post", false, false), formal(booleanArray(), "straight", false, false), formal(primBoolean(), "cyclic", false, false)); +#line 2659 "runtime.in" + REGISTER_BLTIN(run::nullPath3,"nullPath3"); +#line 2664 "runtime.in" + addFunc(ve, run::gen_runtime186, primBoolean(), "==", formal(primPath3(), "a", false, false), formal(primPath3(), "b", false, false)); +#line 2669 "runtime.in" + addFunc(ve, run::gen_runtime187, primBoolean(), "!=", formal(primPath3(), "a", false, false), formal(primPath3(), "b", false, false)); +#line 2674 "runtime.in" + addFunc(ve, run::gen_runtime188, primTriple(), "point", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false)); +#line 2679 "runtime.in" + addFunc(ve, run::gen_runtime189, primTriple(), "point", formal(primPath3(), "p", false, false), formal(primReal(), "t", false, false)); +#line 2684 "runtime.in" + addFunc(ve, run::gen_runtime190, primTriple(), "precontrol", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false)); +#line 2689 "runtime.in" + addFunc(ve, run::gen_runtime191, primTriple(), "precontrol", formal(primPath3(), "p", false, false), formal(primReal(), "t", false, false)); +#line 2694 "runtime.in" + addFunc(ve, run::gen_runtime192, primTriple(), "postcontrol", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false)); +#line 2699 "runtime.in" + addFunc(ve, run::gen_runtime193, primTriple(), "postcontrol", formal(primPath3(), "p", false, false), formal(primReal(), "t", false, false)); +#line 2704 "runtime.in" + addFunc(ve, run::gen_runtime194, primTriple(), "dir", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false), formal(primInt(), "sign", true, false), formal(primBoolean(), "normalize", true, false)); +#line 2709 "runtime.in" + addFunc(ve, run::gen_runtime195, primTriple(), "dir", formal(primPath3(), "p", false, false), formal(primReal(), "t", false, false), formal(primBoolean(), "normalize", true, false)); +#line 2714 "runtime.in" + addFunc(ve, run::gen_runtime196, primTriple(), "accel", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false), formal(primInt(), "sign", true, false)); +#line 2719 "runtime.in" + addFunc(ve, run::gen_runtime197, primTriple(), "accel", formal(primPath3(), "p", false, false), formal(primReal(), "t", false, false)); +#line 2724 "runtime.in" + addFunc(ve, run::gen_runtime198, primReal(), "radius", formal(primPath3(), "p", false, false), formal(primReal(), "t", false, false)); +#line 2736 "runtime.in" + addFunc(ve, run::gen_runtime199, primReal(), "radius", formal(primTriple(), "z0", false, false), formal(primTriple(), "c0", false, false), formal(primTriple(), "c1", false, false), formal(primTriple(), "z1", false, false), formal(primReal(), "t", false, false)); +#line 2748 "runtime.in" + addFunc(ve, run::gen_runtime200, primPath3(), "reverse", formal(primPath3(), "p", false, false)); +#line 2753 "runtime.in" + addFunc(ve, run::gen_runtime201, primPath3(), "subpath", formal(primPath3(), "p", false, false), formal(primInt(), "a", false, false), formal(primInt(), "b", false, false)); +#line 2758 "runtime.in" + addFunc(ve, run::gen_runtime202, primPath3(), "subpath", formal(primPath3(), "p", false, false), formal(primReal(), "a", false, false), formal(primReal(), "b", false, false)); +#line 2763 "runtime.in" + addFunc(ve, run::gen_runtime203, primInt(), "length", formal(primPath3(), "p", false, false)); +#line 2768 "runtime.in" + addFunc(ve, run::gen_runtime204, primBoolean(), "cyclic", formal(primPath3(), "p", false, false)); +#line 2773 "runtime.in" + addFunc(ve, run::gen_runtime205, primBoolean(), "straight", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false)); +#line 2778 "runtime.in" + addFunc(ve, run::gen_runtime206, primTriple(), "perp", formal(primTriple(), "v", false, false), formal(primTriple(), "u", false, false)); #line 2784 "runtime.in" - addFunc(ve, run::gen200, primPath3(), "reverse", formal(primPath3(), "p", false, false)); -#line 2789 "runtime.in" - addFunc(ve, run::gen201, primPath3(), "subpath", formal(primPath3(), "p", false, false), formal(primInt(), "a", false, false), formal(primInt(), "b", false, false)); -#line 2794 "runtime.in" - addFunc(ve, run::gen202, primPath3(), "subpath", formal(primPath3(), "p", false, false), formal(primReal(), "a", false, false), formal(primReal(), "b", false, false)); -#line 2799 "runtime.in" - addFunc(ve, run::gen203, primInt(), "length", formal(primPath3(), "p", false, false)); -#line 2804 "runtime.in" - addFunc(ve, run::gen204, primBoolean(), "cyclic", formal(primPath3(), "p", false, false)); -#line 2809 "runtime.in" - addFunc(ve, run::gen205, primBoolean(), "straight", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false)); -#line 2814 "runtime.in" - addFunc(ve, run::gen206, primTriple(), "perp", formal(primTriple(), "v", false, false), formal(primTriple(), "u", false, false)); -#line 2820 "runtime.in" - addFunc(ve, run::gen207, primReal(), "straightness", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false)); -#line 2831 "runtime.in" - addFunc(ve, run::gen208, primReal(), "straightness", formal(primTriple(), "z0", false, false), formal(primTriple(), "c0", false, false), formal(primTriple(), "c1", false, false), formal(primTriple(), "z1", false, false)); -#line 2839 "runtime.in" - addFunc(ve, run::gen209, primBoolean(), "piecewisestraight", formal(primPath3(), "p", false, false)); -#line 2844 "runtime.in" - addFunc(ve, run::gen210, primReal(), "arclength", formal(primPath3(), "p", false, false)); -#line 2849 "runtime.in" - addFunc(ve, run::gen211, primReal(), "arctime", formal(primPath3(), "p", false, false), formal(primReal(), "dval", false, false)); -#line 2854 "runtime.in" - addFunc(ve, run::gen212, realArray(), "intersect", formal(primPath3(), "p", false, false), formal(primPath3(), "q", false, false), formal(primReal(), "fuzz", true, false)); -#line 2872 "runtime.in" - addFunc(ve, run::gen213, realArray2(), "intersections", formal(primPath3(), "p", false, false), formal(primPath3(), "q", false, false), formal(primReal(), "fuzz", true, false)); -#line 2905 "runtime.in" - addFunc(ve, run::gen214, realArray2(), "intersections", formal(primPath3(), "p", false, false), formal(tripleArray2(), "p", false, false), formal(primReal(), "fuzz", true, false)); -#line 2925 "runtime.in" - addFunc(ve, run::gen215, primInt(), "size", formal(primPath3(), "p", false, false)); -#line 2930 "runtime.in" - addFunc(ve, run::gen216, primPath3(), "&", formal(primPath3(), "p", false, false), formal(primPath3(), "q", false, false)); -#line 2935 "runtime.in" - addFunc(ve, run::gen217, primTriple(), "min", formal(primPath3(), "p", false, false)); -#line 2940 "runtime.in" - addFunc(ve, run::gen218, primTriple(), "max", formal(primPath3(), "p", false, false)); -#line 2945 "runtime.in" - addFunc(ve, run::gen219, realArray(), "mintimes", formal(primPath3(), "p", false, false)); -#line 2955 "runtime.in" - addFunc(ve, run::gen220, realArray(), "maxtimes", formal(primPath3(), "p", false, false)); -#line 2965 "runtime.in" - addFunc(ve, run::gen221, primPath3(), "*", formal(realArray2(), "t", false, false), formal(primPath3(), "g", false, false)); + addFunc(ve, run::gen_runtime207, primReal(), "straightness", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false)); +#line 2795 "runtime.in" + addFunc(ve, run::gen_runtime208, primReal(), "straightness", formal(primTriple(), "z0", false, false), formal(primTriple(), "c0", false, false), formal(primTriple(), "c1", false, false), formal(primTriple(), "z1", false, false)); +#line 2803 "runtime.in" + addFunc(ve, run::gen_runtime209, primBoolean(), "piecewisestraight", formal(primPath3(), "p", false, false)); +#line 2808 "runtime.in" + addFunc(ve, run::gen_runtime210, primReal(), "arclength", formal(primPath3(), "p", false, false)); +#line 2813 "runtime.in" + addFunc(ve, run::gen_runtime211, primReal(), "arctime", formal(primPath3(), "p", false, false), formal(primReal(), "dval", false, false)); +#line 2818 "runtime.in" + addFunc(ve, run::gen_runtime212, realArray(), "intersect", formal(primPath3(), "p", false, false), formal(primPath3(), "q", false, false), formal(primReal(), "fuzz", true, false)); +#line 2836 "runtime.in" + addFunc(ve, run::gen_runtime213, realArray2(), "intersections", formal(primPath3(), "p", false, false), formal(primPath3(), "q", false, false), formal(primReal(), "fuzz", true, false)); +#line 2869 "runtime.in" + addFunc(ve, run::gen_runtime214, realArray2(), "intersections", formal(primPath3(), "p", false, false), formal(tripleArray2(), "p", false, false), formal(primReal(), "fuzz", true, false)); +#line 2889 "runtime.in" + addFunc(ve, run::gen_runtime215, primInt(), "size", formal(primPath3(), "p", false, false)); +#line 2894 "runtime.in" + addFunc(ve, run::gen_runtime216, primPath3(), "&", formal(primPath3(), "p", false, false), formal(primPath3(), "q", false, false)); +#line 2899 "runtime.in" + addFunc(ve, run::gen_runtime217, primTriple(), "min", formal(primPath3(), "p", false, false)); +#line 2904 "runtime.in" + addFunc(ve, run::gen_runtime218, primTriple(), "max", formal(primPath3(), "p", false, false)); +#line 2909 "runtime.in" + addFunc(ve, run::gen_runtime219, realArray(), "mintimes", formal(primPath3(), "p", false, false)); +#line 2919 "runtime.in" + addFunc(ve, run::gen_runtime220, realArray(), "maxtimes", formal(primPath3(), "p", false, false)); +#line 2929 "runtime.in" + addFunc(ve, run::gen_runtime221, primPath3(), "*", formal(realArray2(), "t", false, false), formal(primPath3(), "g", false, false)); +#line 2934 "runtime.in" + REGISTER_BLTIN(run::nullGuide,"nullGuide"); +#line 2942 "runtime.in" + REGISTER_BLTIN(run::dotsGuide,"dotsGuide"); +#line 2952 "runtime.in" + REGISTER_BLTIN(run::dashesGuide,"dashesGuide"); +#line 2979 "runtime.in" + REGISTER_BLTIN(run::newCycleToken,"newCycleToken"); +#line 2984 "runtime.in" + addFunc(ve, run::gen_runtime226, primGuide(), "operator cast", formal(primCycleToken(), "tok", false, false)); +#line 2991 "runtime.in" + addFunc(ve, run::gen_runtime227, primGuide(), "operator spec", formal(primPair(), "z", false, false), formal(primInt(), "p", false, false)); +#line 2999 "runtime.in" + addFunc(ve, run::gen_runtime228, primCurlSpecifier(), "operator curl", formal(primReal(), "gamma", false, false), formal(primInt(), "p", false, false)); +#line 3005 "runtime.in" + REGISTER_BLTIN(run::curlSpecifierValuePart,"curlSpecifierValuePart"); +#line 3010 "runtime.in" + REGISTER_BLTIN(run::curlSpecifierSidePart,"curlSpecifierSidePart"); +#line 3015 "runtime.in" + addFunc(ve, run::gen_runtime231, primGuide(), "operator cast", formal(primCurlSpecifier(), "spec", false, false)); #line 3020 "runtime.in" - addFunc(ve, run::gen226, primGuide(), "operator cast", formal(primCycleToken(), "tok", false, false)); -#line 3027 "runtime.in" - addFunc(ve, run::gen227, primGuide(), "operator spec", formal(primPair(), "z", false, false), formal(primInt(), "p", false, false)); + addFunc(ve, run::gen_runtime232, primTensionSpecifier(), "operator tension", formal(primReal(), "tout", false, false), formal(primReal(), "tin", false, false), formal(primBoolean(), "atleast", false, false)); +#line 3025 "runtime.in" + REGISTER_BLTIN(run::tensionSpecifierOutPart,"tensionSpecifierOutPart"); +#line 3030 "runtime.in" + REGISTER_BLTIN(run::tensionSpecifierInPart,"tensionSpecifierInPart"); #line 3035 "runtime.in" - addFunc(ve, run::gen228, primCurlSpecifier(), "operator curl", formal(primReal(), "gamma", false, false), formal(primInt(), "p", false, false)); -#line 3051 "runtime.in" - addFunc(ve, run::gen231, primGuide(), "operator cast", formal(primCurlSpecifier(), "spec", false, false)); -#line 3056 "runtime.in" - addFunc(ve, run::gen232, primTensionSpecifier(), "operator tension", formal(primReal(), "tout", false, false), formal(primReal(), "tin", false, false), formal(primBoolean(), "atleast", false, false)); -#line 3076 "runtime.in" - addFunc(ve, run::gen236, primGuide(), "operator cast", formal(primTensionSpecifier(), "t", false, false)); -#line 3081 "runtime.in" - addFunc(ve, run::gen237, primGuide(), "operator controls", formal(primPair(), "zout", false, false), formal(primPair(), "zin", false, false)); -#line 3086 "runtime.in" - addFunc(ve, run::gen238, primInt(), "size", formal(primGuide(), "g", false, false)); -#line 3093 "runtime.in" - addFunc(ve, run::gen239, primInt(), "length", formal(primGuide(), "g", false, false)); -#line 3100 "runtime.in" - addFunc(ve, run::gen240, primBoolean(), "cyclic", formal(primGuide(), "g", false, false)); + REGISTER_BLTIN(run::tensionSpecifierAtleastPart,"tensionSpecifierAtleastPart"); +#line 3040 "runtime.in" + addFunc(ve, run::gen_runtime236, primGuide(), "operator cast", formal(primTensionSpecifier(), "t", false, false)); +#line 3045 "runtime.in" + addFunc(ve, run::gen_runtime237, primGuide(), "operator controls", formal(primPair(), "zout", false, false), formal(primPair(), "zin", false, false)); +#line 3050 "runtime.in" + addFunc(ve, run::gen_runtime238, primInt(), "size", formal(primGuide(), "g", false, false)); +#line 3057 "runtime.in" + addFunc(ve, run::gen_runtime239, primInt(), "length", formal(primGuide(), "g", false, false)); +#line 3064 "runtime.in" + addFunc(ve, run::gen_runtime240, primBoolean(), "cyclic", formal(primGuide(), "g", false, false)); +#line 3071 "runtime.in" + addFunc(ve, run::gen_runtime241, primPair(), "point", formal(primGuide(), "g", false, false), formal(primInt(), "t", false, false)); +#line 3078 "runtime.in" + addFunc(ve, run::gen_runtime242, pairArray(), "dirSpecifier", formal(primGuide(), "g", false, false), formal(primInt(), "t", false, false)); +#line 3090 "runtime.in" + addFunc(ve, run::gen_runtime243, pairArray(), "controlSpecifier", formal(primGuide(), "g", false, false), formal(primInt(), "t", false, false)); #line 3107 "runtime.in" - addFunc(ve, run::gen241, primPair(), "point", formal(primGuide(), "g", false, false), formal(primInt(), "t", false, false)); -#line 3114 "runtime.in" - addFunc(ve, run::gen242, pairArray(), "dirSpecifier", formal(primGuide(), "g", false, false), formal(primInt(), "t", false, false)); -#line 3126 "runtime.in" - addFunc(ve, run::gen243, pairArray(), "controlSpecifier", formal(primGuide(), "g", false, false), formal(primInt(), "t", false, false)); -#line 3143 "runtime.in" - addFunc(ve, run::gen244, primTensionSpecifier(), "tensionSpecifier", formal(primGuide(), "g", false, false), formal(primInt(), "t", false, false)); -#line 3153 "runtime.in" - addFunc(ve, run::gen245, realArray(), "curlSpecifier", formal(primGuide(), "g", false, false), formal(primInt(), "t", false, false)); -#line 3167 "runtime.in" - addFunc(ve, run::gen246, primGuide(), "reverse", formal(primGuide(), "g", false, false)); -#line 3221 "runtime.in" - addFunc(ve, run::gen247, primVoid(), "_draw", formal(primPicture(), "f", false, false), formal(primPath3(), "g", false, false), formal(primPen(), "p", false, false)); -#line 3230 "runtime.in" - addFunc(ve, run::gen248, primVoid(), "draw", formal(primPicture(), "f", false, false), formal(tripleArray2(), "g", false, false), formal(primBoolean(), "straight", false, false), formal(penArray() , "p", false, false), formal(primReal(), "opacity", false, false), formal(primReal(), "shininess", false, false), formal(primReal(), "granularity", false, false), formal(primTriple(), "normal", false, false), formal(primBoolean(), "lighton", false, false), formal(penArray() , "colors", false, false)); -#line 3238 "runtime.in" - addFunc(ve, run::gen249, primTriple(), "min3", formal(primPicture(), "f", false, false)); -#line 3243 "runtime.in" - addFunc(ve, run::gen250, primTriple(), "max3", formal(primPicture(), "f", false, false)); -#line 3248 "runtime.in" - addFunc(ve, run::gen251, primPair(), "min", formal(primPicture(), "f", false, false), formal(realArray2(), "t", false, false)); -#line 3256 "runtime.in" - addFunc(ve, run::gen252, primPair(), "max", formal(primPicture(), "f", false, false), formal(realArray2(), "t", false, false)); -#line 3264 "runtime.in" - addFunc(ve, run::gen253, primPair(), "minratio", formal(primPicture(), "f", false, false)); -#line 3269 "runtime.in" - addFunc(ve, run::gen254, primPair(), "maxratio", formal(primPicture(), "f", false, false)); -#line 3274 "runtime.in" - addFunc(ve, run::gen255, primTriple(), "minbezier", formal(tripleArray2(), "p", false, false), formal(primTriple(), "b", false, false)); -#line 3284 "runtime.in" - addFunc(ve, run::gen256, primTriple(), "maxbezier", formal(tripleArray2(), "p", false, false), formal(primTriple(), "b", false, false)); -#line 3294 "runtime.in" - addFunc(ve, run::gen257, primPair(), "minbezier", formal(tripleArray2(), "p", false, false), formal(realArray2(), "t", false, false), formal(primPair(), "b", false, false)); -#line 3306 "runtime.in" - addFunc(ve, run::gen258, primPair(), "maxbezier", formal(tripleArray2(), "p", false, false), formal(realArray2(), "t", false, false), formal(primPair(), "b", false, false)); -#line 3318 "runtime.in" - addFunc(ve, run::gen259, primPair(), "max", formal(primPath3(), "g", false, false), formal(realArray2(), "t", false, false)); -#line 3326 "runtime.in" - addFunc(ve, run::gen260, primPair(), "min", formal(primPath3(), "g", false, false), formal(realArray2(), "t", false, false)); -#line 3334 "runtime.in" - addFunc(ve, run::gen261, primReal(), "change2", formal(tripleArray2(), "a", false, false)); -#line 3356 "runtime.in" - addFunc(ve, run::gen262, primBoolean(), "is3D", formal(primPicture(), "f", false, false)); -#line 3361 "runtime.in" - addFunc(ve, run::gen263, primPair(), "bezier", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false), formal(primPair(), "c", false, false), formal(primPair(), "d", false, false), formal(primReal(), "t", false, false)); -#line 3368 "runtime.in" - addFunc(ve, run::gen264, primPair(), "bezierP", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false), formal(primPair(), "c", false, false), formal(primPair(), "d", false, false), formal(primReal(), "t", false, false)); -#line 3373 "runtime.in" - addFunc(ve, run::gen265, primPair(), "bezierPP", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false), formal(primPair(), "c", false, false), formal(primPair(), "d", false, false), formal(primReal(), "t", false, false)); -#line 3378 "runtime.in" - addFunc(ve, run::gen266, primPair(), "bezierPPP", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false), formal(primPair(), "c", false, false), formal(primPair(), "d", false, false)); -#line 3383 "runtime.in" - addFunc(ve, run::gen267, primTriple(), "bezier", formal(primTriple(), "a", false, false), formal(primTriple(), "b", false, false), formal(primTriple(), "c", false, false), formal(primTriple(), "d", false, false), formal(primReal(), "t", false, false)); -#line 3390 "runtime.in" - addFunc(ve, run::gen268, primTriple(), "bezierP", formal(primTriple(), "a", false, false), formal(primTriple(), "b", false, false), formal(primTriple(), "c", false, false), formal(primTriple(), "d", false, false), formal(primReal(), "t", false, false)); -#line 3395 "runtime.in" - addFunc(ve, run::gen269, primTriple(), "bezierPP", formal(primTriple(), "a", false, false), formal(primTriple(), "b", false, false), formal(primTriple(), "c", false, false), formal(primTriple(), "d", false, false), formal(primReal(), "t", false, false)); -#line 3400 "runtime.in" - addFunc(ve, run::gen270, primTriple(), "bezierPPP", formal(primTriple(), "a", false, false), formal(primTriple(), "b", false, false), formal(primTriple(), "c", false, false), formal(primTriple(), "d", false, false)); -#line 3413 "runtime.in" - addFunc(ve, run::gen272, primInt(), "length", formal(primString(), "s", false, false)); -#line 3418 "runtime.in" - addFunc(ve, run::gen273, primInt(), "find", formal(primString(), "s", false, false), formal(primString() , "t", false, false), formal(primInt(), "pos", true, false)); -#line 3424 "runtime.in" - addFunc(ve, run::gen274, primInt(), "rfind", formal(primString(), "s", false, false), formal(primString() , "t", false, false), formal(primInt(), "pos", true, false)); -#line 3430 "runtime.in" - addFunc(ve, run::gen275, primString() , "reverse", formal(primString() , "s", false, false)); + addFunc(ve, run::gen_runtime244, primTensionSpecifier(), "tensionSpecifier", formal(primGuide(), "g", false, false), formal(primInt(), "t", false, false)); +#line 3117 "runtime.in" + addFunc(ve, run::gen_runtime245, realArray(), "curlSpecifier", formal(primGuide(), "g", false, false), formal(primInt(), "t", false, false)); +#line 3131 "runtime.in" + addFunc(ve, run::gen_runtime246, primGuide(), "reverse", formal(primGuide(), "g", false, false)); +#line 3185 "runtime.in" + addFunc(ve, run::gen_runtime247, primVoid(), "_draw", formal(primPicture(), "f", false, false), formal(primPath3(), "g", false, false), formal(primPen(), "p", false, false)); +#line 3194 "runtime.in" + addFunc(ve, run::gen_runtime248, primVoid(), "draw", formal(primPicture(), "f", false, false), formal(tripleArray2(), "g", false, false), formal(primBoolean(), "straight", false, false), formal(penArray() , "p", false, false), formal(primReal(), "opacity", false, false), formal(primReal(), "shininess", false, false), formal(primReal(), "prcshininess", false, false), formal(primReal(), "granularity", false, false), formal(primTriple(), "normal", false, false), formal(primBoolean(), "lighton", false, false), formal(penArray() , "colors", false, false)); +#line 3202 "runtime.in" + addFunc(ve, run::gen_runtime249, primTriple(), "min3", formal(primPicture(), "f", false, false)); +#line 3207 "runtime.in" + addFunc(ve, run::gen_runtime250, primTriple(), "max3", formal(primPicture(), "f", false, false)); +#line 3212 "runtime.in" + addFunc(ve, run::gen_runtime251, primPair(), "minratio", formal(primPicture(), "f", false, false)); +#line 3217 "runtime.in" + addFunc(ve, run::gen_runtime252, primPair(), "maxratio", formal(primPicture(), "f", false, false)); +#line 3222 "runtime.in" + addFunc(ve, run::gen_runtime253, primTriple(), "minbezier", formal(tripleArray2(), "p", false, false), formal(primTriple(), "b", false, false)); +#line 3232 "runtime.in" + addFunc(ve, run::gen_runtime254, primTriple(), "maxbezier", formal(tripleArray2(), "p", false, false), formal(primTriple(), "b", false, false)); +#line 3242 "runtime.in" + addFunc(ve, run::gen_runtime255, primPair(), "minratio", formal(tripleArray2(), "p", false, false), formal(primPair(), "b", false, false)); +#line 3252 "runtime.in" + addFunc(ve, run::gen_runtime256, primPair(), "maxratio", formal(tripleArray2(), "p", false, false), formal(primPair(), "b", false, false)); +#line 3262 "runtime.in" + addFunc(ve, run::gen_runtime257, primPair(), "minratio", formal(primPath3(), "g", false, false)); +#line 3267 "runtime.in" + addFunc(ve, run::gen_runtime258, primPair(), "maxratio", formal(primPath3(), "g", false, false)); +#line 3272 "runtime.in" + addFunc(ve, run::gen_runtime259, primReal(), "norm", formal(realArray(), "a", false, false)); +#line 3283 "runtime.in" + addFunc(ve, run::gen_runtime260, primReal(), "norm", formal(realArray2(), "a", false, false)); +#line 3298 "runtime.in" + addFunc(ve, run::gen_runtime261, primReal(), "norm", formal(tripleArray2(), "a", false, false)); +#line 3313 "runtime.in" + addFunc(ve, run::gen_runtime262, primReal(), "change2", formal(tripleArray2(), "a", false, false)); +#line 3335 "runtime.in" + addFunc(ve, run::gen_runtime263, primBoolean(), "is3D", formal(primPicture(), "f", false, false)); +#line 3340 "runtime.in" + addFunc(ve, run::gen_runtime264, primPair(), "bezier", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false), formal(primPair(), "c", false, false), formal(primPair(), "d", false, false), formal(primReal(), "t", false, false)); +#line 3347 "runtime.in" + addFunc(ve, run::gen_runtime265, primPair(), "bezierP", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false), formal(primPair(), "c", false, false), formal(primPair(), "d", false, false), formal(primReal(), "t", false, false)); +#line 3352 "runtime.in" + addFunc(ve, run::gen_runtime266, primPair(), "bezierPP", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false), formal(primPair(), "c", false, false), formal(primPair(), "d", false, false), formal(primReal(), "t", false, false)); +#line 3357 "runtime.in" + addFunc(ve, run::gen_runtime267, primPair(), "bezierPPP", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false), formal(primPair(), "c", false, false), formal(primPair(), "d", false, false)); +#line 3362 "runtime.in" + addFunc(ve, run::gen_runtime268, primTriple(), "bezier", formal(primTriple(), "a", false, false), formal(primTriple(), "b", false, false), formal(primTriple(), "c", false, false), formal(primTriple(), "d", false, false), formal(primReal(), "t", false, false)); +#line 3369 "runtime.in" + addFunc(ve, run::gen_runtime269, primTriple(), "bezierP", formal(primTriple(), "a", false, false), formal(primTriple(), "b", false, false), formal(primTriple(), "c", false, false), formal(primTriple(), "d", false, false), formal(primReal(), "t", false, false)); +#line 3374 "runtime.in" + addFunc(ve, run::gen_runtime270, primTriple(), "bezierPP", formal(primTriple(), "a", false, false), formal(primTriple(), "b", false, false), formal(primTriple(), "c", false, false), formal(primTriple(), "d", false, false), formal(primReal(), "t", false, false)); +#line 3379 "runtime.in" + addFunc(ve, run::gen_runtime271, primTriple(), "bezierPPP", formal(primTriple(), "a", false, false), formal(primTriple(), "b", false, false), formal(primTriple(), "c", false, false), formal(primTriple(), "d", false, false)); +#line 3384 "runtime.in" + REGISTER_BLTIN(run::emptyString,"emptyString"); +#line 3392 "runtime.in" + addFunc(ve, run::gen_runtime273, primInt(), "length", formal(primString(), "s", false, false)); +#line 3397 "runtime.in" + addFunc(ve, run::gen_runtime274, primInt(), "find", formal(primString(), "s", false, false), formal(primString() , "t", false, false), formal(primInt(), "pos", true, false)); +#line 3403 "runtime.in" + addFunc(ve, run::gen_runtime275, primInt(), "rfind", formal(primString(), "s", false, false), formal(primString() , "t", false, false), formal(primInt(), "pos", true, false)); +#line 3409 "runtime.in" + addFunc(ve, run::gen_runtime276, primString() , "reverse", formal(primString() , "s", false, false)); +#line 3415 "runtime.in" + addFunc(ve, run::gen_runtime277, primString() , "insert", formal(primString() , "s", false, false), formal(primInt(), "pos", false, false), formal(primString() , "t", false, false)); +#line 3422 "runtime.in" + addFunc(ve, run::gen_runtime278, primString() , "substr", formal(primString(), "s", false, false), formal(primInt(), "pos", false, false), formal(primInt(), "n", true, false)); +#line 3429 "runtime.in" + addFunc(ve, run::gen_runtime279, primString() , "erase", formal(primString() , "s", false, false), formal(primInt(), "pos", false, false), formal(primInt(), "n", false, false)); #line 3436 "runtime.in" - addFunc(ve, run::gen276, primString() , "insert", formal(primString() , "s", false, false), formal(primInt(), "pos", false, false), formal(primString() , "t", false, false)); -#line 3443 "runtime.in" - addFunc(ve, run::gen277, primString() , "substr", formal(primString(), "s", false, false), formal(primInt(), "pos", false, false), formal(primInt(), "n", true, false)); -#line 3450 "runtime.in" - addFunc(ve, run::gen278, primString() , "erase", formal(primString() , "s", false, false), formal(primInt(), "pos", false, false), formal(primInt(), "n", false, false)); -#line 3457 "runtime.in" - addFunc(ve, run::gen279, primString() , "downcase", formal(primString() , "s", false, false)); -#line 3463 "runtime.in" - addFunc(ve, run::gen280, primString() , "upcase", formal(primString() , "s", false, false)); -#line 3469 "runtime.in" - addFunc(ve, run::gen281, primString() , "replace", formal(primString(), "s", false, false), formal(stringArray2(), "translate", false, false)); -#line 3496 "runtime.in" - addFunc(ve, run::gen282, primString() , "format", formal(primString(), "format", false, false), formal(primInt(), "x", false, false)); -#line 3511 "runtime.in" - addFunc(ve, run::gen283, primString() , "format", formal(primString(), "format", false, false), formal(primReal(), "x", false, false), formal(primString() , "locale", true, false)); -#line 3636 "runtime.in" - addFunc(ve, run::gen284, primInt(), "hex", formal(primString() , "s", false, false)); -#line 3647 "runtime.in" - addFunc(ve, run::gen285, primString() , "string", formal(primInt(), "x", false, false)); -#line 3654 "runtime.in" - addFunc(ve, run::gen286, primString() , "string", formal(primReal(), "x", false, false), formal(primInt(), "digits", true, false)); -#line 3662 "runtime.in" - addFunc(ve, run::gen287, primString() , "time", formal(primString() , "format", true, false)); -#line 3673 "runtime.in" - addFunc(ve, run::gen288, primString() , "time", formal(primInt(), "seconds", false, false), formal(primString() , "format", true, false)); -#line 3686 "runtime.in" - addFunc(ve, run::gen289, primInt(), "seconds", formal(primString() , "t", true, false), formal(primString() , "format", true, false)); -#line 3698 "runtime.in" - addFunc(ve, run::gen290, realArray(), "_cputime"); + addFunc(ve, run::gen_runtime280, primString() , "downcase", formal(primString() , "s", false, false)); +#line 3442 "runtime.in" + addFunc(ve, run::gen_runtime281, primString() , "upcase", formal(primString() , "s", false, false)); +#line 3448 "runtime.in" + addFunc(ve, run::gen_runtime282, primString() , "replace", formal(primString(), "s", false, false), formal(stringArray2(), "translate", false, false)); +#line 3475 "runtime.in" + addFunc(ve, run::gen_runtime283, primString() , "format", formal(primString(), "format", false, false), formal(primInt(), "x", false, false)); +#line 3490 "runtime.in" + addFunc(ve, run::gen_runtime284, primString() , "format", formal(primString(), "format", false, false), formal(primReal(), "x", false, false), formal(primString() , "locale", true, false)); +#line 3615 "runtime.in" + addFunc(ve, run::gen_runtime285, primInt(), "hex", formal(primString() , "s", false, false)); +#line 3626 "runtime.in" + addFunc(ve, run::gen_runtime286, primString() , "string", formal(primInt(), "x", false, false)); +#line 3633 "runtime.in" + addFunc(ve, run::gen_runtime287, primString() , "string", formal(primReal(), "x", false, false), formal(primInt(), "digits", true, false)); +#line 3641 "runtime.in" + addFunc(ve, run::gen_runtime288, primString() , "time", formal(primString() , "format", true, false)); +#line 3652 "runtime.in" + addFunc(ve, run::gen_runtime289, primString() , "time", formal(primInt(), "seconds", false, false), formal(primString() , "format", true, false)); +#line 3665 "runtime.in" + addFunc(ve, run::gen_runtime290, primInt(), "seconds", formal(primString() , "t", true, false), formal(primString() , "format", true, false)); +#line 3677 "runtime.in" + addFunc(ve, run::gen_runtime291, realArray(), "_cputime"); +#line 3691 "runtime.in" + addFunc(ve, run::gen_runtime292, primReal(), "^", formal(primReal(), "x", false, false), formal(primInt(), "y", false, false)); +#line 3699 "runtime.in" + addFunc(ve, run::gen_runtime293, primPair(), "^", formal(primPair(), "z", false, false), formal(primInt(), "y", false, false)); +#line 3704 "runtime.in" + addFunc(ve, run::gen_runtime294, primInt(), "quotient", formal(primInt(), "x", false, false), formal(primInt(), "y", false, false)); #line 3712 "runtime.in" - addFunc(ve, run::gen291, primReal(), "^", formal(primReal(), "x", false, false), formal(primInt(), "y", false, false)); -#line 3720 "runtime.in" - addFunc(ve, run::gen292, primPair(), "^", formal(primPair(), "z", false, false), formal(primInt(), "y", false, false)); -#line 3725 "runtime.in" - addFunc(ve, run::gen293, primInt(), "quotient", formal(primInt(), "x", false, false), formal(primInt(), "y", false, false)); -#line 3733 "runtime.in" - addFunc(ve, run::gen294, primInt(), "abs", formal(primInt(), "x", false, false)); + addFunc(ve, run::gen_runtime295, primInt(), "abs", formal(primInt(), "x", false, false)); +#line 3717 "runtime.in" + addFunc(ve, run::gen_runtime296, primInt(), "sgn", formal(primReal(), "x", false, false)); +#line 3722 "runtime.in" + addFunc(ve, run::gen_runtime297, primInt(), "rand"); +#line 3727 "runtime.in" + addFunc(ve, run::gen_runtime298, primVoid(), "srand", formal(primInt(), "seed", false, false)); +#line 3732 "runtime.in" + addFunc(ve, run::gen_runtime299, primReal(), "unitrand"); #line 3738 "runtime.in" - addFunc(ve, run::gen295, primInt(), "sgn", formal(primReal(), "x", false, false)); + addFunc(ve, run::gen_runtime300, primInt(), "ceil", formal(primReal(), "x", false, false)); #line 3743 "runtime.in" - addFunc(ve, run::gen296, primInt(), "rand"); + addFunc(ve, run::gen_runtime301, primInt(), "floor", formal(primReal(), "x", false, false)); #line 3748 "runtime.in" - addFunc(ve, run::gen297, primVoid(), "srand", formal(primInt(), "seed", false, false)); -#line 3753 "runtime.in" - addFunc(ve, run::gen298, primReal(), "unitrand"); + addFunc(ve, run::gen_runtime302, primInt(), "round", formal(primReal(), "x", false, false)); +#line 3754 "runtime.in" + addFunc(ve, run::gen_runtime303, primInt(), "Ceil", formal(primReal(), "x", false, false)); #line 3759 "runtime.in" - addFunc(ve, run::gen299, primInt(), "ceil", formal(primReal(), "x", false, false)); + addFunc(ve, run::gen_runtime304, primInt(), "Floor", formal(primReal(), "x", false, false)); #line 3764 "runtime.in" - addFunc(ve, run::gen300, primInt(), "floor", formal(primReal(), "x", false, false)); + addFunc(ve, run::gen_runtime305, primInt(), "Round", formal(primReal(), "x", false, false)); #line 3769 "runtime.in" - addFunc(ve, run::gen301, primInt(), "round", formal(primReal(), "x", false, false)); + addFunc(ve, run::gen_runtime306, primReal(), "fmod", formal(primReal(), "x", false, false), formal(primReal(), "y", false, false)); #line 3775 "runtime.in" - addFunc(ve, run::gen302, primInt(), "Ceil", formal(primReal(), "x", false, false)); + addFunc(ve, run::gen_runtime307, primReal(), "atan2", formal(primReal(), "y", false, false), formal(primReal(), "x", false, false)); #line 3780 "runtime.in" - addFunc(ve, run::gen303, primInt(), "Floor", formal(primReal(), "x", false, false)); + addFunc(ve, run::gen_runtime308, primReal(), "hypot", formal(primReal(), "x", false, false), formal(primReal(), "y", false, false)); #line 3785 "runtime.in" - addFunc(ve, run::gen304, primInt(), "Round", formal(primReal(), "x", false, false)); + addFunc(ve, run::gen_runtime309, primReal(), "remainder", formal(primReal(), "x", false, false), formal(primReal(), "y", false, false)); #line 3790 "runtime.in" - addFunc(ve, run::gen305, primReal(), "fmod", formal(primReal(), "x", false, false), formal(primReal(), "y", false, false)); -#line 3796 "runtime.in" - addFunc(ve, run::gen306, primReal(), "atan2", formal(primReal(), "y", false, false), formal(primReal(), "x", false, false)); -#line 3801 "runtime.in" - addFunc(ve, run::gen307, primReal(), "hypot", formal(primReal(), "x", false, false), formal(primReal(), "y", false, false)); -#line 3806 "runtime.in" - addFunc(ve, run::gen308, primReal(), "remainder", formal(primReal(), "x", false, false), formal(primReal(), "y", false, false)); -#line 3811 "runtime.in" - addFunc(ve, run::gen309, primReal(), "J", formal(primInt(), "n", false, false), formal(primReal(), "x", false, false)); -#line 3816 "runtime.in" - addFunc(ve, run::gen310, primReal(), "Y", formal(primInt(), "n", false, false), formal(primReal(), "x", false, false)); -#line 3821 "runtime.in" - addFunc(ve, run::gen311, primReal(), "erf", formal(primReal(), "x", false, false)); + addFunc(ve, run::gen_runtime310, primReal(), "J", formal(primInt(), "n", false, false), formal(primReal(), "x", false, false)); +#line 3795 "runtime.in" + addFunc(ve, run::gen_runtime311, primReal(), "Y", formal(primInt(), "n", false, false), formal(primReal(), "x", false, false)); +#line 3800 "runtime.in" + addFunc(ve, run::gen_runtime312, primReal(), "erf", formal(primReal(), "x", false, false)); +#line 3805 "runtime.in" + addFunc(ve, run::gen_runtime313, primReal(), "erfc", formal(primReal(), "x", false, false)); +#line 3810 "runtime.in" + addFunc(ve, run::gen_runtime314, primInt(), "factorial", formal(primInt(), "n", false, false)); +#line 3815 "runtime.in" + addFunc(ve, run::gen_runtime315, primInt(), "choose", formal(primInt(), "n", false, false), formal(primInt(), "k", false, false)); #line 3826 "runtime.in" - addFunc(ve, run::gen312, primReal(), "erfc", formal(primReal(), "x", false, false)); -#line 3831 "runtime.in" - addFunc(ve, run::gen313, primInt(), "factorial", formal(primInt(), "n", false, false)); + addFunc(ve, run::gen_runtime316, primReal(), "gamma", formal(primReal(), "x", false, false)); #line 3836 "runtime.in" - addFunc(ve, run::gen314, primInt(), "choose", formal(primInt(), "n", false, false), formal(primInt(), "k", false, false)); -#line 3847 "runtime.in" - addFunc(ve, run::gen315, primReal(), "gamma", formal(primReal(), "x", false, false)); -#line 3857 "runtime.in" - addFunc(ve, run::gen316, primPair(), "gamma", formal(primPair(), "z", false, true)); -#line 3863 "runtime.in" - addFunc(ve, run::gen317, realArray(), "quadraticroots", formal(primReal(), "a", false, false), formal(primReal(), "b", false, false), formal(primReal(), "c", false, false)); -#line 3872 "runtime.in" - addFunc(ve, run::gen318, pairArray(), "quadraticroots", formal(primPair(), "a", false, true), formal(primPair(), "b", false, true), formal(primPair(), "c", false, true)); -#line 3881 "runtime.in" - addFunc(ve, run::gen319, realArray(), "cubicroots", formal(primReal(), "a", false, false), formal(primReal(), "b", false, false), formal(primReal(), "c", false, false), formal(primReal(), "d", false, false)); -#line 3891 "runtime.in" - addFunc(ve, run::gen320, primBoolean(), "==", formal(primTransform(), "a", false, false), formal(primTransform(), "b", false, false)); -#line 3899 "runtime.in" - addFunc(ve, run::gen321, primBoolean(), "!=", formal(primTransform(), "a", false, false), formal(primTransform(), "b", false, false)); -#line 3904 "runtime.in" - addFunc(ve, run::gen322, primTransform(), "+", formal(primTransform(), "a", false, false), formal(primTransform(), "b", false, false)); -#line 3909 "runtime.in" - addFunc(ve, run::gen323, primTransform(), "*", formal(primTransform(), "a", false, false), formal(primTransform(), "b", false, false)); -#line 3914 "runtime.in" - addFunc(ve, run::gen324, primPair(), "*", formal(primTransform(), "t", false, false), formal(primPair(), "z", false, false)); -#line 3919 "runtime.in" - addFunc(ve, run::gen325, primPath(), "*", formal(primTransform(), "t", false, false), formal(primPath(), "g", false, false)); -#line 3924 "runtime.in" - addFunc(ve, run::gen326, primPen(), "*", formal(primTransform(), "t", false, false), formal(primPen(), "p", false, false)); + addFunc(ve, run::gen_runtime317, primPair(), "gamma", formal(primPair(), "z", false, true)); +#line 3842 "runtime.in" + addFunc(ve, run::gen_runtime318, realArray(), "quadraticroots", formal(primReal(), "a", false, false), formal(primReal(), "b", false, false), formal(primReal(), "c", false, false)); +#line 3851 "runtime.in" + addFunc(ve, run::gen_runtime319, pairArray(), "quadraticroots", formal(primPair(), "a", false, true), formal(primPair(), "b", false, true), formal(primPair(), "c", false, true)); +#line 3860 "runtime.in" + addFunc(ve, run::gen_runtime320, realArray(), "cubicroots", formal(primReal(), "a", false, false), formal(primReal(), "b", false, false), formal(primReal(), "c", false, false), formal(primReal(), "d", false, false)); +#line 3870 "runtime.in" + addFunc(ve, run::gen_runtime321, primBoolean(), "==", formal(primTransform(), "a", false, false), formal(primTransform(), "b", false, false)); +#line 3878 "runtime.in" + addFunc(ve, run::gen_runtime322, primBoolean(), "!=", formal(primTransform(), "a", false, false), formal(primTransform(), "b", false, false)); +#line 3883 "runtime.in" + addFunc(ve, run::gen_runtime323, primTransform(), "+", formal(primTransform(), "a", false, false), formal(primTransform(), "b", false, false)); +#line 3888 "runtime.in" + addFunc(ve, run::gen_runtime324, primTransform(), "*", formal(primTransform(), "a", false, false), formal(primTransform(), "b", false, false)); +#line 3893 "runtime.in" + addFunc(ve, run::gen_runtime325, primPair(), "*", formal(primTransform(), "t", false, false), formal(primPair(), "z", false, false)); +#line 3898 "runtime.in" + addFunc(ve, run::gen_runtime326, primPath(), "*", formal(primTransform(), "t", false, false), formal(primPath(), "g", false, false)); +#line 3903 "runtime.in" + addFunc(ve, run::gen_runtime327, primPen(), "*", formal(primTransform(), "t", false, false), formal(primPen(), "p", false, false)); +#line 3908 "runtime.in" + addFunc(ve, run::gen_runtime328, primPicture(), "*", formal(primTransform(), "t", false, false), formal(primPicture(), "f", false, false)); +#line 3913 "runtime.in" + addFunc(ve, run::gen_runtime329, primPicture(), "*", formal(realArray2(), "t", false, false), formal(primPicture(), "f", false, false)); +#line 3918 "runtime.in" + addFunc(ve, run::gen_runtime330, primTransform(), "^", formal(primTransform(), "t", false, false), formal(primInt(), "n", false, false)); #line 3929 "runtime.in" - addFunc(ve, run::gen327, primPicture(), "*", formal(primTransform(), "t", false, false), formal(primPicture(), "f", false, false)); + REGISTER_BLTIN(run::transformXPart,"transformXPart"); #line 3934 "runtime.in" - addFunc(ve, run::gen328, primPicture(), "*", formal(realArray2(), "t", false, false), formal(primPicture(), "f", false, false)); + REGISTER_BLTIN(run::transformYPart,"transformYPart"); #line 3939 "runtime.in" - addFunc(ve, run::gen329, primTransform(), "^", formal(primTransform(), "t", false, false), formal(primInt(), "n", false, false)); -#line 3986 "runtime.in" - addFunc(ve, run::gen337, primTransform(), "shift", formal(primTransform(), "t", false, false)); -#line 3991 "runtime.in" - addFunc(ve, run::gen338, primTransform(), "shiftless", formal(primTransform(), "t", false, false)); -#line 3996 "runtime.in" + REGISTER_BLTIN(run::transformXXPart,"transformXXPart"); +#line 3944 "runtime.in" + REGISTER_BLTIN(run::transformXYPart,"transformXYPart"); +#line 3949 "runtime.in" + REGISTER_BLTIN(run::transformYXPart,"transformYXPart"); +#line 3954 "runtime.in" + REGISTER_BLTIN(run::transformYYPart,"transformYYPart"); +#line 3959 "runtime.in" + REGISTER_BLTIN(run::real6ToTransform,"real6ToTransform"); +#line 3965 "runtime.in" + addFunc(ve, run::gen_runtime338, primTransform(), "shift", formal(primTransform(), "t", false, false)); +#line 3970 "runtime.in" + addFunc(ve, run::gen_runtime339, primTransform(), "shiftless", formal(primTransform(), "t", false, false)); +#line 3975 "runtime.in" addFunc(ve, run::transformIdentity, primTransform(), "identity"); -#line 4001 "runtime.in" - addFunc(ve, run::gen340, primTransform(), "inverse", formal(primTransform(), "t", false, false)); -#line 4006 "runtime.in" - addFunc(ve, run::gen341, primTransform(), "shift", formal(primPair(), "z", false, false)); -#line 4011 "runtime.in" - addFunc(ve, run::gen342, primTransform(), "shift", formal(primReal(), "x", false, false), formal(primReal(), "y", false, false)); -#line 4016 "runtime.in" - addFunc(ve, run::gen343, primTransform(), "xscale", formal(primReal(), "x", false, false)); -#line 4021 "runtime.in" - addFunc(ve, run::gen344, primTransform(), "yscale", formal(primReal(), "y", false, false)); -#line 4026 "runtime.in" - addFunc(ve, run::gen345, primTransform(), "scale", formal(primReal(), "x", false, false)); -#line 4031 "runtime.in" - addFunc(ve, run::gen346, primTransform(), "scale", formal(primReal(), "x", false, false), formal(primReal(), "y", false, false)); -#line 4036 "runtime.in" - addFunc(ve, run::gen347, primTransform(), "slant", formal(primReal(), "s", false, false)); -#line 4041 "runtime.in" - addFunc(ve, run::gen348, primTransform(), "rotate", formal(primReal(), "angle", false, false), formal(primPair(), "z", true, false)); -#line 4046 "runtime.in" - addFunc(ve, run::gen349, primTransform(), "reflect", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false)); -#line 4069 "runtime.in" +#line 3980 "runtime.in" + addFunc(ve, run::gen_runtime341, primTransform(), "inverse", formal(primTransform(), "t", false, false)); +#line 3985 "runtime.in" + addFunc(ve, run::gen_runtime342, primTransform(), "shift", formal(primPair(), "z", false, false)); +#line 3990 "runtime.in" + addFunc(ve, run::gen_runtime343, primTransform(), "shift", formal(primReal(), "x", false, false), formal(primReal(), "y", false, false)); +#line 3995 "runtime.in" + addFunc(ve, run::gen_runtime344, primTransform(), "xscale", formal(primReal(), "x", false, false)); +#line 4000 "runtime.in" + addFunc(ve, run::gen_runtime345, primTransform(), "yscale", formal(primReal(), "y", false, false)); +#line 4005 "runtime.in" + addFunc(ve, run::gen_runtime346, primTransform(), "scale", formal(primReal(), "x", false, false)); +#line 4010 "runtime.in" + addFunc(ve, run::gen_runtime347, primTransform(), "scale", formal(primReal(), "x", false, false), formal(primReal(), "y", false, false)); +#line 4015 "runtime.in" + addFunc(ve, run::gen_runtime348, primTransform(), "slant", formal(primReal(), "s", false, false)); +#line 4020 "runtime.in" + addFunc(ve, run::gen_runtime349, primTransform(), "rotate", formal(primReal(), "angle", false, false), formal(primPair(), "z", true, false)); +#line 4025 "runtime.in" + addFunc(ve, run::gen_runtime350, primTransform(), "reflect", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false)); +#line 4030 "runtime.in" + REGISTER_BLTIN(run::pairZero,"pairZero"); +#line 4038 "runtime.in" + REGISTER_BLTIN(run::realRealToPair,"realRealToPair"); +#line 4043 "runtime.in" + REGISTER_BLTIN(run::pairNegate,"pairNegate"); +#line 4048 "runtime.in" addFunc(ve, run::pairXPart, primReal(), "xpart", formal(primPair(), "z", false, false)); -#line 4074 "runtime.in" +#line 4053 "runtime.in" addFunc(ve, run::pairYPart, primReal(), "ypart", formal(primPair(), "z", false, false)); -#line 4079 "runtime.in" - addFunc(ve, run::gen355, primReal(), "length", formal(primPair(), "z", false, false)); -#line 4084 "runtime.in" - addFunc(ve, run::gen356, primReal(), "abs", formal(primPair(), "z", false, false)); -#line 4089 "runtime.in" - addFunc(ve, run::gen357, primPair(), "sqrt", formal(primPair(), "z", false, true)); -#line 4094 "runtime.in" - addFunc(ve, run::gen358, primReal(), "angle", formal(primPair(), "z", false, false), formal(primBoolean(), "warn", true, false)); -#line 4101 "runtime.in" - addFunc(ve, run::gen359, primReal(), "degrees", formal(primPair(), "z", false, false), formal(primBoolean(), "warn", true, false)); -#line 4108 "runtime.in" - addFunc(ve, run::gen360, primReal(), "radians", formal(primReal(), "degrees", false, false)); -#line 4114 "runtime.in" - addFunc(ve, run::gen361, primReal(), "degrees", formal(primReal(), "radians", false, false)); +#line 4058 "runtime.in" + addFunc(ve, run::gen_runtime356, primReal(), "length", formal(primPair(), "z", false, false)); +#line 4063 "runtime.in" + addFunc(ve, run::gen_runtime357, primReal(), "abs", formal(primPair(), "z", false, false)); +#line 4068 "runtime.in" + addFunc(ve, run::gen_runtime358, primPair(), "sqrt", formal(primPair(), "z", false, true)); +#line 4073 "runtime.in" + addFunc(ve, run::gen_runtime359, primReal(), "angle", formal(primPair(), "z", false, false), formal(primBoolean(), "warn", true, false)); +#line 4080 "runtime.in" + addFunc(ve, run::gen_runtime360, primReal(), "degrees", formal(primPair(), "z", false, false), formal(primBoolean(), "warn", true, false)); +#line 4087 "runtime.in" + addFunc(ve, run::gen_runtime361, primReal(), "radians", formal(primReal(), "degrees", false, false)); +#line 4093 "runtime.in" + addFunc(ve, run::gen_runtime362, primReal(), "degrees", formal(primReal(), "radians", false, false)); +#line 4099 "runtime.in" + addFunc(ve, run::gen_runtime363, primReal(), "Degrees", formal(primReal(), "radians", false, false)); +#line 4105 "runtime.in" + addFunc(ve, run::gen_runtime364, primReal(), "Sin", formal(primReal(), "deg", false, false)); +#line 4110 "runtime.in" + addFunc(ve, run::gen_runtime365, primReal(), "Cos", formal(primReal(), "deg", false, false)); +#line 4115 "runtime.in" + addFunc(ve, run::gen_runtime366, primReal(), "Tan", formal(primReal(), "deg", false, false)); #line 4120 "runtime.in" - addFunc(ve, run::gen362, primReal(), "Degrees", formal(primReal(), "radians", false, false)); -#line 4126 "runtime.in" - addFunc(ve, run::gen363, primReal(), "Sin", formal(primReal(), "deg", false, false)); -#line 4131 "runtime.in" - addFunc(ve, run::gen364, primReal(), "Cos", formal(primReal(), "deg", false, false)); -#line 4136 "runtime.in" - addFunc(ve, run::gen365, primReal(), "Tan", formal(primReal(), "deg", false, false)); -#line 4141 "runtime.in" - addFunc(ve, run::gen366, primReal(), "aSin", formal(primReal(), "x", false, false)); -#line 4146 "runtime.in" - addFunc(ve, run::gen367, primReal(), "aCos", formal(primReal(), "x", false, false)); -#line 4151 "runtime.in" - addFunc(ve, run::gen368, primReal(), "aTan", formal(primReal(), "x", false, false)); -#line 4156 "runtime.in" - addFunc(ve, run::gen369, primPair(), "unit", formal(primPair(), "z", false, false)); -#line 4161 "runtime.in" - addFunc(ve, run::gen370, primPair(), "dir", formal(primReal(), "degrees", false, false)); -#line 4166 "runtime.in" - addFunc(ve, run::gen371, primPair(), "dir", formal(primPair(), "z", false, true)); -#line 4171 "runtime.in" - addFunc(ve, run::gen372, primPair(), "expi", formal(primReal(), "angle", false, false)); -#line 4176 "runtime.in" - addFunc(ve, run::gen373, primPair(), "exp", formal(primPair(), "z", false, true)); -#line 4181 "runtime.in" - addFunc(ve, run::gen374, primPair(), "log", formal(primPair(), "z", false, true)); -#line 4186 "runtime.in" - addFunc(ve, run::gen375, primPair(), "sin", formal(primPair(), "z", false, true)); -#line 4191 "runtime.in" - addFunc(ve, run::gen376, primPair(), "cos", formal(primPair(), "z", false, true)); + addFunc(ve, run::gen_runtime367, primReal(), "aSin", formal(primReal(), "x", false, false)); +#line 4125 "runtime.in" + addFunc(ve, run::gen_runtime368, primReal(), "aCos", formal(primReal(), "x", false, false)); +#line 4130 "runtime.in" + addFunc(ve, run::gen_runtime369, primReal(), "aTan", formal(primReal(), "x", false, false)); +#line 4135 "runtime.in" + addFunc(ve, run::gen_runtime370, primPair(), "unit", formal(primPair(), "z", false, false)); +#line 4140 "runtime.in" + addFunc(ve, run::gen_runtime371, primPair(), "dir", formal(primReal(), "degrees", false, false)); +#line 4145 "runtime.in" + addFunc(ve, run::gen_runtime372, primPair(), "dir", formal(primPair(), "z", false, true)); +#line 4150 "runtime.in" + addFunc(ve, run::gen_runtime373, primPair(), "expi", formal(primReal(), "angle", false, false)); +#line 4155 "runtime.in" + addFunc(ve, run::gen_runtime374, primPair(), "exp", formal(primPair(), "z", false, true)); +#line 4160 "runtime.in" + addFunc(ve, run::gen_runtime375, primPair(), "log", formal(primPair(), "z", false, true)); +#line 4165 "runtime.in" + addFunc(ve, run::gen_runtime376, primPair(), "sin", formal(primPair(), "z", false, true)); +#line 4170 "runtime.in" + addFunc(ve, run::gen_runtime377, primPair(), "cos", formal(primPair(), "z", false, true)); +#line 4175 "runtime.in" + addFunc(ve, run::gen_runtime378, primPair(), "conj", formal(primPair(), "z", false, false)); +#line 4180 "runtime.in" + addFunc(ve, run::gen_runtime379, primPair(), "realmult", formal(primPair(), "z", false, false), formal(primPair(), "w", false, false)); +#line 4185 "runtime.in" + addFunc(ve, run::gen_runtime380, primTriple(), "realmult", formal(primTriple(), "u", false, false), formal(primTriple(), "v", false, false)); +#line 4190 "runtime.in" + addFunc(ve, run::gen_runtime381, primReal(), "dot", formal(primPair(), "z", false, true), formal(primPair(), "w", false, true)); #line 4196 "runtime.in" - addFunc(ve, run::gen377, primPair(), "conj", formal(primPair(), "z", false, false)); -#line 4201 "runtime.in" - addFunc(ve, run::gen378, primPair(), "realmult", formal(primPair(), "z", false, false), formal(primPair(), "w", false, false)); -#line 4206 "runtime.in" - addFunc(ve, run::gen379, primTriple(), "realmult", formal(primTriple(), "u", false, false), formal(primTriple(), "v", false, false)); -#line 4211 "runtime.in" - addFunc(ve, run::gen380, primReal(), "dot", formal(primPair(), "z", false, true), formal(primPair(), "w", false, true)); -#line 4231 "runtime.in" + REGISTER_BLTIN(run::tripleZero,"tripleZero"); +#line 4205 "runtime.in" + REGISTER_BLTIN(run::realRealRealToTriple,"realRealRealToTriple"); +#line 4210 "runtime.in" addFunc(ve, run::tripleXPart, primReal(), "xpart", formal(primTriple(), "v", false, false)); -#line 4236 "runtime.in" +#line 4215 "runtime.in" addFunc(ve, run::tripleYPart, primReal(), "ypart", formal(primTriple(), "v", false, false)); -#line 4241 "runtime.in" +#line 4220 "runtime.in" addFunc(ve, run::tripleZPart, primReal(), "zpart", formal(primTriple(), "v", false, false)); -#line 4246 "runtime.in" - addFunc(ve, run::gen386, primTriple(), "*", formal(primReal(), "x", false, false), formal(primTriple(), "v", false, false)); -#line 4251 "runtime.in" - addFunc(ve, run::gen387, primTriple(), "*", formal(primTriple(), "v", false, false), formal(primReal(), "x", false, false)); +#line 4225 "runtime.in" + addFunc(ve, run::gen_runtime387, primTriple(), "*", formal(primReal(), "x", false, false), formal(primTriple(), "v", false, false)); +#line 4230 "runtime.in" + addFunc(ve, run::gen_runtime388, primTriple(), "*", formal(primTriple(), "v", false, false), formal(primReal(), "x", false, false)); +#line 4235 "runtime.in" + addFunc(ve, run::gen_runtime389, primTriple(), "/", formal(primTriple(), "v", false, false), formal(primReal(), "x", false, false)); +#line 4240 "runtime.in" + addFunc(ve, run::gen_runtime390, primReal(), "length", formal(primTriple(), "v", false, false)); +#line 4245 "runtime.in" + addFunc(ve, run::gen_runtime391, primReal(), "abs", formal(primTriple(), "v", false, false)); +#line 4250 "runtime.in" + addFunc(ve, run::gen_runtime392, primReal(), "polar", formal(primTriple(), "v", false, false), formal(primBoolean(), "warn", true, false)); #line 4256 "runtime.in" - addFunc(ve, run::gen388, primTriple(), "/", formal(primTriple(), "v", false, false), formal(primReal(), "x", false, false)); -#line 4261 "runtime.in" - addFunc(ve, run::gen389, primReal(), "length", formal(primTriple(), "v", false, false)); -#line 4266 "runtime.in" - addFunc(ve, run::gen390, primReal(), "abs", formal(primTriple(), "v", false, false)); -#line 4271 "runtime.in" - addFunc(ve, run::gen391, primReal(), "polar", formal(primTriple(), "v", false, false), formal(primBoolean(), "warn", true, false)); -#line 4277 "runtime.in" - addFunc(ve, run::gen392, primReal(), "azimuth", formal(primTriple(), "v", false, false), formal(primBoolean(), "warn", true, false)); -#line 4283 "runtime.in" - addFunc(ve, run::gen393, primReal(), "colatitude", formal(primTriple(), "v", false, false), formal(primBoolean(), "warn", true, false)); -#line 4289 "runtime.in" - addFunc(ve, run::gen394, primReal(), "latitude", formal(primTriple(), "v", false, false), formal(primBoolean(), "warn", true, false)); -#line 4295 "runtime.in" - addFunc(ve, run::gen395, primReal(), "longitude", formal(primTriple(), "v", false, false), formal(primBoolean(), "warn", true, false)); -#line 4302 "runtime.in" - addFunc(ve, run::gen396, primTriple(), "unit", formal(primTriple(), "v", false, false)); -#line 4307 "runtime.in" - addFunc(ve, run::gen397, primReal(), "dot", formal(primTriple(), "u", false, false), formal(primTriple(), "v", false, false)); -#line 4312 "runtime.in" - addFunc(ve, run::gen398, primTriple(), "cross", formal(primTriple(), "u", false, false), formal(primTriple(), "v", false, false)); -#line 4317 "runtime.in" - addFunc(ve, run::gen399, primTriple(), "expi", formal(primReal(), "polar", false, false), formal(primReal(), "azimuth", false, false)); -#line 4322 "runtime.in" - addFunc(ve, run::gen400, primTriple(), "dir", formal(primReal(), "colatitude", false, false), formal(primReal(), "longitude", false, false)); -#line 4327 "runtime.in" - addFunc(ve, run::gen401, primVoid(), "atupdate", formal(voidFunction(), "f", false, false)); -#line 4335 "runtime.in" - addFunc(ve, run::gen402, voidFunction(), "atupdate"); -#line 4340 "runtime.in" - addFunc(ve, run::gen403, primVoid(), "atexit", formal(voidFunction(), "f", false, false)); -#line 4345 "runtime.in" - addFunc(ve, run::gen404, voidFunction(), "atexit"); -#line 4350 "runtime.in" - addFunc(ve, run::gen405, primVoid(), "atbreakpoint", formal(breakpointFunction(), "f", false, false)); -#line 4355 "runtime.in" - addFunc(ve, run::gen406, primVoid(), "breakpoint", formal(primCode(), "s", true, false)); -#line 4360 "runtime.in" - addFunc(ve, run::gen407, primString() , "locatefile", formal(primString() , "file", false, false)); -#line 4365 "runtime.in" - addFunc(ve, run::gen408, primVoid(), "stop", formal(primString() , "file", false, false), formal(primInt(), "line", false, false), formal(primCode(), "s", true, false)); -#line 4373 "runtime.in" - addFunc(ve, run::gen409, primVoid(), "breakpoints"); + addFunc(ve, run::gen_runtime393, primReal(), "azimuth", formal(primTriple(), "v", false, false), formal(primBoolean(), "warn", true, false)); +#line 4262 "runtime.in" + addFunc(ve, run::gen_runtime394, primReal(), "colatitude", formal(primTriple(), "v", false, false), formal(primBoolean(), "warn", true, false)); +#line 4268 "runtime.in" + addFunc(ve, run::gen_runtime395, primReal(), "latitude", formal(primTriple(), "v", false, false), formal(primBoolean(), "warn", true, false)); +#line 4274 "runtime.in" + addFunc(ve, run::gen_runtime396, primReal(), "longitude", formal(primTriple(), "v", false, false), formal(primBoolean(), "warn", true, false)); +#line 4281 "runtime.in" + addFunc(ve, run::gen_runtime397, primTriple(), "unit", formal(primTriple(), "v", false, false)); +#line 4286 "runtime.in" + addFunc(ve, run::gen_runtime398, primReal(), "dot", formal(primTriple(), "u", false, false), formal(primTriple(), "v", false, false)); +#line 4291 "runtime.in" + addFunc(ve, run::gen_runtime399, primTriple(), "cross", formal(primTriple(), "u", false, false), formal(primTriple(), "v", false, false)); +#line 4296 "runtime.in" + addFunc(ve, run::gen_runtime400, primTriple(), "dir", formal(primTriple(), "z", false, true)); +#line 4301 "runtime.in" + addFunc(ve, run::gen_runtime401, primTriple(), "expi", formal(primReal(), "polar", false, false), formal(primReal(), "azimuth", false, false)); +#line 4306 "runtime.in" + addFunc(ve, run::gen_runtime402, primTriple(), "dir", formal(primReal(), "colatitude", false, false), formal(primReal(), "longitude", false, false)); +#line 4311 "runtime.in" + addFunc(ve, run::gen_runtime403, primVoid(), "atupdate", formal(voidFunction(), "f", false, false)); +#line 4319 "runtime.in" + addFunc(ve, run::gen_runtime404, voidFunction(), "atupdate"); +#line 4324 "runtime.in" + addFunc(ve, run::gen_runtime405, primVoid(), "atexit", formal(voidFunction(), "f", false, false)); +#line 4329 "runtime.in" + addFunc(ve, run::gen_runtime406, voidFunction(), "atexit"); +#line 4334 "runtime.in" + addFunc(ve, run::gen_runtime407, primVoid(), "atbreakpoint", formal(breakpointFunction(), "f", false, false)); +#line 4339 "runtime.in" + addFunc(ve, run::gen_runtime408, primVoid(), "breakpoint", formal(primCode(), "s", true, false)); +#line 4344 "runtime.in" + addFunc(ve, run::gen_runtime409, primString() , "locatefile", formal(primString() , "file", false, false)); +#line 4349 "runtime.in" + addFunc(ve, run::gen_runtime410, primVoid(), "stop", formal(primString() , "file", false, false), formal(primInt(), "line", false, false), formal(primCode(), "s", true, false)); +#line 4357 "runtime.in" + addFunc(ve, run::gen_runtime411, primVoid(), "breakpoints"); +#line 4363 "runtime.in" + addFunc(ve, run::gen_runtime412, primVoid(), "clear", formal(primString() , "file", false, false), formal(primInt(), "line", false, false)); +#line 4369 "runtime.in" + addFunc(ve, run::gen_runtime413, primVoid(), "clear"); +#line 4374 "runtime.in" + addFunc(ve, run::gen_runtime414, primVoid(), "warn", formal(primString() , "s", false, false)); #line 4379 "runtime.in" - addFunc(ve, run::gen410, primVoid(), "clear", formal(primString() , "file", false, false), formal(primInt(), "line", false, false)); -#line 4385 "runtime.in" - addFunc(ve, run::gen411, primVoid(), "clear"); -#line 4390 "runtime.in" - addFunc(ve, run::gen412, primVoid(), "warn", formal(primString() , "s", false, false)); -#line 4395 "runtime.in" - addFunc(ve, run::gen413, primVoid(), "nowarn", formal(primString() , "s", false, false)); -#line 4400 "runtime.in" - addFunc(ve, run::gen414, primString() , "stripdirectory", formal(primString(), "s", false, false)); -#line 4406 "runtime.in" - addFunc(ve, run::gen415, primString() , "stripfile", formal(primString(), "s", false, false)); -#line 4412 "runtime.in" - addFunc(ve, run::gen416, primString() , "stripextension", formal(primString(), "s", false, false)); -#line 4418 "runtime.in" - addFunc(ve, run::gen417, primInt(), "convert", formal(primString() , "args", true, false), formal(primString() , "file", true, false), formal(primString() , "format", true, false)); -#line 4437 "runtime.in" - addFunc(ve, run::gen418, primInt(), "animate", formal(primString() , "args", true, false), formal(primString() , "file", true, false), formal(primString() , "format", true, false)); -#line 4454 "runtime.in" - addFunc(ve, run::gen419, primInt(), "delete", formal(primString(), "s", false, false)); -#line 4464 "runtime.in" - addFunc(ve, run::gen420, primInt(), "rename", formal(primString(), "from", false, false), formal(primString(), "to", false, false)); -#line 4763 "runtime.in" - addFunc(ve, run::gen451, IntArray(), "complement", formal(IntArray(), "a", false, false), formal(primInt(), "n", false, false)); -#line 4795 "runtime.in" - addFunc(ve, run::gen453, IntArray(), "sequence", formal(primInt(), "n", false, false)); -#line 4828 "runtime.in" - addFunc(ve, run::gen456, primBoolean(), "all", formal(boolArray(), "a", false, false)); -#line 4837 "runtime.in" - addFunc(ve, run::gen457, boolArray(), "!", formal(boolArray(), "a", false, false)); -#line 4846 "runtime.in" - addFunc(ve, run::gen458, primInt(), "sum", formal(boolArray(), "a", false, false)); -#line 5009 "runtime.in" - addFunc(ve, run::gen465, primInt(), "find", formal(boolArray(), "a", false, false), formal(primInt(), "n", true, false)); -#line 5054 "runtime.in" - addFunc(ve, run::gen467, realArray2(), "identity", formal(primInt(), "n", false, false)); -#line 5077 "runtime.in" - addFunc(ve, run::gen469, realArray2(), "inverse", formal(realArray2(), "a", false, false)); -#line 5169 "runtime.in" - addFunc(ve, run::gen470, realArray(), "solve", formal(realArray2(), "a", false, false), formal(realArray(), "b", false, false), formal(primBoolean(), "warn", true, false)); -#line 5220 "runtime.in" - addFunc(ve, run::gen471, realArray2(), "solve", formal(realArray2(), "a", false, false), formal(realArray2(), "b", false, false), formal(primBoolean(), "warn", true, false)); -#line 5284 "runtime.in" - addFunc(ve, run::gen472, primReal(), "determinant", formal(realArray2(), "a", false, false)); -#line 5300 "runtime.in" - addFunc(ve, run::gen473, realArray(), "*", formal(realArray2(), "a", false, false), formal(realArray(), "b", false, false)); -#line 5318 "runtime.in" - addFunc(ve, run::gen474, realArray(), "*", formal(realArray(), "a", false, false), formal(realArray2(), "b", false, false)); -#line 5346 "runtime.in" - addFunc(ve, run::gen475, realArray2(), "*", formal(realArray2(), "a", false, false), formal(realArray2(), "b", false, false)); -#line 5381 "runtime.in" - addFunc(ve, run::gen476, primTriple(), "*", formal(realArray2(), "t", false, false), formal(primTriple(), "v", false, false)); -#line 5386 "runtime.in" - addFunc(ve, run::gen477, primPair(), "project", formal(primTriple(), "v", false, false), formal(realArray2(), "t", false, false)); -#line 5411 "runtime.in" - addFunc(ve, run::gen478, primReal(), "dot", formal(realArray(), "a", false, false), formal(realArray(), "b", false, false)); -#line 5421 "runtime.in" - addFunc(ve, run::gen479, realArray(), "tridiagonal", formal(realArray(), "a", false, false), formal(realArray(), "b", false, false), formal(realArray(), "c", false, false), formal(realArray(), "f", false, false)); -#line 5525 "runtime.in" - addFunc(ve, run::gen480, primReal(), "newton", formal(primInt(), "iterations", true, false), formal(realRealFunction(), "f", false, false), formal(realRealFunction(), "fprime", false, false), formal(primReal(), "x", false, false), formal(primBoolean(), "verbose", true, false)); -#line 5572 "runtime.in" - addFunc(ve, run::gen481, primReal(), "newton", formal(primInt(), "iterations", true, false), formal(realRealFunction(), "f", false, false), formal(realRealFunction(), "fprime", false, false), formal(primReal(), "x1", false, false), formal(primReal(), "x2", false, false), formal(primBoolean(), "verbose", true, false)); -#line 5654 "runtime.in" - addFunc(ve, run::gen482, primReal(), "simpson", formal(realRealFunction(), "f", false, false), formal(primReal(), "a", false, false), formal(primReal(), "b", false, false), formal(primReal(), "acc", true, false), formal(primReal(), "dxmax", true, false)); -#line 5696 "runtime.in" - addFunc(ve, run::gen484, IntArray2(), "triangulate", formal(pairArray(), "z", false, false)); -#line 5731 "runtime.in" - addFunc(ve, run::gen485, primBoolean(), "==", formal(primFile(), "a", false, false), formal(primFile(), "b", false, false)); -#line 5739 "runtime.in" - addFunc(ve, run::gen486, primBoolean(), "!=", formal(primFile(), "a", false, false), formal(primFile(), "b", false, false)); -#line 5749 "runtime.in" - addFunc(ve, run::gen488, primFile(), "input", formal(primString() , "name", false, false), formal(primBoolean(), "check", true, false), formal(primString() , "comment", true, false)); -#line 5757 "runtime.in" - addFunc(ve, run::gen489, primFile(), "output", formal(primString() , "name", false, false), formal(primBoolean(), "update", true, false), formal(primString() , "comment", true, false)); -#line 5769 "runtime.in" - addFunc(ve, run::gen490, primFile(), "xinput", formal(primString() , "name", false, false), formal(primBoolean(), "check", true, false)); -#line 5783 "runtime.in" - addFunc(ve, run::gen491, primFile(), "xoutput", formal(primString() , "name", false, false), formal(primBoolean(), "update", true, false)); -#line 5801 "runtime.in" - addFunc(ve, run::gen492, primFile(), "binput", formal(primString() , "name", false, false), formal(primBoolean(), "check", true, false)); -#line 5808 "runtime.in" - addFunc(ve, run::gen493, primFile(), "boutput", formal(primString() , "name", false, false), formal(primBoolean(), "update", true, false)); -#line 5818 "runtime.in" - addFunc(ve, run::gen494, primBoolean(), "eof", formal(primFile(), "f", false, false)); -#line 5823 "runtime.in" - addFunc(ve, run::gen495, primBoolean(), "eol", formal(primFile(), "f", false, false)); -#line 5828 "runtime.in" - addFunc(ve, run::gen496, primBoolean(), "error", formal(primFile(), "f", false, false)); -#line 5833 "runtime.in" - addFunc(ve, run::gen497, primVoid(), "clear", formal(primFile(), "f", false, false)); -#line 5838 "runtime.in" - addFunc(ve, run::gen498, primVoid(), "close", formal(primFile(), "f", false, false)); -#line 5843 "runtime.in" - addFunc(ve, run::gen499, primInt(), "precision", formal(primFile(), "f", true, false), formal(primInt(), "digits", true, false)); -#line 5849 "runtime.in" - addFunc(ve, run::gen500, primVoid(), "flush", formal(primFile(), "f", false, false)); -#line 5854 "runtime.in" - addFunc(ve, run::gen501, primString() , "getc", formal(primFile(), "f", false, false)); -#line 5863 "runtime.in" - addFunc(ve, run::gen502, primInt(), "tell", formal(primFile(), "f", false, false)); -#line 5868 "runtime.in" - addFunc(ve, run::gen503, primVoid(), "seek", formal(primFile(), "f", false, false), formal(primInt(), "pos", false, false)); -#line 5873 "runtime.in" - addFunc(ve, run::gen504, primVoid(), "seekeof", formal(primFile(), "f", false, false)); -#line 5878 "runtime.in" - addFunc(ve, run::gen505, primFile(), "dimension", formal(primFile(), "f", false, false), formal(primInt(), "nx", false, false)); -#line 5885 "runtime.in" - addFunc(ve, run::gen506, primFile(), "dimension", formal(primFile(), "f", false, false), formal(primInt(), "nx", false, false), formal(primInt(), "ny", false, false)); -#line 5891 "runtime.in" - addFunc(ve, run::gen507, primFile(), "dimension", formal(primFile(), "f", false, false), formal(primInt(), "nx", false, false), formal(primInt(), "ny", false, false), formal(primInt(), "nz", false, false)); -#line 5897 "runtime.in" - addFunc(ve, run::gen508, primFile(), "csv", formal(primFile(), "f", false, false), formal(primBoolean(), "b", true, false)); -#line 5904 "runtime.in" - addFunc(ve, run::gen509, primFile(), "word", formal(primFile(), "f", false, false), formal(primBoolean(), "b", true, false)); -#line 5911 "runtime.in" - addFunc(ve, run::gen510, primFile(), "line", formal(primFile(), "f", false, false), formal(primBoolean(), "b", true, false)); -#line 5918 "runtime.in" - addFunc(ve, run::gen511, primFile(), "signed", formal(primFile(), "f", false, false), formal(primBoolean(), "b", true, false)); -#line 5974 "runtime.in" - addFunc(ve, run::gen521, primFile(), "read1", formal(primFile(), "f", false, false)); -#line 5981 "runtime.in" - addFunc(ve, run::gen522, primFile(), "read2", formal(primFile(), "f", false, false)); + addFunc(ve, run::gen_runtime415, primVoid(), "nowarn", formal(primString() , "s", false, false)); +#line 4384 "runtime.in" + addFunc(ve, run::gen_runtime416, primVoid(), "warning", formal(primString() , "s", false, false), formal(primString() , "t", false, false), formal(primBoolean(), "position", true, false)); +#line 4392 "runtime.in" + addFunc(ve, run::gen_runtime417, primString() , "stripdirectory", formal(primString(), "s", false, false)); +#line 4398 "runtime.in" + addFunc(ve, run::gen_runtime418, primString() , "stripfile", formal(primString(), "s", false, false)); +#line 4404 "runtime.in" + addFunc(ve, run::gen_runtime419, primString() , "stripextension", formal(primString(), "s", false, false)); +#line 4410 "runtime.in" + addFunc(ve, run::gen_runtime420, primInt(), "convert", formal(primString() , "args", true, false), formal(primString() , "file", true, false), formal(primString() , "format", true, false)); +#line 4429 "runtime.in" + addFunc(ve, run::gen_runtime421, primInt(), "animate", formal(primString() , "args", true, false), formal(primString() , "file", true, false), formal(primString() , "format", true, false)); +#line 4446 "runtime.in" + addFunc(ve, run::gen_runtime422, primInt(), "delete", formal(primString(), "s", false, false)); +#line 4456 "runtime.in" + addFunc(ve, run::gen_runtime423, primInt(), "rename", formal(primString(), "from", false, false), formal(primString(), "to", false, false)); +#line 4467 "runtime.in" + REGISTER_BLTIN(run::emptyArray,"emptyArray"); +#line 4476 "runtime.in" + REGISTER_BLTIN(run::newDeepArray,"newDeepArray"); +#line 4498 "runtime.in" + REGISTER_BLTIN(run::newInitializedArray,"newInitializedArray"); +#line 4513 "runtime.in" + REGISTER_BLTIN(run::newAppendedArray,"newAppendedArray"); +#line 4529 "runtime.in" + REGISTER_BLTIN(run::newDuplicateArray,"newDuplicateArray"); +#line 4539 "runtime.in" + REGISTER_BLTIN(run::arrayRead,"arrayRead"); +#line 4551 "runtime.in" + REGISTER_BLTIN(run::arraySliceRead,"arraySliceRead"); +#line 4558 "runtime.in" + REGISTER_BLTIN(run::arraySliceReadToEnd,"arraySliceReadToEnd"); +#line 4566 "runtime.in" + REGISTER_BLTIN(run::arrayArrayRead,"arrayArrayRead"); +#line 4575 "runtime.in" + REGISTER_BLTIN(run::arrayWrite,"arrayWrite"); +#line 4591 "runtime.in" + REGISTER_BLTIN(run::arraySliceWrite,"arraySliceWrite"); +#line 4599 "runtime.in" + REGISTER_BLTIN(run::arraySliceWriteToEnd,"arraySliceWriteToEnd"); +#line 4607 "runtime.in" + REGISTER_BLTIN(run::arrayLength,"arrayLength"); +#line 4613 "runtime.in" + REGISTER_BLTIN(run::arrayKeys,"arrayKeys"); +#line 4628 "runtime.in" + REGISTER_BLTIN(run::arrayCyclicFlag,"arrayCyclicFlag"); +#line 4635 "runtime.in" + REGISTER_BLTIN(run::arraySetCyclicFlag,"arraySetCyclicFlag"); +#line 4642 "runtime.in" + REGISTER_BLTIN(run::arrayInitializedHelper,"arrayInitializedHelper"); +#line 4653 "runtime.in" + REGISTER_BLTIN(run::arrayInitialized,"arrayInitialized"); +#line 4659 "runtime.in" + REGISTER_BLTIN(run::arrayCyclicHelper,"arrayCyclicHelper"); +#line 4666 "runtime.in" + REGISTER_BLTIN(run::arrayCyclic,"arrayCyclic"); +#line 4672 "runtime.in" + REGISTER_BLTIN(run::arrayPushHelper,"arrayPushHelper"); +#line 4680 "runtime.in" + REGISTER_BLTIN(run::arrayPush,"arrayPush"); +#line 4686 "runtime.in" + REGISTER_BLTIN(run::arrayAppendHelper,"arrayAppendHelper"); +#line 4695 "runtime.in" + REGISTER_BLTIN(run::arrayAppend,"arrayAppend"); +#line 4701 "runtime.in" + REGISTER_BLTIN(run::arrayPopHelper,"arrayPopHelper"); +#line 4710 "runtime.in" + REGISTER_BLTIN(run::arrayPop,"arrayPop"); +#line 4716 "runtime.in" + REGISTER_BLTIN(run::arrayInsertHelper,"arrayInsertHelper"); +#line 4727 "runtime.in" + REGISTER_BLTIN(run::arrayInsert,"arrayInsert"); +#line 4733 "runtime.in" + REGISTER_BLTIN(run::arrayDelete,"arrayDelete"); +#line 4739 "runtime.in" + REGISTER_BLTIN(run::arrayAlias,"arrayAlias"); +#line 4744 "runtime.in" + REGISTER_BLTIN(run::arrayIntArray,"arrayIntArray"); +#line 4762 "runtime.in" + addFunc(ve, run::gen_runtime455, IntArray(), "complement", formal(IntArray(), "a", false, false), formal(primInt(), "n", false, false)); +#line 4781 "runtime.in" + REGISTER_BLTIN(run::arraySequence,"arraySequence"); +#line 4794 "runtime.in" + addFunc(ve, run::gen_runtime457, IntArray(), "sequence", formal(primInt(), "n", false, false)); +#line 4805 "runtime.in" + REGISTER_BLTIN(run::arrayFunction,"arrayFunction"); +#line 4818 "runtime.in" + REGISTER_BLTIN(run::arraySort,"arraySort"); +#line 4827 "runtime.in" + addFunc(ve, run::gen_runtime460, primBoolean(), "all", formal(booleanArray(), "a", false, false)); +#line 4836 "runtime.in" + addFunc(ve, run::gen_runtime461, booleanArray(), "!", formal(booleanArray(), "a", false, false)); +#line 4845 "runtime.in" + addFunc(ve, run::gen_runtime462, primInt(), "sum", formal(booleanArray(), "a", false, false)); +#line 4854 "runtime.in" + REGISTER_BLTIN(run::arrayCopy,"arrayCopy"); +#line 4859 "runtime.in" + REGISTER_BLTIN(run::arrayConcat,"arrayConcat"); +#line 4887 "runtime.in" + REGISTER_BLTIN(run::array2Copy,"array2Copy"); +#line 4892 "runtime.in" + REGISTER_BLTIN(run::array3Copy,"array3Copy"); +#line 4897 "runtime.in" + REGISTER_BLTIN(run::array2Transpose,"array2Transpose"); +#line 4921 "runtime.in" + REGISTER_BLTIN(run::array3Transpose,"array3Transpose"); +#line 5008 "runtime.in" + addFunc(ve, run::gen_runtime469, primInt(), "find", formal(booleanArray(), "a", false, false), formal(primInt(), "n", true, false)); +#line 5027 "runtime.in" + REGISTER_BLTIN(run::arrayConditional,"arrayConditional"); +#line 5053 "runtime.in" + addFunc(ve, run::gen_runtime471, realArray2(), "identity", formal(primInt(), "n", false, false)); +#line 5059 "runtime.in" + REGISTER_BLTIN(run::diagonal,"diagonal"); +#line 5076 "runtime.in" + addFunc(ve, run::gen_runtime473, realArray2(), "inverse", formal(realArray2(), "a", false, false)); +#line 5168 "runtime.in" + addFunc(ve, run::gen_runtime474, realArray(), "solve", formal(realArray2(), "a", false, false), formal(realArray(), "b", false, false), formal(primBoolean(), "warn", true, false)); +#line 5219 "runtime.in" + addFunc(ve, run::gen_runtime475, realArray2(), "solve", formal(realArray2(), "a", false, false), formal(realArray2(), "b", false, false), formal(primBoolean(), "warn", true, false)); +#line 5283 "runtime.in" + addFunc(ve, run::gen_runtime476, primReal(), "determinant", formal(realArray2(), "a", false, false)); +#line 5299 "runtime.in" + addFunc(ve, run::gen_runtime477, realArray(), "*", formal(realArray2(), "a", false, false), formal(realArray(), "b", false, false)); +#line 5317 "runtime.in" + addFunc(ve, run::gen_runtime478, realArray(), "*", formal(realArray(), "a", false, false), formal(realArray2(), "b", false, false)); +#line 5345 "runtime.in" + addFunc(ve, run::gen_runtime479, realArray2(), "*", formal(realArray2(), "a", false, false), formal(realArray2(), "b", false, false)); +#line 5380 "runtime.in" + addFunc(ve, run::gen_runtime480, primTriple(), "*", formal(realArray2(), "t", false, false), formal(primTriple(), "v", false, false)); +#line 5385 "runtime.in" + addFunc(ve, run::gen_runtime481, primPair(), "project", formal(primTriple(), "v", false, false), formal(realArray2(), "t", false, false)); +#line 5410 "runtime.in" + addFunc(ve, run::gen_runtime482, primReal(), "dot", formal(realArray(), "a", false, false), formal(realArray(), "b", false, false)); +#line 5420 "runtime.in" + addFunc(ve, run::gen_runtime483, realArray(), "tridiagonal", formal(realArray(), "a", false, false), formal(realArray(), "b", false, false), formal(realArray(), "c", false, false), formal(realArray(), "f", false, false)); +#line 5524 "runtime.in" + addFunc(ve, run::gen_runtime484, primReal(), "newton", formal(primInt(), "iterations", true, false), formal(realRealFunction(), "f", false, false), formal(realRealFunction(), "fprime", false, false), formal(primReal(), "x", false, false), formal(primBoolean(), "verbose", true, false)); +#line 5571 "runtime.in" + addFunc(ve, run::gen_runtime485, primReal(), "newton", formal(primInt(), "iterations", true, false), formal(realRealFunction(), "f", false, false), formal(realRealFunction(), "fprime", false, false), formal(primReal(), "x1", false, false), formal(primReal(), "x2", false, false), formal(primBoolean(), "verbose", true, false)); +#line 5653 "runtime.in" + addFunc(ve, run::gen_runtime486, primReal(), "simpson", formal(realRealFunction(), "f", false, false), formal(primReal(), "a", false, false), formal(primReal(), "b", false, false), formal(primReal(), "acc", true, false), formal(primReal(), "dxmax", true, false)); +#line 5665 "runtime.in" + REGISTER_BLTIN(run::pairArrayFFT,"pairArrayFFT"); +#line 5695 "runtime.in" + addFunc(ve, run::gen_runtime488, IntArray2(), "triangulate", formal(pairArray(), "z", false, false)); +#line 5730 "runtime.in" + addFunc(ve, run::gen_runtime489, primBoolean(), "==", formal(primFile(), "a", false, false), formal(primFile(), "b", false, false)); +#line 5738 "runtime.in" + addFunc(ve, run::gen_runtime490, primBoolean(), "!=", formal(primFile(), "a", false, false), formal(primFile(), "b", false, false)); +#line 5743 "runtime.in" + REGISTER_BLTIN(run::nullFile,"nullFile"); +#line 5748 "runtime.in" + addFunc(ve, run::gen_runtime492, primFile(), "input", formal(primString() , "name", false, false), formal(primBoolean(), "check", true, false), formal(primString() , "comment", true, false)); +#line 5756 "runtime.in" + addFunc(ve, run::gen_runtime493, primFile(), "output", formal(primString() , "name", false, false), formal(primBoolean(), "update", true, false), formal(primString() , "comment", true, false)); +#line 5768 "runtime.in" + addFunc(ve, run::gen_runtime494, primFile(), "xinput", formal(primString() , "name", false, false), formal(primBoolean(), "check", true, false)); +#line 5782 "runtime.in" + addFunc(ve, run::gen_runtime495, primFile(), "xoutput", formal(primString() , "name", false, false), formal(primBoolean(), "update", true, false)); +#line 5800 "runtime.in" + addFunc(ve, run::gen_runtime496, primFile(), "binput", formal(primString() , "name", false, false), formal(primBoolean(), "check", true, false)); +#line 5807 "runtime.in" + addFunc(ve, run::gen_runtime497, primFile(), "boutput", formal(primString() , "name", false, false), formal(primBoolean(), "update", true, false)); +#line 5817 "runtime.in" + addFunc(ve, run::gen_runtime498, primBoolean(), "eof", formal(primFile(), "f", false, false)); +#line 5822 "runtime.in" + addFunc(ve, run::gen_runtime499, primBoolean(), "eol", formal(primFile(), "f", false, false)); +#line 5827 "runtime.in" + addFunc(ve, run::gen_runtime500, primBoolean(), "error", formal(primFile(), "f", false, false)); +#line 5832 "runtime.in" + addFunc(ve, run::gen_runtime501, primVoid(), "clear", formal(primFile(), "f", false, false)); +#line 5837 "runtime.in" + addFunc(ve, run::gen_runtime502, primVoid(), "close", formal(primFile(), "f", false, false)); +#line 5842 "runtime.in" + addFunc(ve, run::gen_runtime503, primInt(), "precision", formal(primFile(), "f", true, false), formal(primInt(), "digits", true, false)); +#line 5848 "runtime.in" + addFunc(ve, run::gen_runtime504, primVoid(), "flush", formal(primFile(), "f", false, false)); +#line 5853 "runtime.in" + addFunc(ve, run::gen_runtime505, primString() , "getc", formal(primFile(), "f", false, false)); +#line 5862 "runtime.in" + addFunc(ve, run::gen_runtime506, primInt(), "tell", formal(primFile(), "f", false, false)); +#line 5867 "runtime.in" + addFunc(ve, run::gen_runtime507, primVoid(), "seek", formal(primFile(), "f", false, false), formal(primInt(), "pos", false, false)); +#line 5872 "runtime.in" + addFunc(ve, run::gen_runtime508, primVoid(), "seekeof", formal(primFile(), "f", false, false)); +#line 5877 "runtime.in" + REGISTER_BLTIN(run::namePart,"namePart"); +#line 5882 "runtime.in" + REGISTER_BLTIN(run::modePart,"modePart"); +#line 5887 "runtime.in" + REGISTER_BLTIN(run::dimensionSetHelper,"dimensionSetHelper"); +#line 5894 "runtime.in" + REGISTER_BLTIN(run::dimensionSet,"dimensionSet"); +#line 5899 "runtime.in" + REGISTER_BLTIN(run::dimensionPart,"dimensionPart"); +#line 5908 "runtime.in" + REGISTER_BLTIN(run::lineSetHelper,"lineSetHelper"); +#line 5915 "runtime.in" + REGISTER_BLTIN(run::lineSet,"lineSet"); +#line 5920 "runtime.in" + REGISTER_BLTIN(run::linePart,"linePart"); +#line 5925 "runtime.in" + REGISTER_BLTIN(run::csvSetHelper,"csvSetHelper"); +#line 5932 "runtime.in" + REGISTER_BLTIN(run::csvSet,"csvSet"); +#line 5937 "runtime.in" + REGISTER_BLTIN(run::csvPart,"csvPart"); +#line 5942 "runtime.in" + REGISTER_BLTIN(run::wordSetHelper,"wordSetHelper"); +#line 5949 "runtime.in" + REGISTER_BLTIN(run::wordSet,"wordSet"); +#line 5954 "runtime.in" + REGISTER_BLTIN(run::wordPart,"wordPart"); +#line 5959 "runtime.in" + REGISTER_BLTIN(run::singlerealSetHelper,"singlerealSetHelper"); +#line 5966 "runtime.in" + REGISTER_BLTIN(run::singlerealSet,"singlerealSet"); +#line 5971 "runtime.in" + REGISTER_BLTIN(run::singlerealPart,"singlerealPart"); +#line 5976 "runtime.in" + REGISTER_BLTIN(run::singleintSetHelper,"singleintSetHelper"); +#line 5983 "runtime.in" + REGISTER_BLTIN(run::singleintSet,"singleintSet"); #line 5988 "runtime.in" - addFunc(ve, run::gen523, primFile(), "read3", formal(primFile(), "f", false, false)); -#line 5995 "runtime.in" - addFunc(ve, run::gen524, stringArray(), "history", formal(primString() , "name", false, false), formal(primInt(), "n", true, false)); -#line 6028 "runtime.in" - addFunc(ve, run::gen525, stringArray(), "history", formal(primInt(), "n", true, false)); -#line 6039 "runtime.in" - addFunc(ve, run::gen526, primString() , "readline", formal(primString() , "prompt", true, false), formal(primString() , "name", true, false), formal(primBoolean(), "tabcompletion", true, false)); -#line 6083 "runtime.in" - addFunc(ve, run::gen527, primVoid(), "saveline", formal(primString() , "name", false, false), formal(primString() , "value", false, false), formal(primBoolean(), "store", true, false)); -#line 6113 "runtime.in" - addFunc(ve, run::gen528, primVoid(), "generate_random_backtrace"); -#line 6122 "runtime.in" - addFunc(ve, run::gen529, primVoid(), "print_random_addresses", formal(primInt(), "n", true, false)); + REGISTER_BLTIN(run::singleintPart,"singleintPart"); +#line 5993 "runtime.in" + REGISTER_BLTIN(run::signedintSetHelper,"signedintSetHelper"); +#line 6000 "runtime.in" + REGISTER_BLTIN(run::signedintSet,"signedintSet"); +#line 6005 "runtime.in" + REGISTER_BLTIN(run::signedintPart,"signedintPart"); +#line 6010 "runtime.in" + REGISTER_BLTIN(run::readSetHelper,"readSetHelper"); +#line 6033 "runtime.in" + REGISTER_BLTIN(run::readSet,"readSet"); +#line 6038 "runtime.in" + addFunc(ve, run::gen_runtime534, stringArray(), "history", formal(primString() , "name", false, false), formal(primInt(), "n", true, false)); +#line 6071 "runtime.in" + addFunc(ve, run::gen_runtime535, stringArray(), "history", formal(primInt(), "n", true, false)); +#line 6082 "runtime.in" + addFunc(ve, run::gen_runtime536, primString() , "readline", formal(primString() , "prompt", true, false), formal(primString() , "name", true, false), formal(primBoolean(), "tabcompletion", true, false)); +#line 6126 "runtime.in" + addFunc(ve, run::gen_runtime537, primVoid(), "saveline", formal(primString() , "name", false, false), formal(primString() , "value", false, false), formal(primBoolean(), "store", true, false)); } } // namespace trans |