diff options
author | Fabian Deutsch <fabian.deutsch@gmx.de> | 2010-05-15 19:02:25 -0700 |
---|---|---|
committer | Evan Nemerson <evan@coeus-group.com> | 2010-05-15 19:02:25 -0700 |
commit | 6a4b1da2371d873d38a63e538ab1dacb53a61c77 (patch) | |
tree | 1b035d125f7784c64ba040c5b4507f1f7e10eefb /vapi/orc-0.4.vapi | |
parent | 6fdc7eb6da299f8cb0b708b9a14d0f03524bb035 (diff) | |
download | vala-6a4b1da2371d873d38a63e538ab1dacb53a61c77.tar.gz |
Add orc-0.4 binding
Fixes bug 618570.
Diffstat (limited to 'vapi/orc-0.4.vapi')
-rw-r--r-- | vapi/orc-0.4.vapi | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/vapi/orc-0.4.vapi b/vapi/orc-0.4.vapi new file mode 100644 index 000000000..b5085d761 --- /dev/null +++ b/vapi/orc-0.4.vapi @@ -0,0 +1,89 @@ +[CCode (lower_case_cprefix = "orc_", cheader_filename = "orc/orc.h")] +namespace Orc { + [Compact] + public class Program { + public Program (); + public Program.dss (int size1, int size2, int size3); + + public unowned string get_name (); + + public void add_temporary (int size, owned string name); + public void add_source (int size, owned string name); + public void add_destination (int size, owned string name); + public void add_constant (int size, owned string name); + public void add_accumulator (int size, owned string name); + public void add_parameter (int size, owned string name); + + public void append (string opcode, int arg0, int arg1, int arg2); + public void append_str (string opcode, string arg0, string arg1, string arg2); + public void append_ds (string opcode, int arg0, int arg1); + public void append_ds_str (string opcode, string arg0, string arg1); + + public Orc.CompileResult compile (); + + public string get_asm_code (); + public int find_var_by_name (string name); + + public void set_2d(); + } + + [Compact] + public class Compiler { + } + + public enum CompileResult { + OK, + UNKNOWN_COMPILE, + MISSING_RULE, + UNKNOWN_PARSE, + PARSE, + VARIABLE; + + [CCode (cname = "ORC_COMPILE_RESULT_IS_SUCCESSFUL")] + public bool is_successful (); + [CCode (cname = "ORC_COMPILE_RESULT_IS_FATAL")] + public bool is_fatal (); + } + + [Compact] + public class Executor { + [CCode (cname = "orc_executor_new")] + public Executor (Orc.Program p); + + public void set_array (int _var, void* ptr); + public void set_array_str (string _var, void* ptr); + + public void set_n (int n); + + public void emulate (); + public void run (); + + public int get_accumulator (int n); + public int get_accumulator_str (string name); + public int set_param (int n, int val); + public int set_param_str (string name, int val); + + public void set_program (Orc.Program p); + + public void set_2d (); + public void set_m (int n); + public void set_stride (int _var, int stride); + } + + [CCode (cprefix = "ORC_DEBUG_")] + public enum DebugLevel { + NONE, + ERROR, + WARNING, + INFO, + DEBUG, + LOG + } + + namespace Debug { + public void set_level (Orc.DebugLevel l); + } + + public static void init (); +} + |