Revision: 21227
Author: [email protected]
Date: Fri May 9 14:28:59 2014 UTC
Log: [Sheriff] This reverts commits r21225 and r21226 for breaking
Linux64 build.
Revert "Make BitField3 a raw uint32 field, and move to the start of the
map."
Revert "Make space available in bf3 by moving FunctionWithPrototype to bf1"
[email protected]
Review URL: https://codereview.chromium.org/278883002
http://code.google.com/p/v8/source/detail?r=21227
Modified:
/branches/bleeding_edge/src/arm/full-codegen-arm.cc
/branches/bleeding_edge/src/arm/macro-assembler-arm.cc
/branches/bleeding_edge/src/arm/macro-assembler-arm.h
/branches/bleeding_edge/src/arm64/macro-assembler-arm64.cc
/branches/bleeding_edge/src/arm64/macro-assembler-arm64.h
/branches/bleeding_edge/src/ia32/full-codegen-ia32.cc
/branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc
/branches/bleeding_edge/src/ia32/macro-assembler-ia32.h
/branches/bleeding_edge/src/objects-inl.h
/branches/bleeding_edge/src/objects.cc
/branches/bleeding_edge/src/objects.h
/branches/bleeding_edge/src/x64/full-codegen-x64.cc
/branches/bleeding_edge/src/x64/macro-assembler-x64.cc
/branches/bleeding_edge/src/x64/macro-assembler-x64.h
=======================================
--- /branches/bleeding_edge/src/arm/full-codegen-arm.cc Fri May 9 13:18:25
2014 UTC
+++ /branches/bleeding_edge/src/arm/full-codegen-arm.cc Fri May 9 14:28:59
2014 UTC
@@ -3047,7 +3047,7 @@
__ add(r4, r4, Operand(DescriptorArray::kFirstOffset - kHeapObjectTag));
// Calculate the end of the descriptor array.
__ mov(r2, r4);
- __ add(r2, r2, Operand(r3, LSL, kPointerSizeLog2));
+ __ add(r2, r2, Operand::PointerOffsetFromSmiKey(r3));
// Loop through all the keys in the descriptor array. If one of these is
the
// string "valueOf" the result is false.
=======================================
--- /branches/bleeding_edge/src/arm/macro-assembler-arm.cc Fri May 9
13:18:25 2014 UTC
+++ /branches/bleeding_edge/src/arm/macro-assembler-arm.cc Fri May 9
14:28:59 2014 UTC
@@ -3596,7 +3596,7 @@
if (map->CanBeDeprecated()) {
mov(scratch, Operand(map));
ldr(scratch, FieldMemOperand(scratch, Map::kBitField3Offset));
- tst(scratch, Operand(Map::Deprecated::kMask));
+ tst(scratch, Operand(Smi::FromInt(Map::Deprecated::kMask)));
b(ne, if_deprecated);
}
}
@@ -3854,8 +3854,7 @@
void MacroAssembler::EnumLength(Register dst, Register map) {
STATIC_ASSERT(Map::EnumLengthBits::kShift == 0);
ldr(dst, FieldMemOperand(map, Map::kBitField3Offset));
- and_(dst, dst, Operand(Map::EnumLengthBits::kMask));
- SmiTag(dst);
+ and_(dst, dst, Operand(Smi::FromInt(Map::EnumLengthBits::kMask)));
}
=======================================
--- /branches/bleeding_edge/src/arm/macro-assembler-arm.h Fri May 9
13:18:25 2014 UTC
+++ /branches/bleeding_edge/src/arm/macro-assembler-arm.h Fri May 9
14:28:59 2014 UTC
@@ -1357,7 +1357,7 @@
template<typename Field>
void DecodeField(Register reg) {
static const int shift = Field::kShift;
- static const int mask = Field::kMask >> shift;
+ static const int mask = (Field::kMask >> shift) << kSmiTagSize;
mov(reg, Operand(reg, LSR, shift));
and_(reg, reg, Operand(mask));
}
=======================================
--- /branches/bleeding_edge/src/arm64/macro-assembler-arm64.cc Fri May 9
13:18:25 2014 UTC
+++ /branches/bleeding_edge/src/arm64/macro-assembler-arm64.cc Fri May 9
14:28:59 2014 UTC
@@ -1325,14 +1325,15 @@
void MacroAssembler::EnumLengthUntagged(Register dst, Register map) {
STATIC_ASSERT(Map::EnumLengthBits::kShift == 0);
- Ldrsw(dst, FieldMemOperand(map, Map::kBitField3Offset));
+ Ldrsw(dst, UntagSmiFieldMemOperand(map, Map::kBitField3Offset));
And(dst, dst, Map::EnumLengthBits::kMask);
}
void MacroAssembler::EnumLengthSmi(Register dst, Register map) {
- EnumLengthUntagged(dst, map);
- SmiTag(dst, dst);
+ STATIC_ASSERT(Map::EnumLengthBits::kShift == 0);
+ Ldr(dst, FieldMemOperand(map, Map::kBitField3Offset));
+ And(dst, dst, Smi::FromInt(Map::EnumLengthBits::kMask));
}
@@ -4514,7 +4515,7 @@
Label* if_deprecated) {
if (map->CanBeDeprecated()) {
Mov(scratch, Operand(map));
- Ldrsw(scratch, FieldMemOperand(scratch, Map::kBitField3Offset));
+ Ldrsw(scratch, UntagSmiFieldMemOperand(scratch,
Map::kBitField3Offset));
TestAndBranchIfAnySet(scratch, Map::Deprecated::kMask, if_deprecated);
}
}
=======================================
--- /branches/bleeding_edge/src/arm64/macro-assembler-arm64.h Fri May 9
13:18:25 2014 UTC
+++ /branches/bleeding_edge/src/arm64/macro-assembler-arm64.h Fri May 9
14:28:59 2014 UTC
@@ -843,7 +843,7 @@
template<typename Field>
void DecodeField(Register reg) {
- static const uint64_t shift = Field::kShift;
+ static const uint64_t shift = Field::kShift + kSmiShift;
static const uint64_t setbits = CountSetBits(Field::kMask, 32);
Ubfx(reg, reg, shift, setbits);
}
=======================================
--- /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc Fri May 9
13:18:25 2014 UTC
+++ /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc Fri May 9
14:28:59 2014 UTC
@@ -2986,7 +2986,7 @@
STATIC_ASSERT(kSmiTagSize == 1);
STATIC_ASSERT(kPointerSize == 4);
__ imul(ecx, ecx, DescriptorArray::kDescriptorSize);
- __ lea(ecx, Operand(ebx, ecx, times_4, DescriptorArray::kFirstOffset));
+ __ lea(ecx, Operand(ebx, ecx, times_2, DescriptorArray::kFirstOffset));
// Calculate location of the first key name.
__ add(ebx, Immediate(DescriptorArray::kFirstOffset));
// Loop through all the keys in the descriptor array. If one of these is
the
=======================================
--- /branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc Fri May 9
13:18:25 2014 UTC
+++ /branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc Fri May 9
14:28:59 2014 UTC
@@ -3182,7 +3182,7 @@
if (map->CanBeDeprecated()) {
mov(scratch, map);
mov(scratch, FieldOperand(scratch, Map::kBitField3Offset));
- and_(scratch, Immediate(Map::Deprecated::kMask));
+ and_(scratch, Immediate(Smi::FromInt(Map::Deprecated::kMask)));
j(not_zero, if_deprecated);
}
}
@@ -3360,8 +3360,7 @@
void MacroAssembler::EnumLength(Register dst, Register map) {
STATIC_ASSERT(Map::EnumLengthBits::kShift == 0);
mov(dst, FieldOperand(map, Map::kBitField3Offset));
- and_(dst, Immediate(Map::EnumLengthBits::kMask));
- SmiTag(dst);
+ and_(dst, Immediate(Smi::FromInt(Map::EnumLengthBits::kMask)));
}
=======================================
--- /branches/bleeding_edge/src/ia32/macro-assembler-ia32.h Fri May 9
13:18:25 2014 UTC
+++ /branches/bleeding_edge/src/ia32/macro-assembler-ia32.h Fri May 9
14:28:59 2014 UTC
@@ -495,7 +495,7 @@
template<typename Field>
void DecodeField(Register reg) {
static const int shift = Field::kShift;
- static const int mask = Field::kMask >> Field::kShift;
+ static const int mask = (Field::kMask >> Field::kShift) << kSmiTagSize;
sar(reg, shift);
and_(reg, Immediate(mask));
}
=======================================
--- /branches/bleeding_edge/src/objects-inl.h Fri May 9 13:20:40 2014 UTC
+++ /branches/bleeding_edge/src/objects-inl.h Fri May 9 14:28:59 2014 UTC
@@ -4033,12 +4033,12 @@
void Map::set_function_with_prototype(bool value) {
- set_bit_field(FunctionWithPrototype::update(bit_field(), value));
+ set_bit_field3(FunctionWithPrototype::update(bit_field3(), value));
}
bool Map::function_with_prototype() {
- return FunctionWithPrototype::decode(bit_field());
+ return FunctionWithPrototype::decode(bit_field3());
}
@@ -4753,15 +4753,16 @@
void Map::set_bit_field3(uint32_t bits) {
- if (kInt32Size != kPointerSize) {
- WRITE_UINT32_FIELD(this, kBitField3Offset + kInt32Size, 0);
- }
- WRITE_UINT32_FIELD(this, kBitField3Offset, bits);
+ // Ensure the upper 2 bits have the same value by sign extending it.
This is
+ // necessary to be able to use the 31st bit.
+ int value = bits << 1;
+ WRITE_FIELD(this, kBitField3Offset, Smi::FromInt(value >> 1));
}
uint32_t Map::bit_field3() {
- return READ_UINT32_FIELD(this, kBitField3Offset);
+ Object* value = READ_FIELD(this, kBitField3Offset);
+ return Smi::cast(value)->value();
}
=======================================
--- /branches/bleeding_edge/src/objects.cc Fri May 9 13:20:40 2014 UTC
+++ /branches/bleeding_edge/src/objects.cc Fri May 9 14:28:59 2014 UTC
@@ -9918,8 +9918,8 @@
first->instance_type() == second->instance_type() &&
first->bit_field() == second->bit_field() &&
first->bit_field2() == second->bit_field2() &&
- first->is_frozen() == second->is_frozen() &&
- first->has_instance_call_handler() ==
second->has_instance_call_handler();
+ first->is_observed() == second->is_observed() &&
+ first->function_with_prototype() == second->function_with_prototype();
}
=======================================
--- /branches/bleeding_edge/src/objects.h Fri May 9 13:20:40 2014 UTC
+++ /branches/bleeding_edge/src/objects.h Fri May 9 14:28:59 2014 UTC
@@ -5959,13 +5959,14 @@
kDescriptorIndexBitCount, kDescriptorIndexBitCount> {}; // NOLINT
STATIC_ASSERT(kDescriptorIndexBitCount + kDescriptorIndexBitCount == 20);
class IsShared: public BitField<bool, 20, 1> {};
- class DictionaryMap: public BitField<bool, 21, 1> {};
- class OwnsDescriptors: public BitField<bool, 22, 1> {};
- class HasInstanceCallHandler: public BitField<bool, 23, 1> {};
- class Deprecated: public BitField<bool, 24, 1> {};
- class IsFrozen: public BitField<bool, 25, 1> {};
- class IsUnstable: public BitField<bool, 26, 1> {};
- class IsMigrationTarget: public BitField<bool, 27, 1> {};
+ class FunctionWithPrototype: public BitField<bool, 21, 1> {};
+ class DictionaryMap: public BitField<bool, 22, 1> {};
+ class OwnsDescriptors: public BitField<bool, 23, 1> {};
+ class HasInstanceCallHandler: public BitField<bool, 24, 1> {};
+ class Deprecated: public BitField<bool, 25, 1> {};
+ class IsFrozen: public BitField<bool, 26, 1> {};
+ class IsUnstable: public BitField<bool, 27, 1> {};
+ class IsMigrationTarget: public BitField<bool, 28, 1> {};
// Tells whether the object in the prototype property will be used
// for instances created from this function. If the prototype
@@ -6480,8 +6481,7 @@
// Layout description.
static const int kInstanceSizesOffset = HeapObject::kHeaderSize;
static const int kInstanceAttributesOffset = kInstanceSizesOffset +
kIntSize;
- static const int kBitField3Offset = kInstanceAttributesOffset + kIntSize;
- static const int kPrototypeOffset = kBitField3Offset + kPointerSize;
+ static const int kPrototypeOffset = kInstanceAttributesOffset + kIntSize;
static const int kConstructorOffset = kPrototypeOffset + kPointerSize;
// Storage for the transition array is overloaded to directly contain a
back
// pointer if unused. When the map has transitions, the back pointer is
@@ -6493,12 +6493,13 @@
kTransitionsOrBackPointerOffset + kPointerSize;
static const int kCodeCacheOffset = kDescriptorsOffset + kPointerSize;
static const int kDependentCodeOffset = kCodeCacheOffset + kPointerSize;
- static const int kSize = kDependentCodeOffset + kPointerSize;
+ static const int kBitField3Offset = kDependentCodeOffset + kPointerSize;
+ static const int kSize = kBitField3Offset + kPointerSize;
// Layout of pointer fields. Heap iteration code relies on them
// being continuously allocated.
static const int kPointerFieldsBeginOffset = Map::kPrototypeOffset;
- static const int kPointerFieldsEndOffset = kSize;
+ static const int kPointerFieldsEndOffset = kBitField3Offset +
kPointerSize;
// Byte offsets within kInstanceSizesOffset.
static const int kInstanceSizeOffset = kInstanceSizesOffset + 0;
@@ -6520,14 +6521,14 @@
STATIC_CHECK(kInstanceTypeOffset == Internals::kMapInstanceTypeOffset);
// Bit positions for bit field.
- static const int kHasNonInstancePrototype = 0;
- static const int kIsHiddenPrototype = 1;
- static const int kHasNamedInterceptor = 2;
- static const int kHasIndexedInterceptor = 3;
- static const int kIsUndetectable = 4;
- static const int kIsObserved = 5;
- static const int kIsAccessCheckNeeded = 6;
- class FunctionWithPrototype: public BitField<bool, 7, 1> {};
+ static const int kUnused = 0; // To be used for marking recently used
maps.
+ static const int kHasNonInstancePrototype = 1;
+ static const int kIsHiddenPrototype = 2;
+ static const int kHasNamedInterceptor = 3;
+ static const int kHasIndexedInterceptor = 4;
+ static const int kIsUndetectable = 5;
+ static const int kIsObserved = 6;
+ static const int kIsAccessCheckNeeded = 7;
// Bit positions for bit field 2
static const int kIsExtensible = 0;
=======================================
--- /branches/bleeding_edge/src/x64/full-codegen-x64.cc Fri May 9 13:18:25
2014 UTC
+++ /branches/bleeding_edge/src/x64/full-codegen-x64.cc Fri May 9 14:28:59
2014 UTC
@@ -2976,8 +2976,11 @@
// rbx: descriptor array.
// rcx: valid entries in the descriptor array.
// Calculate the end of the descriptor array.
- __ imull(rcx, rcx, Immediate(DescriptorArray::kDescriptorSize));
- __ leal(rcx, Operand(r8, rcx, times_4, DescriptorArray::kFirstOffset));
+ __ imulp(rcx, rcx, Immediate(DescriptorArray::kDescriptorSize));
+ SmiIndex index = masm_->SmiToIndex(rdx, rcx, kPointerSizeLog2);
+ __ leap(rcx,
+ Operand(
+ r8, index.reg, index.scale, DescriptorArray::kFirstOffset));
// Calculate location of the first key name.
__ addp(r8, Immediate(DescriptorArray::kFirstOffset));
// Loop through all the keys in the descriptor array. If one of these is
the
=======================================
--- /branches/bleeding_edge/src/x64/macro-assembler-x64.cc Fri May 9
13:18:25 2014 UTC
+++ /branches/bleeding_edge/src/x64/macro-assembler-x64.cc Fri May 9
14:28:59 2014 UTC
@@ -3484,16 +3484,16 @@
void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) {
- movl(dst, FieldOperand(map, Map::kBitField3Offset));
+ movp(dst, FieldOperand(map, Map::kBitField3Offset));
DecodeField<Map::NumberOfOwnDescriptorsBits>(dst);
}
void MacroAssembler::EnumLength(Register dst, Register map) {
STATIC_ASSERT(Map::EnumLengthBits::kShift == 0);
- movl(dst, FieldOperand(map, Map::kBitField3Offset));
- andl(dst, Immediate(Map::EnumLengthBits::kMask));
- Integer32ToSmi(dst, dst);
+ movp(dst, FieldOperand(map, Map::kBitField3Offset));
+ Move(kScratchRegister, Smi::FromInt(Map::EnumLengthBits::kMask));
+ andp(dst, kScratchRegister);
}
@@ -4959,8 +4959,9 @@
Label* if_deprecated) {
if (map->CanBeDeprecated()) {
Move(scratch, map);
- movl(scratch, FieldOperand(scratch, Map::kBitField3Offset));
- andl(scratch, Immediate(Map::Deprecated::kMask));
+ movp(scratch, FieldOperand(scratch, Map::kBitField3Offset));
+ SmiToInteger32(scratch, scratch);
+ andp(scratch, Immediate(Map::Deprecated::kMask));
j(not_zero, if_deprecated);
}
}
=======================================
--- /branches/bleeding_edge/src/x64/macro-assembler-x64.h Fri May 9
13:18:25 2014 UTC
+++ /branches/bleeding_edge/src/x64/macro-assembler-x64.h Fri May 9
14:28:59 2014 UTC
@@ -1011,10 +1011,11 @@
template<typename Field>
void DecodeField(Register reg) {
- static const int shift = Field::kShift;
+ static const int shift = Field::kShift + kSmiShift;
static const int mask = Field::kMask >> Field::kShift;
- shrl(reg, Immediate(shift));
- andl(reg, Immediate(mask));
+ shrp(reg, Immediate(shift));
+ andp(reg, Immediate(mask));
+ shlp(reg, Immediate(kSmiShift));
}
// Abort execution if argument is not a number, enabled via --debug-code.
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.