Version 2.1.0
Values are now always wrapped in objects when used as a receiver (issue 223).
[ES5] Implemented Object.getOwnPropertyNames.
[ES5] Restrict JSON.parse to only accept strings that conforms to the JSON grammar.
Improvement of debugger agent (issue 549 and 554).
Fixed problem with skipped stack frame in profiles (issue 553).
Solaris support by Erich Ocean <erich.ocean@me.com> and Ryan Dahl <ry@tinyclouds.org>.
Fix a bug that Math.round() returns incorrect results for huge integers.
Fix enumeration order for objects created from some constructor functions (isue http://crbug.com/3867).
Fix arithmetic on some integer constants (issue 580).
Numerous performance improvements including porting of previous IA-32 optimizations to x64 and ARM architectures.
git-svn-id: http://v8.googlecode.com/svn/trunk@3781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 3003342..4355fe9 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1349,7 +1349,7 @@
}
-WriteBarrierMode HeapObject::GetWriteBarrierMode() {
+WriteBarrierMode HeapObject::GetWriteBarrierMode(const AssertNoAllocation&) {
if (Heap::InNewSpace(this)) return SKIP_WRITE_BARRIER;
return UPDATE_WRITE_BARRIER;
}
@@ -1367,6 +1367,7 @@
void FixedArray::fast_set(FixedArray* array, int index, Object* value) {
ASSERT(index >= 0 && index < array->length());
+ ASSERT(!Heap::InNewSpace(value));
WRITE_FIELD(array, kHeaderSize + index * kPointerSize, value);
}
@@ -1547,9 +1548,7 @@
}
void NumberDictionary::set_requires_slow_elements() {
- set(kMaxNumberKeyIndex,
- Smi::FromInt(kRequiresSlowElementsMask),
- SKIP_WRITE_BARRIER);
+ set(kMaxNumberKeyIndex, Smi::FromInt(kRequiresSlowElementsMask));
}
@@ -2372,8 +2371,8 @@
kHasOnlySimpleThisPropertyAssignments)
BOOL_ACCESSORS(SharedFunctionInfo,
compiler_hints,
- try_fast_codegen,
- kTryFastCodegen)
+ try_full_codegen,
+ kTryFullCodegen)
INT_ACCESSORS(SharedFunctionInfo, length, kLengthOffset)
INT_ACCESSORS(SharedFunctionInfo, formal_parameter_count,
@@ -2972,7 +2971,8 @@
PropertyDetails details) {
ASSERT(!key->IsString() || details.IsDeleted() || details.index() > 0);
int index = HashTable<Shape, Key>::EntryToIndex(entry);
- WriteBarrierMode mode = FixedArray::GetWriteBarrierMode();
+ AssertNoAllocation no_gc;
+ WriteBarrierMode mode = FixedArray::GetWriteBarrierMode(no_gc);
FixedArray::set(index, key, mode);
FixedArray::set(index+1, value, mode);
FixedArray::fast_set(this, index+2, details.AsSmi());
@@ -3006,8 +3006,13 @@
}
+void JSArray::set_length(Smi* length) {
+ set_length(static_cast<Object*>(length), SKIP_WRITE_BARRIER);
+}
+
+
void JSArray::SetContent(FixedArray* storage) {
- set_length(Smi::FromInt(storage->length()), SKIP_WRITE_BARRIER);
+ set_length(Smi::FromInt(storage->length()));
set_elements(storage);
}