Ver código fonte

Make cppia use new ast by default.

hughsando 8 anos atrás
pai
commit
04dac446ff
3 arquivos alterados com 4 adições e 4 exclusões
  1. 2 2
      src/context/common.ml
  2. 1 1
      src/generators/gencpp.ml
  3. 1 1
      tests/RunCi.hx

+ 2 - 2
src/context/common.ml

@@ -460,7 +460,7 @@ module Define = struct
 		| CoreApi
 		| CoreApiSerialize
 		| Cppia
-		| CppiaAst
+		| NoCppiaAst
 		| Dce
 		| DceDebug
 		| Debug
@@ -566,7 +566,7 @@ module Define = struct
 		| CoreApi -> "core_api",("Defined in the core api context",[])
 		| CoreApiSerialize -> "core_api_serialize",("Mark some generated core api classes with the Serializable attribute on C#",[Platform Cs])
 		| Cppia -> "cppia",("Generate cpp instruction assembly",[])
-		| CppiaAst -> "cppiaast",("Experimental cppia generation based on cpp ast",[])
+		| NoCppiaAst -> "nocppiaast",("Use legacy cppia generation",[])
 		| Dce -> "dce",("<mode:std|full|no> Set the dead code elimination mode (default std)",[])
 		| DceDebug -> "dce_debug",("Show DCE log",[])
 		| Debug -> "debug",("Activated when compiling with -debug",[])

+ 1 - 1
src/generators/gencpp.ml

@@ -7083,7 +7083,7 @@ class script_writer ctx filename asciiOut =
    val identTable = Hashtbl.create 0
    val fileTable = Hashtbl.create 0
    val identBuffer = Buffer.create 0
-   val cppiaAst = Common.defined ctx.ctx_common Define.CppiaAst
+   val cppiaAst = not (Common.defined ctx.ctx_common Define.NoCppiaAst)
 
    method stringId name =
       try ( Hashtbl.find identTable name )

+ 1 - 1
tests/RunCi.hx

@@ -896,7 +896,7 @@ class RunCi {
 								runCommand("haxe", ["compile-cppia.hxml"]);
 								runCpp("bin/cppia/Host-debug", ["bin/unit.cppia"]);
 								runCpp("bin/cppia/Host-debug", ["bin/unit.cppia", "-jit"]);
-								runCommand("haxe", ["compile-cppia.hxml", "-D", "cppiaast"]);
+								runCommand("haxe", ["compile-cppia.hxml", "-D", "nocppiaast"]);
 								runCpp("bin/cppia/Host-debug", ["bin/unit.cppia"]);
 								runCpp("bin/cppia/Host-debug", ["bin/unit.cppia", "-jit"]);
 						}