From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 0902A580C9B; Wed, 16 Aug 2023 16:55:14 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0902A580C9B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1692194114; bh=ih5rGcHZbEMbIQfXr0Gtd28PJ5utPFYslXGagvzbBO8=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=jPG2JlmQM/XdI50L9lOHKrhcE1IDqT0bEzD5dnrlHz/tjZMSVUwfNa4kmbqQpvFOD LmA9Y7R8rRp9Ob9aVvMsW1hDnn2vSuWpidQ38ogOYIIAstz/hO8Dt7Z+jAWoMluH5N J+BenZxa0GuosXBW/GgQINi5+KTj5Swkfxd7bXq8= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 73B1C532601 for ; Wed, 16 Aug 2023 16:55:13 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 73B1C532601 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1qWGzQ-00059G-GG; Wed, 16 Aug 2023 16:55:13 +0300 Date: Wed, 16 Aug 2023 16:50:25 +0300 To: Maxim Kokryashkin Message-ID: References: <86adbae13323277ea291b7e3a709fc166086fbd3.1691592488.git.skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9700E0DCE2907754D95806DAC0DCD7A79EE131D84D5F0C13A182A05F53808504000FFFFCE3D3B2E689AE948A5ED5CF96DF755B288FF7ED64F953AA984B73D8748 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7495A032B936E882FEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637B84F9009663064BD8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8CE0FF3CEB209A919B51BA93C38D32CA4117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCE1488AC3D4DED311A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD186FD1C55BDD38FC3FD2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8B3A703B70628EAD7BAAAE862A0553A39223F8577A6DFFEA7C5351985B4A98E2A443847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A5A7CA2847EBCE166E0DEF084A0FA9684D8EC978852DE0A2ACF87CCE6106E1FC07E67D4AC08A07B9B01DAA61796BF5227BCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFE5D2E102BAE7A203BDA0233D786D0D3D4245F5E51BA947C9ADDF76494A6A3D78A4BD9291AB2A845624F7434E9608BF9FDDF4E677ECAA00D360A0700D09CBAA69A74DFFEFA5DC0E7F02C26D483E81D6BE5EF9655DD6DEA7D65774BB76CC95456EEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojHVl7ekwB6hjYSImECjFIMA== X-DA7885C5: DEF74FFA25DE5E54F72E80A5E00E94AB44A03D42CE3DC7865E132285E12CAA6B262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73930F533AC2B33E986B1D0D42677DE8E5D3FE8E4989ADFE15F70FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 08/19] Windows: Add UWP support, part 1. X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Maxim! Thanks for the review! Fixed your comments inline. On 15.08.23, Maxim Kokryashkin wrote: > Hi, Sergey! > Thanks for the patch! > LGTM, except for a few comments below. > On Wed, Aug 09, 2023 at 06:35:57PM +0300, Sergey Kaplun via Tarantool-patches wrote: > > From: Mike Pall > > > > Contributed by Ben Pye. > > > > (cherry-picked from commit c3c54ce1aef782823936808a75460e6b53aada2c) > > > > This patch adds partial support for the Universal Windows Platform [1] > > in LuaJIT. > > This includes: > > * `LJ_TARGET_UWP` is introduced to mark that target is Universal Windows > Typo: s/is Unviersal/is the Universal/ Fixed. > > Platform. > > * `LJ_WIN_VALLOC()` macro is introduced to use instead of > Typo: s/to use/to be used/ Fixed. > > `VirtualAlloc()` [2] (`VirtualAllocFromApp()` [3] for UWP) > > * `LJ_WIN_VPROTECT()` macro is introduced to use instead of > Typo: s/to use/to be used/ Fixed. > > `VirtualProtect()` [4] (`VirtualProtectFromApp()` [5] for UWP) > > * `LJ_WIN_LOADLIBA()` macro is introduced to use instead of > Typo: s/to use/to be used/ Fixed. > > `LoadLibraryExA()` [6] (custom implementation using > > `LoadPackagedLibrary()` [7] for UWP). > > > > Note that the following features are not implemented for UWP: > > * `io.popen()`. > > * LuaJIT profiler's (`jit.p`) timer for Windows has not very high > > resolution since `timeBeginPeriod()` [8] and `timeEndPeriod()` [9] are > Typo: s/not very high/a low/ Fixed. > > not used, because the library isn't loaded. > > > > [1]: https://learn.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide > > [2]: https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualalloc > > [3]: https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualallocfromapp > > [4]: https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualprotect > > [5]: https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualprotectfromapp > > [6]: https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryexa > > [7]: https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-loadpackagedlibrary > > [8]: https://learn.microsoft.com/en-us/windows/win32/api/timeapi/nf-timeapi-timebeginperiod > > [9]: https://learn.microsoft.com/en-us/windows/win32/api/timeapi/nf-timeapi-timeendperiod > > > > Sergey Kaplun: > > * added the description for the feature > > > > Part of tarantool/tarantool#8825 > > --- > > +#if LJ_TARGET_UWP > > + case H_(a40f0bcb,a40f0bcb): b = 1; break; /* uwp */ > > #endif > It is not obvious what happens here and it is not mentioned in the commit message. > Please add a description of this change too. Added. > > case H_(3af93066,1f001464): b = 1; break; /* le/be */ The new commit message is the following: | Windows: Add UWP support, part 1. | | Contributed by Ben Pye. | | (cherry-picked from commit c3c54ce1aef782823936808a75460e6b53aada2c) | | This patch adds partial support for the Universal Windows Platform [1] | in LuaJIT. | This includes: | * `LJ_TARGET_UWP` is introduced to mark that target is the Universal | Windows Platform. | * `LJ_WIN_VALLOC()` macro is introduced to be used instead of | `VirtualAlloc()` [2] (`VirtualAllocFromApp()` [3] for UWP) | * `LJ_WIN_VPROTECT()` macro is introduced to be used instead of | `VirtualProtect()` [4] (`VirtualProtectFromApp()` [5] for UWP) | * `LJ_WIN_LOADLIBA()` macro is introduced to be used instead of | `LoadLibraryExA()` [6] (custom implementation using | `LoadPackagedLibrary()` [7] for UWP). | * Now `ffi.abi()` also provides information about "uwp" parameter for | target ABI. | | Note that the following features are not implemented for UWP: | * `io.popen()`. | * LuaJIT profiler's (`jit.p`) timer for Windows has a low resolution | since `timeBeginPeriod()` [8] and `timeEndPeriod()` [9] are not used, | because the library isn't loaded. | | [1]: https://learn.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide | [2]: https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualalloc | [3]: https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualallocfromapp | [4]: https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualprotect | [5]: https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualprotectfromapp | [6]: https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryexa | [7]: https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-loadpackagedlibrary | [8]: https://learn.microsoft.com/en-us/windows/win32/api/timeapi/nf-timeapi-timebeginperiod | [9]: https://learn.microsoft.com/en-us/windows/win32/api/timeapi/nf-timeapi-timeendperiod | | Sergey Kaplun: | * added the description for the feature | | Part of tarantool/tarantool#8825 > > -- Best regards, Sergey Kaplun