浏览代码

as3gen -> as3
fixed as3 flash.Vector generation

Nicolas Cannasse 17 年之前
父节点
当前提交
343f97ab5a
共有 8 个文件被更改,包括 13 次插入7 次删除
  1. 2 0
      doc/CHANGES.txt
  2. 5 1
      genas3.ml
  3. 1 1
      main.ml
  4. 1 1
      std/Std.hx
  5. 1 1
      std/haxe/Resource.hx
  6. 1 1
      std/haxe/Stack.hx
  7. 1 1
      std/haxe/remoting/ExternalConnection.hx
  8. 1 1
      std/haxe/remoting/FlashJsConnection.hx

+ 2 - 0
doc/CHANGES.txt

@@ -21,6 +21,8 @@
 	fixed issue with Int default value for Float parameter
 	flash9 : bugfix when using the retval after setting a closure variable
 	added flash.VMem API for flash10 alchemy opcodes access
+	changed #if as3gen to #if as3 when generating as3 code
+	fixed as3 flash.Vector generation
 
 2008-10-04: 2.01
 	fixed php.Sys

+ 5 - 1
genas3.ml

@@ -61,6 +61,8 @@ let s_path ctx stat path p =
 		"Xml"
 	| (["flash"],"Error") ->
 		"Error"
+	| (["flash"],"Vector") ->
+		"Vector"
 	| (["flash";"xml"],"XML") ->
 		"XML"
 	| (["flash";"xml"],"XMLList") ->
@@ -191,7 +193,9 @@ let rec type_str ctx t p =
 			| _ -> "Object"
 		) else
 			s_path ctx true e.e_path p
-	| TInst (c,_) ->
+	| TInst ({ cl_path = ["flash"],"Vector" },[pt]) ->
+		"Vector.<" ^ type_str ctx pt p ^ ">"
+	| TInst (c,_) ->		
 		(match c.cl_kind with
 		| KNormal | KGeneric | KGenericInstance _ -> s_path ctx false c.cl_path p
 		| KTypeParameter | KExtension _ | KConstant _  -> "*")

+ 1 - 1
main.ml

@@ -233,7 +233,7 @@ try
 			set_platform Flash "flash" dir;
 			if com.flash_version < 9 then com.flash_version <- 9;
 			gen_as3 := true;
-			Common.define com "as3gen";
+			Common.define com "as3";
 			Common.define com "no_inline";
 		),"<directory> : generate AS3 code into target directory");
 		("-swf",Arg.String (set_platform Flash "flash"),"<file> : compile code to Flash SWF file");

+ 1 - 1
std/Std.hx

@@ -173,7 +173,7 @@ class Std {
 			Class = { __name__ : ["Class"] };
 			Enum = {};
 			Void = { __ename__ : ["Void"] };
-		#elseif as3gen
+		#elseif as3
 			null;
 		#elseif flash9
 			Bool = __global__["Boolean"];

+ 1 - 1
std/haxe/Resource.hx

@@ -93,7 +93,7 @@ class Resource {
 		content = untyped Array.new1(tmp,__dollar__asize(tmp));
 		#elseif php
 		content = null;
-		#elseif as3gen
+		#elseif as3
 		null;
 		#else
 		content = untyped __resources__();

+ 1 - 1
std/haxe/Stack.hx

@@ -67,7 +67,7 @@ class Stack {
 	public static function exceptionStack() : Array<StackItem> {
 		#if neko
 			return makeStack(untyped __dollar__excstack());
-		#elseif as3gen
+		#elseif as3
 			return new Array();
 		#elseif flash9
 			var err : flash.Error = untyped flash.Boot.lastError;

+ 1 - 1
std/haxe/remoting/ExternalConnection.hx

@@ -100,7 +100,7 @@ class ExternalConnection implements Connection, implements Dynamic<Connection> {
 			s.serializeException(e);
 			return s.toString();
 		}
-		#if as3gen
+		#if as3
 		return "";
 		#end
 	}

+ 1 - 1
std/haxe/remoting/FlashJsConnection.hx

@@ -103,7 +103,7 @@ class FlashJsConnection #if flash implements AsyncConnection, implements Dynamic
 			s.serializeException(e);
 			return s.toString();
 		}
-		#if as3gen
+		#if as3
 		return "";
 		#end
 	}