Push version 1.2.2 to trunk.
Fixed bug in array sorting for sparse arrays (issue 326).
Added support for adding a soname when building a shared library on Linux (issue 151).
Fixed bug caused by morphing internal ASCII strings to external two-byte strings. Slices over ASCII strings have to forward ASCII checks to the underlying buffer string.
Allowed API call-as-function handlers to be called as constructors.
Fixed a crash bug where an external string was disposed but a slice of the external string survived as a symbol.
git-svn-id: http://v8.googlecode.com/svn/trunk@1853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/heap.cc b/src/heap.cc
index 0775a5d..fa225f7 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -1423,8 +1423,8 @@
int first_length = first->length();
int second_length = second->length();
int length = first_length + second_length;
- bool is_ascii = StringShape(first).IsAsciiRepresentation()
- && StringShape(second).IsAsciiRepresentation();
+ bool is_ascii = first->IsAsciiRepresentation()
+ && second->IsAsciiRepresentation();
// If the resulting string is small make a flat string.
if (length < String::kMinNonFlatLength) {
@@ -1484,15 +1484,15 @@
Map* map;
if (length <= String::kMaxShortStringSize) {
- map = StringShape(buffer).IsAsciiRepresentation() ?
+ map = buffer->IsAsciiRepresentation() ?
short_sliced_ascii_string_map() :
short_sliced_string_map();
} else if (length <= String::kMaxMediumStringSize) {
- map = StringShape(buffer).IsAsciiRepresentation() ?
+ map = buffer->IsAsciiRepresentation() ?
medium_sliced_ascii_string_map() :
medium_sliced_string_map();
} else {
- map = StringShape(buffer).IsAsciiRepresentation() ?
+ map = buffer->IsAsciiRepresentation() ?
long_sliced_ascii_string_map() :
long_sliced_string_map();
}
@@ -1524,7 +1524,7 @@
buffer->TryFlatten();
}
- Object* result = StringShape(buffer).IsAsciiRepresentation()
+ Object* result = buffer->IsAsciiRepresentation()
? AllocateRawAsciiString(length)
: AllocateRawTwoByteString(length);
if (result->IsFailure()) return result;