Skip to content

Commit

Permalink
haxeui_experimental_no_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Sep 2, 2024
1 parent d9b93fe commit 45b1cb3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions haxe/ui/macros/ModuleMacros.hx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ class ModuleMacros {
#end

macro public static function processModules():Expr {
#if !haxeui_experimental_no_cache
if (_modulesProcessed == true) {
return macro null;
}
#end

#if haxeui_macro_times
var stopTimer = Context.timer("ModuleMacros.processModules");
Expand Down
4 changes: 4 additions & 0 deletions haxe/ui/macros/NativeMacros.hx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ class NativeMacros {
private static var _nativeProcessed:Bool;

macro public static function processNative():Expr {
#if !haxeui_experimental_no_cache
if (_nativeProcessed == true) {
return macro null;
}
#end

_nativeProcessed = true;

Expand All @@ -32,9 +34,11 @@ class NativeMacros {
private static var _nativeConfigLoaded:Bool = false;
private static var _nativeConfigs:Array<GenericConfig> = new Array<GenericConfig>();
public static function loadNativeConfig():Array<GenericConfig> {
#if !haxeui_experimental_no_cache
if (_nativeConfigLoaded == true) {
return _nativeConfigs;
}
#end

#if haxeui_macro_times
var stopTimer = Context.timer("NativeMacros.loadNativeConfig");
Expand Down
3 changes: 3 additions & 0 deletions haxe/ui/util/RTTI.hx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ typedef RTTIProperty = {
}

class RTTI {
#if haxeui_experimental_no_cache
@:persistent
#end
public static var classInfo:Map<String, RTTIEntry> = null;

public static function addClassProperty(className:String, propertyName:String, propertyType:String) {
Expand Down

0 comments on commit 45b1cb3

Please sign in to comment.