]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Add orc-0.4 binding
authorFabian Deutsch <fabian.deutsch@gmx.de>
Sun, 16 May 2010 02:02:25 +0000 (19:02 -0700)
committerEvan Nemerson <evan@coeus-group.com>
Sun, 16 May 2010 02:02:25 +0000 (19:02 -0700)
Fixes bug 618570.

vapi/Makefile.am
vapi/orc-0.4.vapi [new file with mode: 0644]

index b1e6ddefae41793edceb31176e3a3740ed4c1512..65f54c21e1df0d912612738a937a845044c53211 100644 (file)
@@ -163,6 +163,7 @@ dist_vapi_DATA = \
        loudmouth-1.0.vapi \
        lua.vapi \
        mysql.vapi \
+       orc-0.4.vapi \
        pango.deps \
        pango.vapi \
        pangocairo.deps \
diff --git a/vapi/orc-0.4.vapi b/vapi/orc-0.4.vapi
new file mode 100644 (file)
index 0000000..b5085d7
--- /dev/null
@@ -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 ();
+}
+