Move TabPosition into its own file, and using it into the global
namespace the same way we do for Gfx::Orientation. This unbreaks the gn
build, and out of tree builds.
The backtrace execinfo API takes the number of addresses the result
buffer can hold instead of its size, for some reason. Previously
backtraces larger than 256 frames deep would write past the end of the
result buffer.
All the MOVs in the B8-BF range can use the REX.W prefix, not just B8.
Previously instructions like `48 B9... mov rcx, imm64` were interpreted
as `mov rcx, imm32` because the REX.W prefix was only applied to
`48 B8... mov rax, imm64`.
MAX_GENERATED_VALUES_PER_TEST is now the --randomized_runs flag:
$ ./Build/lagom/bin/TestGenerator --randomized_runs 1000
It's sometimes useful to try larger numbers for it instead of the
default of 100.
MAX_GEN_ATTEMPTS_PER_VALUE is now a constexpr. It's not usually needed
to tweak this value; we can recompile with a different value on the rare
occasion.
unsigned_int(0) doesn't need to draw bits from RandomnessSource.
An expression for getting INT_MAX for u32 didn't need to be
special-cased over the general formula.
This is a follow-up on a few comments
As it turns out, cxx_to_boolean() may return "bool" as other values
than just 0 or 1. This happens when the C++ compiler decides to only
update the AL portion of the RAX return value register instead of
the whole thing.
If a mov instruction is meant to be patchable, we don't want to rewrite
it as a xor, since that removes the slot where we'd patch in the right
value later.
Also, make sure to set both size bits in the REX prefix for xoring a
register with itself.
When we know the value is a positive Int32 less than 0x7fffffff,
it's safe to just add 1 to it and use that as the final result.
This avoids the work of re-adding the INT32_TAG.
Compiler now has a BasicBlockData struct for each BasicBlock. The struct
contains all the stuff that we previously stored with the
Bytecode::BasicBlock.
This uses a new branch_if_both_int32() helper.
It's interesting to note that we can compare encoded Int32 values
without stripping the INT32_TAG, since it doesn't affect signedness
of values.
We now generate a fast path for cached `this` values. The first time
`this` is resolved within a function, we call out to C++, but then
all subsequent accesses will hit the cache in Register::this_value().