Bladeren bron

[java/cs] DCE now compiles an empty project Fixes issue #998

Caue Waneck 13 jaren geleden
bovenliggende
commit
8ceca2c24c

+ 1 - 1
std/cs/_std/Type.hx

@@ -26,7 +26,7 @@ import cs.internal.Runtime;
  * DAMAGE.
  */
 
-enum ValueType {
+@:keep enum ValueType {
 	TNull;
 	TInt;
 	TFloat;

+ 1 - 1
std/java/_std/Reflect.hx

@@ -29,7 +29,7 @@ import java.Boot;
 	The Reflect API is a way to manipulate values dynamicly through an
 	abstract interface in an untyped manner. Use with care.
 **/
-@:core_api class Reflect {
+@:keep @:core_api class Reflect {
 
 	/**
 		Tells if an object has a field set. This doesn't take into account the object prototype (class methods).

+ 2 - 2
std/java/_std/Type.hx

@@ -23,7 +23,7 @@
  * DAMAGE.
  */
 
-enum ValueType {
+@:keep enum ValueType {
 	TNull;
 	TInt;
 	TFloat;
@@ -35,7 +35,7 @@ enum ValueType {
 	TUnknown;
 }
 
-@:core_api class Type {
+@:keep @:core_api class Type {
 	
 	@:functionBody('
 		if (o instanceof haxe.lang.DynamicObject || o instanceof java.lang.Class)

+ 1 - 0
std/java/internal/FieldLookup.hx

@@ -1,6 +1,7 @@
 package java.internal;
 
 @:native('haxe.lang.FieldLookup')
+@:keep
 @:static private class FieldLookup 
 {
 	

+ 4 - 4
std/java/internal/Function.hx

@@ -8,7 +8,7 @@ import java.internal.Runtime;
  * 
  * @author waneck
  */
-@:abstract @:nativegen @:native("haxe.lang.Function") private class Function 
+@:abstract @:nativegen @:native("haxe.lang.Function") @:keep private class Function 
 {
 	function new(arity:Int, type:Int)
 	{
@@ -16,7 +16,7 @@ import java.internal.Runtime;
 	}
 }
 
-@:nativegen @:native("haxe.lang.VarArgsBase") private class VarArgsBase extends Function
+@:nativegen @:native("haxe.lang.VarArgsBase") @:keep private class VarArgsBase extends Function
 {
 	public function __hx_invokeDynamic(dynArgs:Array<Dynamic>):Dynamic
 	{
@@ -24,7 +24,7 @@ import java.internal.Runtime;
 	}
 }
 
-@:nativegen @:native('haxe.lang.VarArgsFunction') class VarArgsFunction extends VarArgsBase
+@:nativegen @:native('haxe.lang.VarArgsFunction') @:keep class VarArgsFunction extends VarArgsBase
 {
 	private var fun:Array<Dynamic>->Dynamic;
 	
@@ -40,7 +40,7 @@ import java.internal.Runtime;
 	}
 }
 
-@:nativegen @:native('haxe.lang.Closure') class Closure extends VarArgsBase
+@:nativegen @:native('haxe.lang.Closure') @:keep class Closure extends VarArgsBase
 {
 	private var obj:Dynamic;
 	private var field:String;

File diff suppressed because it is too large
+ 0 - 0
std/java/internal/HxObject.hx


+ 1 - 0
std/java/internal/IEquatable.hx

@@ -1,6 +1,7 @@
 package java.internal;
 
 @:native('haxe.lang.IEquatable')
+@:keep
 interface IEquatable 
 {
 	

+ 2 - 0
std/java/internal/Iterator.hx

@@ -1,6 +1,7 @@
 package java.internal;
 
 @:native('haxe.lang.Iterator')
+@:keep
 interface Iterator<T>
 {
 	
@@ -11,6 +12,7 @@ interface Iterator<T>
 }
 
 @:native('haxe.lang.Iterable')
+@:keep
 interface Iterable<T>
 {
 	

+ 1 - 1
std/java/internal/Runtime.hx

@@ -538,7 +538,7 @@ package java.internal;
 	}
 }
 
-@:native("haxe.lang.EmptyObject") private enum EmptyObject
+@:keep @:native("haxe.lang.EmptyObject") private enum EmptyObject
 {
 	EMPTY;
 }

Some files were not shown because too many files changed in this diff