diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/asymptote/builtin.h |
Initial commit
Diffstat (limited to 'graphics/asymptote/builtin.h')
-rw-r--r-- | graphics/asymptote/builtin.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/graphics/asymptote/builtin.h b/graphics/asymptote/builtin.h new file mode 100644 index 0000000000..f29a97ccd4 --- /dev/null +++ b/graphics/asymptote/builtin.h @@ -0,0 +1,60 @@ +/***** + * builtin.h + * Tom Prince 2004/08/25 + * + * Initialize builtins. + *****/ +#ifndef BUILTIN_H +#define BUILTIN_H + +#include "vm.h" +#include "types.h" +#include "arrayop.h" + +namespace trans { + +class tenv; +class venv; + +// The base environments for built-in types and functions +void base_tenv(tenv &); +void base_venv(venv &); + +extern const types::formal noformal; + +// Add a function with one or more default arguments. +void addFunc(venv &ve, vm::bltin f, types::ty *result, symbol name, + types::formal f1=noformal, types::formal f2=noformal, + types::formal f3=noformal, types::formal f4=noformal, + types::formal f5=noformal, types::formal f6=noformal, + types::formal f7=noformal, types::formal f8=noformal, + types::formal f9=noformal, types::formal fA=noformal, + types::formal fB=noformal, types::formal fC=noformal, + types::formal fD=noformal, types::formal fE=noformal, + types::formal fF=noformal, types::formal fG=noformal, + types::formal fH=noformal, types::formal fI=noformal); + +// Adds standard functions for a newly added types. +void addArrayOps(venv &ve, types::array *t); +void addRecordOps(venv &ve, types::record *r); +void addFunctionOps(venv &ve, types::function *f); + +#ifdef HAVE_LIBGSL +types::record *getGSLModule(); +void GSLrngFree(); +#endif + +} //namespace trans + +namespace run { +extern double infinity; + +void single(vm::stack *Stack); +void arrayDeleteHelper(vm::stack *Stack); + +// Used by to optimize conditional jumps. +extern const vm::bltin intLess; +extern const vm::bltin intGreater; +} + +#endif //BUILTIN_H |