Exemplo n.º 1
0
// These tests are checking that all slots of the current architecture can all
// be encoded and decoded correctly.  We iterate on all registers and on many
// fake stack locations (Fibonacci).
static RValueAllocation
Read(const RValueAllocation &slot)
{
    CompactBufferWriter writer;
    slot.write(writer);

    CompactBufferReader reader(writer);
    return RValueAllocation::read(reader);
}
Exemplo n.º 2
0
// These tests are checking that all slots of the current architecture can all
// be encoded and decoded correctly.  We iterate on all registers and on many
// fake stack locations (Fibonacci).
static RValueAllocation Read(const RValueAllocation& slot) {
  CompactBufferWriter writer;
  slot.write(writer);

  // Call hash to run its assertions.
  slot.hash();

  CompactBufferReader reader(writer);
  return RValueAllocation::read(reader);
}