aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm/stubs/ExecutableAllocator.h
Commit message (Collapse)AuthorAgeFilesLines
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Fix build on WinRTAndrew Knight2013-11-061-0/+2
| | | | | | | | Disable JIT and avoid unsupported functions under WinRT. Also add MSVC's ARM flag to the double conversion white list. Change-Id: I22ec340a20b113fdeefb802ac61812f78a527895 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Allow delayed deallocation in the executable memory allocatorSimon Hausmann2013-09-201-1/+1
| | | | | | | | | Allow for allocations to outlive the allocator itself. When the allocator dies, it invalidates any remaining non-free allocations, making them safe to delete later. Change-Id: I6c71cddbbd5dcaff1ad50f3991a3c710d4f96737 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix module name (QtQml) in the license header under src/3rdpartySergio Ahumada2013-06-261-2/+2
| | | | | | | | Also updating the copyright year to 2013 Change-Id: I743d93d13d1841e13600f7353c4fe3e05bbd7c32 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix exception handling not working reliably on x86/x86-64 Linux (Part 2)Simon Hausmann2013-05-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The registration of the unwind tables is done through the interposition of the _Unwind_Find_FDE symbol from libgcc. Unfortunately that interposition breaks when libgcc happens to come first in the linker scope. As it turns out, the order is not for us to control, therefore the interposition may not always work and our JIT generated functions may not get their unwind information found at exception throwing time. That results in the program aborting with an uncaught exception. The proposed solution of replacing the interposition approach is two-fold: (1) Go back to calling __register_frame explicitly, but only for functions that exception _may_ pass through. In addition the performance of scalability of the objects registered with __register_frame is a known issue upstream, as the LLVM JIT also triggers the issue. It is being tracked at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56460 (2) Instead of registering one FDE per function, we can theoretically register one FDE for _all_ JIT generate functions, because they all use the same stack layout that has exactly the same unwinding requirements from any function call site. Since we can't guarantee the presence of all JIT generated code within the same contiguous memory area, we can at least do it per executable memory allocation chunk (page size). One chunk can contain many functions. This patch implements part (2) by moving the per-function unwind info straight to into the executable memory chunk and registering the entire chunk (page) with libgcc. This also separates the regexp JIT executable memory from regular functions, because only for the memory of the latter we need to register unwind info. Change-Id: Ic4d1978686463c6d319436c9083e4d7cf0409829 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Suppress unused parameter warning.Erik Verbruggen2013-04-241-0/+2
| | | | | Change-Id: I1dcc3f2c5ee85f3c21035e5c93188c841c727727 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Rename QQmlJS::VM namespace to QV4Lars Knoll2013-04-191-5/+5
| | | | | | | Simplifies writing code against it (less stuff to type). Change-Id: I8ac03ca2519375a204a3245e82c4be4cf1e793eb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* iOS: Don't enable PROT_WRITE and PROT_EXEC at the same timeTor Arne Vestbø2013-04-171-2/+15
| | | | | | | | We define ENABLE_ASSEMBLER_WX_EXCLUSIVE, which we use to limit the page flags to either RW or RX. Change-Id: I253648ea98610438a533c7a7ccbf5c27c3b8230a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix compilation with built-in v4vm JS engineSimon Hausmann2013-04-151-1/+1
| | | | | Change-Id: Ieda9267e296acf6392a5461f4cfb9233a7a409a0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix memory allocation of executable codeSimon Hausmann2013-04-011-20/+17
| | | | | | | | | | | | | | Previously we allocated at least one page for each compiled function, even if it required less bytes (common). That causes excessive memory usages for large scripts or long running scripts with frequent eval usage. This patch introduces a simple allocator that allocates also on page granularity from the system but allocates the remaining space in the pages in sub-sequent calls. It is optimized to scale with the number of requests and also return pages to the system as soon as possible. Change-Id: I0751a8094afe97e94b5f44c6a691a679ecdb1df0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make ExecutableAllocator compile on WindowsSimon Hausmann2013-02-091-0/+17
| | | | | | | Use VirtualAlloc and friends instead of mmap. Change-Id: I52a90cebb111cf923d86ce6a821717dc7e02ad85 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Centralize code to determine system page sizeSimon Hausmann2013-02-091-2/+3
| | | | | | | | Use the existing WTF::pageSize() instead of calling sysconf ourselves. Change-Id: If68c793898253a239e13070e3454653474f61790 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Say hello to QtV4 module.Jędrzej Nowacki2013-01-301-0/+105
Change-Id: I507cd5707b7d7223a0d901cf939896fb2649b684 Reviewed-by: Lars Knoll <lars.knoll@digia.com>