浏览代码

Forgot to add the mli files in the last commit... and now removed (generated) types.ml from repo index

Taddeus Kroes 12 年之前
父节点
当前提交
bbb89db752
共有 18 个文件被更改,包括 36 次插入0 次删除
  1. 1 0
      .gitignore
  2. 13 0
      globals.ml
  3. 4 0
      globals.mli
  4. 1 0
      phases/assemble.mli
  5. 1 0
      phases/boolop.mli
  6. 1 0
      phases/constprop.mli
  7. 3 0
      phases/context.mli
  8. 1 0
      phases/desug.mli
  9. 1 0
      phases/dimreduce.mli
  10. 1 0
      phases/extern.mli
  11. 1 0
      phases/index.mli
  12. 1 0
      phases/load.mli
  13. 1 0
      phases/output.mli
  14. 1 0
      phases/parse.mli
  15. 1 0
      phases/peephole.mli
  16. 3 0
      phases/print.mli
  17. 1 0
      phases/typecheck.mli
  18. 0 0
      types.mli

+ 1 - 0
.gitignore

@@ -6,6 +6,7 @@ civicc
 *.cmx
 *.swp
 *.o
+types.ml
 lexer.ml
 parser.ml
 parser.mli

+ 13 - 0
globals.ml

@@ -0,0 +1,13 @@
+open Types
+
+(* Commandline args are stored in a global record
+ * (yes, it is a bit dirty, but I don't know how to do this without passing
+ * [args] to every function). *)
+let args = {
+    infile   = None;
+    outfile  = None;
+    verbose  = 1;
+    cpp      = true;
+    optimize = true;
+    endphase = "";
+}

+ 4 - 0
globals.mli

@@ -0,0 +1,4 @@
+(** Global variables with runtime values, used in multiple modules. *)
+
+(** Values of command-line arguments, to be set by the [Main] module. *)
+val args : Types.args_record

+ 1 - 0
phases/assemble.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/boolop.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/constprop.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 3 - 0
phases/context.mli

@@ -0,0 +1,3 @@
+val phase : Types.intermediate -> Types.intermediate
+
+val analyse_context : Types.node -> Types.node

+ 1 - 0
phases/desug.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/dimreduce.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/extern.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/index.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/load.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/output.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/parse.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/peephole.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 3 - 0
phases/print.mli

@@ -0,0 +1,3 @@
+val print_assembly : out_channel -> Types.instr list -> unit
+
+val phase : Types.intermediate -> Types.intermediate

+ 1 - 0
phases/typecheck.mli

@@ -0,0 +1 @@
+val phase : Types.intermediate -> Types.intermediate

+ 0 - 0
types.ml → types.mli