Version 3.12.4
Removed -fomit-frame-pointer flag from Release builds to make the stack walkable by TCMalloc (Chromium issue 133723).
Ported r7868 (constant masking) to x64 (issue 1374).
Expose more detailed memory statistics (issue 2201).
Fixed Harmony Maps and WeakMaps for undefined values (Chromium issue 132744).
Correctly throw reference error in strict mode with ICs disabled (issue 2119).
Performance and stability improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@11937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 2cdfad6..b334669 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1863,7 +1863,7 @@
void FixedArray::set_null_unchecked(Heap* heap, int index) {
ASSERT(index >= 0 && index < this->length());
- ASSERT(!HEAP->InNewSpace(heap->null_value()));
+ ASSERT(!heap->InNewSpace(heap->null_value()));
WRITE_FIELD(this, kHeaderSize + index * kPointerSize, heap->null_value());
}
@@ -1976,6 +1976,17 @@
}
+void DescriptorArray::SetKeyUnchecked(Heap* heap,
+ int descriptor_number,
+ String* key) {
+ ASSERT(descriptor_number < number_of_descriptors());
+ set_unchecked(heap,
+ ToKeyIndex(descriptor_number),
+ key,
+ UPDATE_WRITE_BARRIER);
+}
+
+
Object** DescriptorArray::GetValueSlot(int descriptor_number) {
ASSERT(descriptor_number < number_of_descriptors());
return HeapObject::RawField(
@@ -1990,12 +2001,24 @@
}
-void DescriptorArray::SetNullValueUnchecked(int descriptor_number, Heap* heap) {
+void DescriptorArray::SetNullValueUnchecked(Heap* heap, int descriptor_number) {
ASSERT(descriptor_number < number_of_descriptors());
set_null_unchecked(heap, ToValueIndex(descriptor_number));
}
+
+void DescriptorArray::SetValueUnchecked(Heap* heap,
+ int descriptor_number,
+ Object* value) {
+ ASSERT(descriptor_number < number_of_descriptors());
+ set_unchecked(heap,
+ ToValueIndex(descriptor_number),
+ value,
+ UPDATE_WRITE_BARRIER);
+}
+
+
PropertyDetails DescriptorArray::GetDetails(int descriptor_number) {
ASSERT(descriptor_number < number_of_descriptors());
Object* details = get(ToDetailsIndex(descriptor_number));
@@ -2059,19 +2082,16 @@
case CONSTANT_FUNCTION:
case HANDLER:
case INTERCEPTOR:
- case NULL_DESCRIPTOR:
return false;
+ case NONEXISTENT:
+ UNREACHABLE();
+ break;
}
UNREACHABLE(); // Keep the compiler happy.
return false;
}
-bool DescriptorArray::IsNullDescriptor(int descriptor_number) {
- return GetType(descriptor_number) == NULL_DESCRIPTOR;
-}
-
-
void DescriptorArray::Get(int descriptor_number, Descriptor* desc) {
desc->Init(GetKey(descriptor_number),
GetValue(descriptor_number),
@@ -3029,7 +3049,7 @@
}
-PropertyType Code::type() {
+Code::StubType Code::type() {
return ExtractTypeFromFlags(flags());
}
@@ -3301,7 +3321,7 @@
Code::Flags Code::ComputeFlags(Kind kind,
InlineCacheState ic_state,
ExtraICState extra_ic_state,
- PropertyType type,
+ StubType type,
int argc,
InlineCacheHolderFlag holder) {
// Extra IC state is only allowed for call IC stubs or for store IC
@@ -3322,7 +3342,7 @@
Code::Flags Code::ComputeMonomorphicFlags(Kind kind,
- PropertyType type,
+ StubType type,
ExtraICState extra_ic_state,
InlineCacheHolderFlag holder,
int argc) {
@@ -3345,7 +3365,7 @@
}
-PropertyType Code::ExtractTypeFromFlags(Flags flags) {
+Code::StubType Code::ExtractTypeFromFlags(Flags flags) {
return TypeField::decode(flags);
}
@@ -3464,10 +3484,23 @@
}
+void Map::ClearDescriptorArray() {
+ int bitfield3 = bit_field3();
+#ifdef DEBUG
+ Object* object = READ_FIELD(this, kInstanceDescriptorsOrBitField3Offset);
+ if (!object->IsSmi()) {
+ ZapInstanceDescriptors();
+ }
+#endif
+ WRITE_FIELD(this,
+ kInstanceDescriptorsOrBitField3Offset,
+ Smi::FromInt(bitfield3));
+}
+
+
void Map::set_bit_field3(int value) {
ASSERT(Smi::IsValid(value));
- Object* object = READ_FIELD(this,
- kInstanceDescriptorsOrBitField3Offset);
+ Object* object = READ_FIELD(this, kInstanceDescriptorsOrBitField3Offset);
if (object->IsSmi()) {
WRITE_FIELD(this,
kInstanceDescriptorsOrBitField3Offset,