From 480e17098a2cc5461a75459dd98d3cd6ae69febd Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Sun, 22 Apr 2018 22:30:01 -0700 Subject: [PATCH] Apply C++ noDebug to a few more classes --- lime/_macros/EventMacro.hx | 9 ++++++++- lime/_macros/HTTPRequestMacro.hx | 10 +++++++++- lime/graphics/GLRenderContext.hx | 5 +++++ lime/net/HTTPRequest.hx | 16 ++++++++++++++++ lime/net/curl/CURL.hx | 5 +++++ lime/text/unifill/CodePointIter.hx | 5 +++++ lime/text/unifill/Exception.hx | 15 +++++++++++++++ lime/text/unifill/InternalEncoding.hx | 5 +++++ .../text/unifill/InternalEncodingBackwardIter.hx | 5 +++++ lime/text/unifill/InternalEncodingIter.hx | 5 +++++ lime/text/unifill/Unicode.hx | 5 +++++ lime/text/unifill/Unifill.hx | 5 +++++ 12 files changed, 88 insertions(+), 2 deletions(-) diff --git a/lime/_macros/EventMacro.hx b/lime/_macros/EventMacro.hx index e44822682..1d44d0d5e 100644 --- a/lime/_macros/EventMacro.hx +++ b/lime/_macros/EventMacro.hx @@ -142,6 +142,13 @@ class EventMacro { fields.push ( { name: "__listeners", access: [ APublic ], kind: FVar (TPath ({ pack: [], name: "Array", params: [ TPType (typeParam.toComplexType ()) ] })), pos: pos } ); fields.push ( { name: "dispatch", access: [ APublic ], kind: FFun ( { args: args, expr: dispatch, params: [], ret: macro :Void } ), pos: pos } ); + var meta:Array = [ { name: ":dox", params: [ macro hide ], pos: pos }, { name: ":noCompletion", pos: pos } ]; + + #if !lime_debug + meta.push ({ name: ":fileXml", params: [ macro 'tags="haxe,release"' ], pos: pos }); + meta.push ({ name: ":noDebug", pos: pos }); + #end + Context.defineType ({ pos: pos, @@ -150,7 +157,7 @@ class EventMacro { kind: TDClass (), fields: fields, params: [ { name: "T" } ], - meta: [ { name: ":dox", params: [ macro hide ], pos: pos }, { name: ":noCompletion", pos: pos } ] + meta: meta }); diff --git a/lime/_macros/HTTPRequestMacro.hx b/lime/_macros/HTTPRequestMacro.hx index e1769adee..4828e2959 100644 --- a/lime/_macros/HTTPRequestMacro.hx +++ b/lime/_macros/HTTPRequestMacro.hx @@ -132,13 +132,21 @@ class HTTPRequestMacro { { name: "fromBytes", access: [ APrivate, AOverride ], kind: FFun ( { args: [ { name: "bytes", type: macro :haxe.io.Bytes } ], expr: Context.parse ("return " + typeString + ".fromBytes (bytes)", pos), params: [], ret: paramType.toComplexType () } ), pos: pos } ]; + var meta:Array = []; + + #if !lime_debug + meta.push ({ name: ":fileXml", params: [ macro 'tags="haxe,release"' ], pos: pos }); + meta.push ({ name: ":noDebug", pos: pos }); + #end + Context.defineType ({ name: name, pack: [ "lime", "net" ], kind: TDClass ({ pack: [ "lime", "net" ], name: "HTTPRequest", sub: "_HTTPRequest_Bytes", params: [ TPType (paramType.toComplexType ()) ] }, null, false), fields: fields, - pos: pos + pos: pos, + meta: meta }); diff --git a/lime/graphics/GLRenderContext.hx b/lime/graphics/GLRenderContext.hx index 322299fe8..04f787805 100644 --- a/lime/graphics/GLRenderContext.hx +++ b/lime/graphics/GLRenderContext.hx @@ -33,6 +33,11 @@ import lime.utils.DataPointer; import js.html.CanvasElement; #end +#if !lime_debug +@:fileXml('tags="haxe,release"') +@:noDebug +#end + class GLRenderContext { diff --git a/lime/net/HTTPRequest.hx b/lime/net/HTTPRequest.hx index 60151fd44..c9cdba1d7 100644 --- a/lime/net/HTTPRequest.hx +++ b/lime/net/HTTPRequest.hx @@ -24,6 +24,12 @@ class HTTPRequest { #end class HTTPRequest extends AbstractHTTPRequest {} + +#if !lime_debug +@:fileXml('tags="haxe,release"') +@:noDebug +#end + private class AbstractHTTPRequest implements _IHTTPRequest { #end @@ -91,6 +97,11 @@ private class AbstractHTTPRequest implements _IHTTPRequest { #if !display +#if !lime_debug +@:fileXml('tags="haxe,release"') +@:noDebug +#end + class _HTTPRequest_Bytes extends AbstractHTTPRequest { @@ -137,6 +148,11 @@ class _HTTPRequest_Bytes extends AbstractHTTPRequest { } +#if !lime_debug +@:fileXml('tags="haxe,release"') +@:noDebug +#end + class _HTTPRequest_String extends AbstractHTTPRequest { diff --git a/lime/net/curl/CURL.hx b/lime/net/curl/CURL.hx index eefd208e6..8157a4421 100644 --- a/lime/net/curl/CURL.hx +++ b/lime/net/curl/CURL.hx @@ -5,6 +5,11 @@ import haxe.io.Bytes; import lime._backend.native.NativeCFFI; import lime.system.CFFIPointer; +#if !lime_debug +@:fileXml('tags="haxe,release"') +@:noDebug +#end + @:access(lime._backend.native.NativeCFFI) diff --git a/lime/text/unifill/CodePointIter.hx b/lime/text/unifill/CodePointIter.hx index 209cac899..355a5780b 100755 --- a/lime/text/unifill/CodePointIter.hx +++ b/lime/text/unifill/CodePointIter.hx @@ -1,5 +1,10 @@ package lime.text.unifill; +#if !lime_debug +@:fileXml('tags="haxe,release"') +@:noDebug +#end + class CodePointIter { var string : String; diff --git a/lime/text/unifill/Exception.hx b/lime/text/unifill/Exception.hx index e6da7e29e..8d261e257 100755 --- a/lime/text/unifill/Exception.hx +++ b/lime/text/unifill/Exception.hx @@ -1,5 +1,10 @@ package lime.text.unifill; +#if !lime_debug +@:fileXml('tags="haxe,release"') +@:noDebug +#end + class Exception { function new() { } @@ -8,6 +13,11 @@ class Exception { } } +#if !lime_debug +@:fileXml('tags="haxe,release"') +@:noDebug +#end + class InvalidCodePoint extends Exception { public var code(default, null) : Int; public function new(code : Int) { @@ -19,6 +29,11 @@ class InvalidCodePoint extends Exception { } } +#if !lime_debug +@:fileXml('tags="haxe,release"') +@:noDebug +#end + class InvalidCodeUnitSequence extends Exception { public var index(default, null) : Int; public function new(index : Int) { diff --git a/lime/text/unifill/InternalEncoding.hx b/lime/text/unifill/InternalEncoding.hx index 621e5fc89..12c3ba0ce 100755 --- a/lime/text/unifill/InternalEncoding.hx +++ b/lime/text/unifill/InternalEncoding.hx @@ -8,6 +8,11 @@ package lime.text.unifill; private typedef UtfX = Utf16; #end +#if !lime_debug +@:fileXml('tags="haxe,release"') +@:noDebug +#end + /** InternalEncoding provides primitive API to deal with strings across all platforms. You should consider adopting Unifill before this. diff --git a/lime/text/unifill/InternalEncodingBackwardIter.hx b/lime/text/unifill/InternalEncodingBackwardIter.hx index c42cb25fa..6809487d1 100755 --- a/lime/text/unifill/InternalEncodingBackwardIter.hx +++ b/lime/text/unifill/InternalEncodingBackwardIter.hx @@ -1,5 +1,10 @@ package lime.text.unifill; +#if !lime_debug +@:fileXml('tags="haxe,release"') +@:noDebug +#end + class InternalEncodingBackwardIter { public var string : String; diff --git a/lime/text/unifill/InternalEncodingIter.hx b/lime/text/unifill/InternalEncodingIter.hx index 1ab286bc0..2805d68d4 100755 --- a/lime/text/unifill/InternalEncodingIter.hx +++ b/lime/text/unifill/InternalEncodingIter.hx @@ -1,5 +1,10 @@ package lime.text.unifill; +#if !lime_debug +@:fileXml('tags="haxe,release"') +@:noDebug +#end + class InternalEncodingIter { public var string : String; diff --git a/lime/text/unifill/Unicode.hx b/lime/text/unifill/Unicode.hx index 7a64159f9..479e49ddb 100755 --- a/lime/text/unifill/Unicode.hx +++ b/lime/text/unifill/Unicode.hx @@ -1,5 +1,10 @@ package lime.text.unifill; +#if !lime_debug +@:fileXml('tags="haxe,release"') +@:noDebug +#end + class Unicode { public static inline var minCodePoint : Int = 0x0000; diff --git a/lime/text/unifill/Unifill.hx b/lime/text/unifill/Unifill.hx index 1beb06188..dc4344e6a 100755 --- a/lime/text/unifill/Unifill.hx +++ b/lime/text/unifill/Unifill.hx @@ -1,5 +1,10 @@ package lime.text.unifill; +#if !lime_debug +@:fileXml('tags="haxe,release"') +@:noDebug +#end + /** Unifill provides Unicode-code-point-wise methods on Strings. It is ideally used with 'using Unifill' and then acts as an extension to