Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Unified Diff: test/cctest/test-api.cc

Issue 436001: Remove the different length string types... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-alloc.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
===================================================================
--- test/cctest/test-api.cc (revision 3336)
+++ test/cctest/test-api.cc (working copy)
@@ -7029,27 +7029,17 @@
CHECK(i::StringShape(string).IsExternal());
if (string->IsAsciiRepresentation()) {
// Check old map is not symbol or long.
- CHECK(string->map() == i::Heap::short_external_ascii_string_map() ||
- string->map() == i::Heap::medium_external_ascii_string_map());
+ CHECK(string->map() == i::Heap::external_ascii_string_map());
// Morph external string to be TwoByte string.
- if (string->length() <= i::String::kMaxShortSize) {
- string->set_map(i::Heap::short_external_string_map());
- } else {
- string->set_map(i::Heap::medium_external_string_map());
- }
+ string->set_map(i::Heap::external_string_map());
i::ExternalTwoByteString* morphed =
i::ExternalTwoByteString::cast(string);
morphed->set_resource(uc16_resource);
} else {
// Check old map is not symbol or long.
- CHECK(string->map() == i::Heap::short_external_string_map() ||
- string->map() == i::Heap::medium_external_string_map());
+ CHECK(string->map() == i::Heap::external_string_map());
// Morph external string to be ASCII string.
- if (string->length() <= i::String::kMaxShortSize) {
- string->set_map(i::Heap::short_external_ascii_string_map());
- } else {
- string->set_map(i::Heap::medium_external_ascii_string_map());
- }
+ string->set_map(i::Heap::external_ascii_string_map());
i::ExternalAsciiString* morphed =
i::ExternalAsciiString::cast(string);
morphed->set_resource(ascii_resource);
« no previous file with comments | « test/cctest/test-alloc.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698