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

Unified Diff: src/heap.cc

Issue 347002: Derive string size constants... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 months 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 | « no previous file | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
===================================================================
--- src/heap.cc (revision 3160)
+++ src/heap.cc (working copy)
@@ -1810,10 +1810,10 @@
}
Map* map;
- if (length <= String::kMaxShortStringSize) {
+ if (length <= String::kMaxShortSize) {
map = is_ascii ? short_cons_ascii_string_map()
: short_cons_string_map();
- } else if (length <= String::kMaxMediumStringSize) {
+ } else if (length <= String::kMaxMediumSize) {
map = is_ascii ? medium_cons_ascii_string_map()
: medium_cons_string_map();
} else {
@@ -1843,11 +1843,11 @@
}
Map* map;
- if (length <= String::kMaxShortStringSize) {
+ if (length <= String::kMaxShortSize) {
map = buffer->IsAsciiRepresentation() ?
short_sliced_ascii_string_map() :
short_sliced_string_map();
- } else if (length <= String::kMaxMediumStringSize) {
+ } else if (length <= String::kMaxMediumSize) {
map = buffer->IsAsciiRepresentation() ?
medium_sliced_ascii_string_map() :
medium_sliced_string_map();
@@ -1912,9 +1912,9 @@
ExternalAsciiString::Resource* resource) {
Map* map;
int length = resource->length();
- if (length <= String::kMaxShortStringSize) {
+ if (length <= String::kMaxShortSize) {
map = short_external_ascii_string_map();
- } else if (length <= String::kMaxMediumStringSize) {
+ } else if (length <= String::kMaxMediumSize) {
map = medium_external_ascii_string_map();
} else {
map = long_external_ascii_string_map();
@@ -2659,18 +2659,18 @@
Map* map;
if (is_ascii) {
- if (chars <= String::kMaxShortStringSize) {
+ if (chars <= String::kMaxShortSize) {
map = short_ascii_symbol_map();
- } else if (chars <= String::kMaxMediumStringSize) {
+ } else if (chars <= String::kMaxMediumSize) {
map = medium_ascii_symbol_map();
} else {
map = long_ascii_symbol_map();
}
size = SeqAsciiString::SizeFor(chars);
} else {
- if (chars <= String::kMaxShortStringSize) {
+ if (chars <= String::kMaxShortSize) {
map = short_symbol_map();
- } else if (chars <= String::kMaxMediumStringSize) {
+ } else if (chars <= String::kMaxMediumSize) {
map = medium_symbol_map();
} else {
map = long_symbol_map();
@@ -2720,9 +2720,9 @@
// Determine the map based on the string's length.
Map* map;
- if (length <= String::kMaxShortStringSize) {
+ if (length <= String::kMaxShortSize) {
map = short_ascii_string_map();
- } else if (length <= String::kMaxMediumStringSize) {
+ } else if (length <= String::kMaxMediumSize) {
map = medium_ascii_string_map();
} else {
map = long_ascii_string_map();
@@ -2757,9 +2757,9 @@
// Determine the map based on the string's length.
Map* map;
- if (length <= String::kMaxShortStringSize) {
+ if (length <= String::kMaxShortSize) {
map = short_string_map();
- } else if (length <= String::kMaxMediumStringSize) {
+ } else if (length <= String::kMaxMediumSize) {
map = medium_string_map();
} else {
map = long_string_map();
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698