From 444ad1aa0bfdb72d38f63bb6069c4420593a897c Mon Sep 17 00:00:00 2001 From: Justin Donaldson Date: Thu, 27 Feb 2020 18:32:06 -0800 Subject: [PATCH] [lua] drop some refactored methods from lua.Boot --- std/lua/Boot.hx | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/std/lua/Boot.hx b/std/lua/Boot.hx index 14ee03fc037..c37534f31b0 100644 --- a/std/lua/Boot.hx +++ b/std/lua/Boot.hx @@ -39,8 +39,7 @@ class Boot { public static var platformBigEndian = NativeStringTools.byte(NativeStringTools.dump(function() {}), 7) > 0; - static var hiddenFields:Table = untyped __lua__("{__id__=true, hx__closures=true, super=true, prototype=true, __fields__=true, __ifields__=true, __class__=true, __properties__=true}"); + static var hiddenFields:Table = untyped __lua__("{__id__=true, hx__closures=true, super=true, prototype=true, __fields__=true, __ifields__=true, __class__=true, __properties__=true}"); static function __unhtml(s:String) return s.split("&").join("&").split("<").join("<").split(">").join(">"); @@ -271,32 +270,6 @@ class Boot { } } - public static function fieldIterator(o:Table):Iterator { - if (Lua.type(o) != "table") { - return { - next: function() return null, - hasNext: function() return false - } - } - var tbl:Table = cast(untyped o.__fields__ != null) ? o.__fields__ : o; - var cur = Lua.pairs(tbl).next; - var next_valid = function(tbl, val) { - while (hiddenFields[untyped val] != null) { - val = cur(tbl, val).index; - } - return val; - } - var cur_val = next_valid(tbl, cur(tbl, null).index); - return { - next: function() { - var ret = cur_val; - cur_val = next_valid(tbl, cur(tbl, cur_val).index); - return ret; - }, - hasNext: function() return cur_val != null - } - } - static var os_patterns = [ 'Windows' => ['windows', '^mingw', '^cygwin'], 'Linux' => ['linux'],