Version 3.15.12
V8_Fatal now prints C++ stack trace in debug mode.
Added HTML-based tick processor.
Continued implementation of Object.observe (V8 issue 2409).
Fixed V8 issues 2243, 2340, 2393, 2399, 2457.
Fixed Chromium issues 125308, 165637, 166379, 166553.
Performance and stability improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@13262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/heap-inl.h b/src/heap-inl.h
index de47c94..6d2e958 100644
--- a/src/heap-inl.h
+++ b/src/heap-inl.h
@@ -98,12 +98,34 @@
}
+template<>
+bool inline Heap::IsOneByte(Vector<const char> str, int chars) {
+ // TODO(dcarney): incorporate Latin-1 check when Latin-1 is supported?
+ // ASCII only check.
+ return chars == str.length();
+}
+
+
+template<>
+bool inline Heap::IsOneByte(String* str, int chars) {
+ return str->IsOneByteRepresentation();
+}
+
+
MaybeObject* Heap::AllocateSymbol(Vector<const char> str,
int chars,
uint32_t hash_field) {
- unibrow::Utf8InputBuffer<> buffer(str.start(),
- static_cast<unsigned>(str.length()));
- return AllocateInternalSymbol(&buffer, chars, hash_field);
+ if (IsOneByte(str, chars)) return AllocateAsciiSymbol(str, hash_field);
+ return AllocateInternalSymbol<false>(str, chars, hash_field);
+}
+
+
+template<typename T>
+MaybeObject* Heap::AllocateInternalSymbol(T t, int chars, uint32_t hash_field) {
+ if (IsOneByte(t, chars)) {
+ return AllocateInternalSymbol<true>(t, chars, hash_field);
+ }
+ return AllocateInternalSymbol<false>(t, chars, hash_field);
}
@@ -644,6 +666,19 @@
}
+void ErrorObjectList::Add(JSObject* object) {
+ list_.Add(object);
+}
+
+
+void ErrorObjectList::Iterate(ObjectVisitor* v) {
+ if (!list_.is_empty()) {
+ Object** start = &list_[0];
+ v->VisitPointers(start, start + list_.length());
+ }
+}
+
+
void Heap::ClearInstanceofCache() {
set_instanceof_cache_function(the_hole_value());
}