Bläddra i källkod

Updated mx2cc to build with v1.1.06.

Mark Sibly 7 år sedan
förälder
incheckning
244b134688
2 ändrade filer med 14 tillägg och 2 borttagningar
  1. 10 0
      src/mx2cc/mx2cc.monkey2
  2. 4 2
      src/mx2cc/property.monkey2

+ 10 - 0
src/mx2cc/mx2cc.monkey2

@@ -30,6 +30,8 @@ Using mx2..
 
 Const MX2CC_VERSION_EXT:=""
 
+Global opts_time:Bool
+
 Global StartDir:String
 
 'Const TestArgs:="mx2cc makemods"
@@ -128,6 +130,8 @@ Function Main()
 		Local cmd:=args[1]
 		args=args.Slice( 2 )
 		
+		Local start:=std.time.Now()
+		
 		Select cmd
 		Case "makeapp"
 			ok=MakeApp( args )
@@ -139,6 +143,10 @@ Function Main()
 			Fail( "Unrecognized mx2cc command: '"+cmd+"'" )
 		End
 		
+		Local elapsed:=std.time.Now()-start
+		
+		If opts_time Print "Elapsed time="+elapsed
+		
 	Catch ex:BuildEx
 	
 		Fail( "Internal mx2cc build error" )
@@ -446,6 +454,8 @@ Function ParseOpts:String[]( opts:BuildOpts,args:String[] )
 				opts.verbose=1
 			Case "-geninfo"
 				opts.geninfo=True
+			Case "-time"
+				opts_time=True
 			Default
 				Return args.Slice( i )
 			End

+ 4 - 2
src/mx2cc/property.monkey2

@@ -55,7 +55,8 @@ Class PropertyList Extends FuncList
 		
 		If pdecl.getFunc
 			Try
-				getFunc=New FuncValue( pdecl.getFunc,scope,types,instanceof?.getFunc )
+'				getFunc=New FuncValue( pdecl.getFunc,scope,types,instanceof?.getFunc )
+				getFunc=New FuncValue( pdecl.getFunc,scope,types,instanceof ? instanceof.getFunc Else Null )
 				getFunc.Semant()
 				type=getFunc.ftype.retType
 				If type.Equals( Type.VoidType ) Throw New SemantEx( "Property '"+pdecl.ident+"' getter has void type" )
@@ -66,7 +67,8 @@ Class PropertyList Extends FuncList
 
 		If pdecl.setFunc
 			Try
-				setFunc=New FuncValue( pdecl.setFunc,scope,types,instanceof?.setFunc )
+'				setFunc=New FuncValue( pdecl.setFunc,scope,types,instanceof?.setFunc )
+				setFunc=New FuncValue( pdecl.setFunc,scope,types,instanceof ? instanceof.setFunc Else Null )
 				setFunc.Semant()
 				If type And Not type.Equals( setFunc.ftype.argTypes[0] ) Throw New SemantEx( "Property '"+pdecl.ident+"' Getter And Setter have different types" )
 				If Not type type=setFunc.ftype.argTypes[0]