Browse Source

cleanup old unused classes

Nicolas Cannasse 13 years ago
parent
commit
f02c2578b8
3 changed files with 1 additions and 159 deletions
  1. 1 1
      doc/CHANGES.txt
  2. 0 98
      std/haxe/Firebug.hx
  3. 0 60
      std/haxe/TimerQueue.hx

+ 1 - 1
doc/CHANGES.txt

@@ -19,7 +19,7 @@
 	all : added --help-defines
 	all : DCE always run on standard library files
 	all : Haxe3 packages changes (see http://haxe.org/manual/haxe3)
-	all : Removed haxe.Int32
+	all : Removed haxe.Int32, haxe.Firebug, haxe.TimerQueue
 	
 2012-07-16: 2.10
 	java/cs : added two new targets (beta)

+ 0 - 98
std/haxe/Firebug.hx

@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2007, The haXe Project Contributors
- * All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *   - Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *   - Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE HAXE PROJECT CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE HAXE PROJECT CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- */
-package haxe;
-
-class Firebug {
-
-	public static function detect() : Bool {
-		#if js
-		try {
-			return untyped console != null && console.error != null;
-		} catch( e : Dynamic ) {
-			return false;
-		}
-		#elseif flash
-		if( !flash.external.ExternalInterface.available )
-			return false;
-		return flash.external.ExternalInterface.call("console.error.toString") != null;
-		#else
-		return true;
-		#end
-	}
-
-	public static function redirectTraces() {
-		haxe.Log.trace = trace;
-		#if flash9
-		#elseif flash
-		flash.Lib.setErrorHandler(onError);
-		#elseif js
-		js.Lib.setErrorHandler(onError);
-		#end
-	}
-
-	public static function onError( err : String, stack : Array<String> ) {
-		var buf = err+"\n";
-		for( s in stack )
-			buf += "Called from "+s+"\n";
-		haxe.Firebug.trace(buf,null);
-		#if js
-		return true;
-		#end
-	}
-
-	public static function trace(v : Dynamic, ?inf : haxe.PosInfos ) {
-		var type = if( inf != null && inf.customParams != null ) inf.customParams[0] else null;
-		if( type != "warn" && type != "info" && type != "debug" && type != "error" )
-			type = if( inf == null ) "error" else "log";
-		#if flash
-			var str = if( inf == null ) "" else inf.fileName + ":" + inf.lineNumber + " : ";
-			try	str += Std.string(v) catch( e : Dynamic ) str += "????";
-			#if flash9
-				// in Flash9, it is needed to use _self with getURL and
-				// only the latest call per frame is processed, so it's
-				// needed to use ExternalInterface (URLLoader displays
-				// security errors for remote files)
-				str = str.split("\\").join("\\\\");
-				flash.external.ExternalInterface.call("console."+type,str);
-			#else
-				str = str.split("\\").join("\\\\").split("'").join("\\'").split("\n").join("\\n").split("\r").join("\\r");
-				str = StringTools.urlEncode(str);
-				var out = "javascript:console."+ type +"('"+str+"');";
-				flash.Lib.getURL(out);
-			#end // flash9
-		#elseif js
-			untyped console[type]( (if( inf == null ) "" else inf.fileName+":"+inf.lineNumber+" : ") + Std.string(v) );
-		#elseif (neko || php)
-			var str = inf.fileName + ":" + inf.lineNumber + " : ";
-			try str += Std.string(v) catch( e : Dynamic ) str += "???";
-			#if neko
-			neko.Lib.print('<script type="text/javascript">console.'+type+'(decodeURIComponent("'+StringTools.urlEncode(str)+'"))</script>');
-			#else
-			php.Lib.print('<script type="text/javascript">console.'+type+'(decodeURIComponent("'+StringTools.urlEncode(str)+'"))</script>');
-			#end
-		#end
-	}
-
-}

+ 0 - 60
std/haxe/TimerQueue.hx

@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2008, The haXe Project Contributors
- * All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *   - Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *   - Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE HAXE PROJECT CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE HAXE PROJECT CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- */
-package haxe;
-
-#if (neko || php || cpp)
-#error
-#end
-
-class TimerQueue {
-
-	var delay : Int;
-	var t : haxe.Timer;
-	var q : Array<Void->Void>;
-
-	public function new( ?delay ) {
-		this.delay = delay == null ? 1 : delay;
-		q = new Array();
-	}
-
-	public function add(f) {
-		q.push(f);
-		if( t == null ) {
-			t = new haxe.Timer(delay);
-			t.run = process;
-		}
-	}
-
-	function process() {
-		var f = q.shift();
-		if( f == null ) {
-			t.stop();
-			t = null;
-			return;
-		}
-		f();
-	}
-
-}