mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 23:44:08 +00:00
Mirror of the LuaJIT git repository
![]() The interesting changes here revolve around slots marked as TREF_FRAME / TREF_CONT. Under !LJ_FR2, said slots contain two 32-bit values, and the TRef for the slot primarily relates to the low 32 bits. In a snapshot, the main SnapEntry relates to the low 32 bits, and the framelink from the snapshot is used to restore the high 32 bits. Under LJ_FR2, TREF_FRAME / TREF_CONT slots contain a single 64-bit value. The TRef relates to all 64 bits, the SnapEntry is used to restore all 64 bits, and no framelinks are required to restore the slot. Restoration is done via IR_KNUM constants, as the 64-bit values in question can be happily interpreted as denormal numbers. These constants are created lazily: the slots in question get set to just TREF_FRAME / TREF_CONT initially, and then if required for a snapshot, the ref part of the TRef is changed from zero to the index of a KNUM. Slot 1 is always zero, as although it is technically a frame link, it never needs to be changed or saved or restored. Though the framelink part of a snapshot isn't required for slot restoration under LJ_FR2, it is still used for restoring PC. As such, every snapshot has exactly two framelink entries, which are used to store a 64-bit value. Manipulations of J->maxslot are more interesting under LJ_FR2. For example, the BC_MOV of a method call can introduce a three-slot gap under LJ_FR2, whereas it could only introduce a one-slot gap under !LJ_FR2. Other instructions can now introduce a one-slot gap where previously they wouldn't ever introduce a gap. |
||
---|---|---|
doc | ||
dynasm | ||
etc | ||
src | ||
.gitignore | ||
COPYRIGHT | ||
Makefile | ||
README |
README for LuaJIT 2.1.0-beta2 ----------------------------- LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language. Project Homepage: http://luajit.org/ LuaJIT is Copyright (C) 2005-2016 Mike Pall. LuaJIT is free software, released under the MIT license. See full Copyright Notice in the COPYRIGHT file or in luajit.h. Documentation for LuaJIT is available in HTML format. Please point your favorite browser to: doc/luajit.html