summaryrefslogtreecommitdiff
path: root/graphics/asymptote/runtimebase.in
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/asymptote/runtimebase.in
Initial commit
Diffstat (limited to 'graphics/asymptote/runtimebase.in')
-rw-r--r--graphics/asymptote/runtimebase.in64
1 files changed, 64 insertions, 0 deletions
diff --git a/graphics/asymptote/runtimebase.in b/graphics/asymptote/runtimebase.in
new file mode 100644
index 0000000000..86237de351
--- /dev/null
+++ b/graphics/asymptote/runtimebase.in
@@ -0,0 +1,64 @@
+/*****
+ * runtimebase.in
+ * Andy Hammerlindl 2009/07/28
+ *
+ * Common declarations needed for all code-generating .in files.
+ *
+ *****/
+
+
+// Basic types need by almost all .in files.
+
+// Use Void f() instead of void f() to force an explicit Stack argument.
+void => primVoid()
+Void => primVoid()
+
+Int => primInt()
+bool => primBoolean()
+double => primReal()
+real => primReal()
+string* => primString()
+string => primString()
+
+#include "stack.h"
+#include "types.h"
+#include "builtin.h"
+#include "entry.h"
+#include "errormsg.h"
+#include "array.h"
+#include "triple.h"
+#include "callable.h"
+#include "opsymbols.h"
+
+using vm::stack;
+using vm::error;
+using vm::array;
+using vm::read;
+using vm::callable;
+using types::formal;
+using types::function;
+using camp::triple;
+
+#define PRIMITIVE(name,Name,asyName) using types::prim##Name;
+#include <primitives.h>
+#undef PRIMITIVE
+
+typedef double real;
+
+void unused(void *);
+
+namespace run {
+array *copyArray(array *a);
+array *copyArray2(array *a);
+array *copyArray3(array *a);
+
+double *copyTripleArray2Components(array *a, size_t &N,
+ GCPlacement placement=NoGC);
+triple *copyTripleArray2C(array *a, size_t &N,
+ GCPlacement placement=NoGC);
+}
+
+function *realRealFunction();
+
+#define CURRENTPEN processData().currentpen
+