[cleanup] Remove obsolete representations.

In the Crankshaft days we (mis)used the Representation to also express
the various internal representations that the compiler understands. But
with TurboFan we now have proper MachineRepresentation and MachineType,
which do that independently. So there's no need to have this in the
Representation class anymore, and instead the Representation class only
needs to deal with the field representations.

Bug: v8:8749, v8:8834, v8:8865
Change-Id: I34ea9558b5fdf20d6c7939b52762eaffd4316b06
Reviewed-on: https://chromium-review.googlesource.com/c/1479954
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59750}
This commit is contained in:
Benedikt Meurer 2019-02-21 06:32:29 +01:00 committed by Commit Bot
parent 9371781f60
commit adb7e37b28
10 changed files with 17 additions and 457 deletions

View File

@ -589,41 +589,6 @@ void TurboAssembler::Bfc(Register dst, Register src, int lsb, int width,
}
}
void MacroAssembler::Load(Register dst,
const MemOperand& src,
Representation r) {
DCHECK(!r.IsDouble());
if (r.IsInteger8()) {
ldrsb(dst, src);
} else if (r.IsUInteger8()) {
ldrb(dst, src);
} else if (r.IsInteger16()) {
ldrsh(dst, src);
} else if (r.IsUInteger16()) {
ldrh(dst, src);
} else {
ldr(dst, src);
}
}
void MacroAssembler::Store(Register src,
const MemOperand& dst,
Representation r) {
DCHECK(!r.IsDouble());
if (r.IsInteger8() || r.IsUInteger8()) {
strb(src, dst);
} else if (r.IsInteger16() || r.IsUInteger16()) {
strh(src, dst);
} else {
if (r.IsHeapObject()) {
AssertNotSmi(src);
} else if (r.IsSmi()) {
AssertSmi(src);
}
str(src, dst);
}
}
void TurboAssembler::LoadRoot(Register destination, RootIndex index,
Condition cond) {
ldr(destination,

View File

@ -560,9 +560,6 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
void Sbfx(Register dst, Register src, int lsb, int width,
Condition cond = al);
void Load(Register dst, const MemOperand& src, Representation r);
void Store(Register src, const MemOperand& dst, Representation r);
// ---------------------------------------------------------------------------
// GC Support

View File

@ -2401,20 +2401,6 @@ bool HeapObject::IsExternal(Isolate* isolate) const {
return map()->FindRootMap(isolate) == isolate->heap()->external_map();
}
const char* Representation::Mnemonic() const {
switch (kind_) {
case kNone: return "v";
case kTagged: return "t";
case kSmi: return "s";
case kDouble: return "d";
case kInteger32: return "i";
case kHeapObject: return "h";
case kExternal: return "x";
default:
UNREACHABLE();
}
}
void DescriptorArray::GeneralizeAllFields() {
int length = number_of_descriptors();
for (int i = 0; i < length; i++) {

View File

@ -87,16 +87,10 @@ class Representation {
public:
enum Kind {
kNone,
kInteger8,
kUInteger8,
kInteger16,
kUInteger16,
kSmi,
kInteger32,
kDouble,
kHeapObject,
kTagged,
kExternal,
kNumRepresentations
};
@ -104,15 +98,9 @@ class Representation {
static Representation None() { return Representation(kNone); }
static Representation Tagged() { return Representation(kTagged); }
static Representation Integer8() { return Representation(kInteger8); }
static Representation UInteger8() { return Representation(kUInteger8); }
static Representation Integer16() { return Representation(kInteger16); }
static Representation UInteger16() { return Representation(kUInteger16); }
static Representation Smi() { return Representation(kSmi); }
static Representation Integer32() { return Representation(kInteger32); }
static Representation Double() { return Representation(kDouble); }
static Representation HeapObject() { return Representation(kHeapObject); }
static Representation External() { return Representation(kExternal); }
static Representation FromKind(Kind kind) { return Representation(kind); }
@ -130,15 +118,7 @@ class Representation {
}
bool is_more_general_than(const Representation& other) const {
if (kind_ == kExternal && other.kind_ == kNone) return true;
if (kind_ == kExternal && other.kind_ == kExternal) return false;
if (kind_ == kNone && other.kind_ == kExternal) return false;
DCHECK_NE(kind_, kExternal);
DCHECK_NE(other.kind_, kExternal);
if (IsHeapObject()) return other.IsNone();
if (kind_ == kUInteger8 && other.kind_ == kInteger8) return false;
if (kind_ == kUInteger16 && other.kind_ == kInteger16) return false;
return kind_ > other.kind_;
}
@ -154,35 +134,35 @@ class Representation {
int size() const {
DCHECK(!IsNone());
if (IsInteger8() || IsUInteger8()) return kUInt8Size;
if (IsInteger16() || IsUInteger16()) return kUInt16Size;
if (IsInteger32()) return kInt32Size;
if (IsDouble()) return kDoubleSize;
if (IsExternal()) return kSystemPointerSize;
DCHECK(IsTagged() || IsSmi() || IsHeapObject());
return kTaggedSize;
}
Kind kind() const { return static_cast<Kind>(kind_); }
bool IsNone() const { return kind_ == kNone; }
bool IsInteger8() const { return kind_ == kInteger8; }
bool IsUInteger8() const { return kind_ == kUInteger8; }
bool IsInteger16() const { return kind_ == kInteger16; }
bool IsUInteger16() const { return kind_ == kUInteger16; }
bool IsTagged() const { return kind_ == kTagged; }
bool IsSmi() const { return kind_ == kSmi; }
bool IsSmiOrTagged() const { return IsSmi() || IsTagged(); }
bool IsInteger32() const { return kind_ == kInteger32; }
bool IsSmiOrInteger32() const { return IsSmi() || IsInteger32(); }
bool IsDouble() const { return kind_ == kDouble; }
bool IsHeapObject() const { return kind_ == kHeapObject; }
bool IsExternal() const { return kind_ == kExternal; }
bool IsSpecialization() const {
return IsInteger8() || IsUInteger8() ||
IsInteger16() || IsUInteger16() ||
IsSmi() || IsInteger32() || IsDouble();
bool IsSpecialization() const { return IsSmi() || IsDouble(); }
const char* Mnemonic() const {
switch (kind_) {
case kNone:
return "v";
case kTagged:
return "t";
case kSmi:
return "s";
case kDouble:
return "d";
case kHeapObject:
return "h";
}
UNREACHABLE();
}
const char* Mnemonic() const;
private:
explicit Representation(Kind k) : kind_(k) { }
@ -357,7 +337,7 @@ class PropertyDetails {
// Bit fields for fast objects.
class RepresentationField
: public BitField<uint32_t, AttributesField::kNext, 4> {};
: public BitField<uint32_t, AttributesField::kNext, 3> {};
class DescriptorPointer
: public BitField<uint32_t, RepresentationField::kNext,
kDescriptorIndexBitCount> {}; // NOLINT

View File

@ -1043,41 +1043,6 @@ void TurboAssembler::Cvttss2uiq(Register dst, XMMRegister src, Label* success) {
ConvertFloatToUint64<XMMRegister, false>(this, dst, src, success);
}
void MacroAssembler::Load(Register dst, Operand src, Representation r) {
DCHECK(!r.IsDouble());
if (r.IsInteger8()) {
movsxbq(dst, src);
} else if (r.IsUInteger8()) {
movzxbl(dst, src);
} else if (r.IsInteger16()) {
movsxwq(dst, src);
} else if (r.IsUInteger16()) {
movzxwl(dst, src);
} else if (r.IsInteger32()) {
movl(dst, src);
} else {
movq(dst, src);
}
}
void MacroAssembler::Store(Operand dst, Register src, Representation r) {
DCHECK(!r.IsDouble());
if (r.IsInteger8() || r.IsUInteger8()) {
movb(dst, src);
} else if (r.IsInteger16() || r.IsUInteger16()) {
movw(dst, src);
} else if (r.IsInteger32()) {
movl(dst, src);
} else {
if (r.IsHeapObject()) {
AssertNotSmi(src);
} else if (r.IsSmi()) {
AssertSmi(src);
}
movq(dst, src);
}
}
void TurboAssembler::Set(Register dst, int64_t x) {
if (x == 0) {
xorl(dst, dst);

View File

@ -704,10 +704,6 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
// ---------------------------------------------------------------------------
// Macro instructions.
// Load/store with specific representation.
void Load(Register dst, Operand src, Representation r);
void Store(Operand dst, Register src, Representation r);
void Cmp(Register dst, Handle<Object> source);
void Cmp(Operand dst, Handle<Object> source);
void Cmp(Register dst, Smi src);

View File

@ -47,93 +47,6 @@ using F = void*(int x, int y, int p2, int p3, int p4);
using F3 = void*(void* p0, int p1, int p2, int p3, int p4);
using F5 = int(void*, void*, void*, void*, void*);
TEST(LoadAndStoreWithRepresentation) {
Isolate* isolate = CcTest::i_isolate();
HandleScope handles(isolate);
auto buffer = AllocateAssemblerBuffer();
MacroAssembler assembler(isolate, v8::internal::CodeObjectRequired::kYes,
buffer->CreateView());
MacroAssembler* masm = &assembler; // Create a pointer for the __ macro.
__ sub(sp, sp, Operand(1 * kPointerSize));
Label exit;
// Test 1.
__ mov(r0, Operand(1)); // Test number.
__ mov(r1, Operand(0));
__ str(r1, MemOperand(sp, 0 * kPointerSize));
__ mov(r2, Operand(-1));
__ Store(r2, MemOperand(sp, 0 * kPointerSize), Representation::UInteger8());
__ ldr(r3, MemOperand(sp, 0 * kPointerSize));
__ mov(r2, Operand(255));
__ cmp(r3, r2);
__ b(ne, &exit);
__ mov(r2, Operand(255));
__ Load(r3, MemOperand(sp, 0 * kPointerSize), Representation::UInteger8());
__ cmp(r3, r2);
__ b(ne, &exit);
// Test 2.
__ mov(r0, Operand(2)); // Test number.
__ mov(r1, Operand(0));
__ str(r1, MemOperand(sp, 0 * kPointerSize));
__ mov(r2, Operand(-1));
__ Store(r2, MemOperand(sp, 0 * kPointerSize), Representation::Integer8());
__ ldr(r3, MemOperand(sp, 0 * kPointerSize));
__ mov(r2, Operand(255));
__ cmp(r3, r2);
__ b(ne, &exit);
__ mov(r2, Operand(-1));
__ Load(r3, MemOperand(sp, 0 * kPointerSize), Representation::Integer8());
__ cmp(r3, r2);
__ b(ne, &exit);
// Test 3.
__ mov(r0, Operand(3)); // Test number.
__ mov(r1, Operand(0));
__ str(r1, MemOperand(sp, 0 * kPointerSize));
__ mov(r2, Operand(-1));
__ Store(r2, MemOperand(sp, 0 * kPointerSize), Representation::UInteger16());
__ ldr(r3, MemOperand(sp, 0 * kPointerSize));
__ mov(r2, Operand(65535));
__ cmp(r3, r2);
__ b(ne, &exit);
__ mov(r2, Operand(65535));
__ Load(r3, MemOperand(sp, 0 * kPointerSize), Representation::UInteger16());
__ cmp(r3, r2);
__ b(ne, &exit);
// Test 4.
__ mov(r0, Operand(4)); // Test number.
__ mov(r1, Operand(0));
__ str(r1, MemOperand(sp, 0 * kPointerSize));
__ mov(r2, Operand(-1));
__ Store(r2, MemOperand(sp, 0 * kPointerSize), Representation::Integer16());
__ ldr(r3, MemOperand(sp, 0 * kPointerSize));
__ mov(r2, Operand(65535));
__ cmp(r3, r2);
__ b(ne, &exit);
__ mov(r2, Operand(-1));
__ Load(r3, MemOperand(sp, 0 * kPointerSize), Representation::Integer16());
__ cmp(r3, r2);
__ b(ne, &exit);
__ mov(r0, Operand(0)); // Success.
__ bind(&exit);
__ add(sp, sp, Operand(1 * kPointerSize));
__ bx(lr);
CodeDesc desc;
masm->GetCode(isolate, &desc);
Handle<Code> code =
isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
// Call the function from C++.
auto f = GeneratedCode<F5>::FromCode(*code);
CHECK(!f.Call(0, 0, 0, 0, 0));
}
TEST(ExtractLane) {
if (!CpuFeatures::IsSupported(NEON)) return;

View File

@ -808,167 +808,6 @@ TEST(OperandOffset) {
CHECK_EQ(0, result);
}
TEST(LoadAndStoreWithRepresentation) {
Isolate* isolate = CcTest::i_isolate();
HandleScope handles(isolate);
auto buffer = AllocateAssemblerBuffer();
MacroAssembler assembler(isolate, v8::internal::CodeObjectRequired::kYes,
buffer->CreateView());
MacroAssembler* masm = &assembler; // Create a pointer for the __ macro.
EntryCode(masm);
__ subq(rsp, Immediate(1 * kSystemPointerSize));
Label exit;
// Test 1.
__ movq(rax, Immediate(1)); // Test number.
__ movq(Operand(rsp, 0 * kSystemPointerSize), Immediate(0));
__ movq(rcx, Immediate(-1));
__ Store(Operand(rsp, 0 * kSystemPointerSize), rcx,
Representation::UInteger8());
__ movq(rcx, Operand(rsp, 0 * kSystemPointerSize));
__ movl(rdx, Immediate(255));
__ cmpq(rcx, rdx);
__ j(not_equal, &exit);
__ Load(rdx, Operand(rsp, 0 * kSystemPointerSize),
Representation::UInteger8());
__ cmpq(rcx, rdx);
__ j(not_equal, &exit);
// Test 2.
__ movq(rax, Immediate(2)); // Test number.
__ movq(Operand(rsp, 0 * kSystemPointerSize), Immediate(0));
__ Set(rcx, V8_2PART_UINT64_C(0xDEADBEAF, 12345678));
__ Store(Operand(rsp, 0 * kSystemPointerSize), rcx, Representation::Smi());
__ movq(rcx, Operand(rsp, 0 * kSystemPointerSize));
__ Set(rdx, V8_2PART_UINT64_C(0xDEADBEAF, 12345678));
__ cmpq(rcx, rdx);
__ j(not_equal, &exit);
__ Load(rdx, Operand(rsp, 0 * kSystemPointerSize), Representation::Smi());
__ cmpq(rcx, rdx);
__ j(not_equal, &exit);
// Test 3.
__ movq(rax, Immediate(3)); // Test number.
__ movq(Operand(rsp, 0 * kSystemPointerSize), Immediate(0));
__ movq(rcx, Immediate(-1));
__ Store(Operand(rsp, 0 * kSystemPointerSize), rcx,
Representation::Integer32());
__ movq(rcx, Operand(rsp, 0 * kSystemPointerSize));
__ movl(rdx, Immediate(-1));
__ cmpq(rcx, rdx);
__ j(not_equal, &exit);
__ Load(rdx, Operand(rsp, 0 * kSystemPointerSize),
Representation::Integer32());
__ cmpq(rcx, rdx);
__ j(not_equal, &exit);
// Test 4.
__ movq(rax, Immediate(4)); // Test number.
__ movq(Operand(rsp, 0 * kSystemPointerSize), Immediate(0));
__ movl(rcx, Immediate(0x44332211));
__ Store(Operand(rsp, 0 * kSystemPointerSize), rcx,
Representation::HeapObject());
__ movq(rcx, Operand(rsp, 0 * kSystemPointerSize));
__ movl(rdx, Immediate(0x44332211));
__ cmpq(rcx, rdx);
__ j(not_equal, &exit);
__ Load(rdx, Operand(rsp, 0 * kSystemPointerSize),
Representation::HeapObject());
__ cmpq(rcx, rdx);
__ j(not_equal, &exit);
// Test 5.
__ movq(rax, Immediate(5)); // Test number.
__ movq(Operand(rsp, 0 * kSystemPointerSize), Immediate(0));
__ Set(rcx, V8_2PART_UINT64_C(0x12345678, DEADBEAF));
__ Store(Operand(rsp, 0 * kSystemPointerSize), rcx, Representation::Tagged());
__ movq(rcx, Operand(rsp, 0 * kSystemPointerSize));
__ Set(rdx, V8_2PART_UINT64_C(0x12345678, DEADBEAF));
__ cmpq(rcx, rdx);
__ j(not_equal, &exit);
__ Load(rdx, Operand(rsp, 0 * kSystemPointerSize), Representation::Tagged());
__ cmpq(rcx, rdx);
__ j(not_equal, &exit);
// Test 6.
__ movq(rax, Immediate(6)); // Test number.
__ movq(Operand(rsp, 0 * kSystemPointerSize), Immediate(0));
__ Set(rcx, V8_2PART_UINT64_C(0x11223344, 55667788));
__ Store(Operand(rsp, 0 * kSystemPointerSize), rcx,
Representation::External());
__ movq(rcx, Operand(rsp, 0 * kSystemPointerSize));
__ Set(rdx, V8_2PART_UINT64_C(0x11223344, 55667788));
__ cmpq(rcx, rdx);
__ j(not_equal, &exit);
__ Load(rdx, Operand(rsp, 0 * kSystemPointerSize),
Representation::External());
__ cmpq(rcx, rdx);
__ j(not_equal, &exit);
// Test 7.
__ movq(rax, Immediate(7)); // Test number.
__ movq(Operand(rsp, 0 * kSystemPointerSize), Immediate(0));
__ movq(rcx, Immediate(-1));
__ Store(Operand(rsp, 0 * kSystemPointerSize), rcx,
Representation::Integer8());
__ movq(rcx, Operand(rsp, 0 * kSystemPointerSize));
__ movl(rdx, Immediate(255));
__ cmpq(rcx, rdx);
__ j(not_equal, &exit);
__ Load(rdx, Operand(rsp, 0 * kSystemPointerSize),
Representation::Integer8());
__ movq(rcx, Immediate(-1));
__ cmpq(rcx, rdx);
__ j(not_equal, &exit);
// Test 8.
__ movq(rax, Immediate(8)); // Test number.
__ movq(Operand(rsp, 0 * kSystemPointerSize), Immediate(0));
__ movq(rcx, Immediate(-1));
__ Store(Operand(rsp, 0 * kSystemPointerSize), rcx,
Representation::Integer16());
__ movq(rcx, Operand(rsp, 0 * kSystemPointerSize));
__ movl(rdx, Immediate(65535));
__ cmpq(rcx, rdx);
__ j(not_equal, &exit);
__ Load(rdx, Operand(rsp, 0 * kSystemPointerSize),
Representation::Integer16());
__ movq(rcx, Immediate(-1));
__ cmpq(rcx, rdx);
__ j(not_equal, &exit);
// Test 9.
__ movq(rax, Immediate(9)); // Test number.
__ movq(Operand(rsp, 0 * kSystemPointerSize), Immediate(0));
__ movq(rcx, Immediate(-1));
__ Store(Operand(rsp, 0 * kSystemPointerSize), rcx,
Representation::UInteger16());
__ movq(rcx, Operand(rsp, 0 * kSystemPointerSize));
__ movl(rdx, Immediate(65535));
__ cmpq(rcx, rdx);
__ j(not_equal, &exit);
__ Load(rdx, Operand(rsp, 0 * kSystemPointerSize),
Representation::UInteger16());
__ cmpq(rcx, rdx);
__ j(not_equal, &exit);
__ xorq(rax, rax); // Success.
__ bind(&exit);
__ addq(rsp, Immediate(1 * kSystemPointerSize));
ExitCode(masm);
__ ret(0);
CodeDesc desc;
masm->GetCode(isolate, &desc);
buffer->MakeExecutable();
// Call the function from C++.
auto f = GeneratedCode<F0>::FromBuffer(CcTest::i_isolate(), buffer->start());
int result = f.Call();
CHECK_EQ(0, result);
}
void TestFloat32x4Abs(MacroAssembler* masm, Label* exit, float x, float y,
float z, float w) {
__ subq(rsp, Immediate(kSimd128Size));

View File

@ -46,85 +46,16 @@ void TestPairNegative(Representation more_general,
TEST(RepresentationMoreGeneralThan) {
TestPairNegative(Representation::None(), Representation::None());
TestPairPositive(Representation::Integer8(), Representation::None());
TestPairPositive(Representation::UInteger8(), Representation::None());
TestPairPositive(Representation::Integer16(), Representation::None());
TestPairPositive(Representation::UInteger16(), Representation::None());
TestPairPositive(Representation::Smi(), Representation::None());
TestPairPositive(Representation::Integer32(), Representation::None());
TestPairPositive(Representation::HeapObject(), Representation::None());
TestPairPositive(Representation::Double(), Representation::None());
TestPairPositive(Representation::Tagged(), Representation::None());
TestPairNegative(Representation::None(), Representation::Integer8());
TestPairNegative(Representation::Integer8(), Representation::Integer8());
TestPairNegative(Representation::UInteger8(), Representation::Integer8());
TestPairPositive(Representation::Integer16(), Representation::Integer8());
TestPairPositive(Representation::UInteger16(), Representation::Integer8());
TestPairPositive(Representation::Smi(), Representation::Integer8());
TestPairPositive(Representation::Integer32(), Representation::Integer8());
TestPairNegative(Representation::HeapObject(), Representation::Integer8());
TestPairPositive(Representation::Double(), Representation::Integer8());
TestPairPositive(Representation::Tagged(), Representation::Integer8());
TestPairNegative(Representation::None(), Representation::UInteger8());
TestPairNegative(Representation::Integer8(), Representation::UInteger8());
TestPairNegative(Representation::UInteger8(), Representation::UInteger8());
TestPairPositive(Representation::Integer16(), Representation::UInteger8());
TestPairPositive(Representation::UInteger16(), Representation::UInteger8());
TestPairPositive(Representation::Smi(), Representation::UInteger8());
TestPairPositive(Representation::Integer32(), Representation::UInteger8());
TestPairNegative(Representation::HeapObject(), Representation::UInteger8());
TestPairPositive(Representation::Double(), Representation::UInteger8());
TestPairPositive(Representation::Tagged(), Representation::UInteger8());
TestPairNegative(Representation::None(), Representation::Integer16());
TestPairNegative(Representation::Integer8(), Representation::Integer16());
TestPairNegative(Representation::UInteger8(), Representation::Integer16());
TestPairNegative(Representation::Integer16(), Representation::Integer16());
TestPairNegative(Representation::UInteger16(), Representation::Integer16());
TestPairPositive(Representation::Smi(), Representation::Integer16());
TestPairPositive(Representation::Integer32(), Representation::Integer16());
TestPairNegative(Representation::HeapObject(), Representation::Integer16());
TestPairPositive(Representation::Double(), Representation::Integer16());
TestPairPositive(Representation::Tagged(), Representation::Integer16());
TestPairNegative(Representation::None(), Representation::UInteger16());
TestPairNegative(Representation::Integer8(), Representation::UInteger16());
TestPairNegative(Representation::UInteger8(), Representation::UInteger16());
TestPairNegative(Representation::Integer16(), Representation::UInteger16());
TestPairNegative(Representation::UInteger16(), Representation::UInteger16());
TestPairPositive(Representation::Smi(), Representation::UInteger16());
TestPairPositive(Representation::Integer32(), Representation::UInteger16());
TestPairNegative(Representation::HeapObject(), Representation::UInteger16());
TestPairPositive(Representation::Double(), Representation::UInteger16());
TestPairPositive(Representation::Tagged(), Representation::UInteger16());
TestPairNegative(Representation::None(), Representation::Smi());
TestPairNegative(Representation::Integer8(), Representation::Smi());
TestPairNegative(Representation::UInteger8(), Representation::Smi());
TestPairNegative(Representation::Integer16(), Representation::Smi());
TestPairNegative(Representation::UInteger16(), Representation::Smi());
TestPairNegative(Representation::Smi(), Representation::Smi());
TestPairPositive(Representation::Integer32(), Representation::Smi());
TestPairNegative(Representation::HeapObject(), Representation::Smi());
TestPairPositive(Representation::Double(), Representation::Smi());
TestPairPositive(Representation::Tagged(), Representation::Smi());
TestPairNegative(Representation::None(), Representation::Integer32());
TestPairNegative(Representation::Integer8(), Representation::Integer32());
TestPairNegative(Representation::UInteger8(), Representation::Integer32());
TestPairNegative(Representation::Integer16(), Representation::Integer32());
TestPairNegative(Representation::UInteger16(), Representation::Integer32());
TestPairNegative(Representation::Smi(), Representation::Integer32());
TestPairNegative(Representation::Integer32(), Representation::Integer32());
TestPairNegative(Representation::HeapObject(), Representation::Integer32());
TestPairPositive(Representation::Double(), Representation::Integer32());
TestPairPositive(Representation::Tagged(), Representation::Integer32());
TestPairNegative(Representation::None(), Representation::External());
TestPairNegative(Representation::External(), Representation::External());
TestPairPositive(Representation::External(), Representation::None());
}
} // namespace internal

View File

@ -126,26 +126,14 @@ consts_misc = [
'value': 'PropertyDetails::RepresentationField::kMask' },
{ 'name': 'prop_representation_shift',
'value': 'PropertyDetails::RepresentationField::kShift' },
{ 'name': 'prop_representation_integer8',
'value': 'Representation::Kind::kInteger8' },
{ 'name': 'prop_representation_uinteger8',
'value': 'Representation::Kind::kUInteger8' },
{ 'name': 'prop_representation_integer16',
'value': 'Representation::Kind::kInteger16' },
{ 'name': 'prop_representation_uinteger16',
'value': 'Representation::Kind::kUInteger16' },
{ 'name': 'prop_representation_smi',
'value': 'Representation::Kind::kSmi' },
{ 'name': 'prop_representation_integer32',
'value': 'Representation::Kind::kInteger32' },
{ 'name': 'prop_representation_double',
'value': 'Representation::Kind::kDouble' },
{ 'name': 'prop_representation_heapobject',
'value': 'Representation::Kind::kHeapObject' },
{ 'name': 'prop_representation_tagged',
'value': 'Representation::Kind::kTagged' },
{ 'name': 'prop_representation_external',
'value': 'Representation::Kind::kExternal' },
{ 'name': 'prop_desc_key',
'value': 'DescriptorArray::kEntryKeyIndex' },