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

Unified Diff: src/objects-inl.h

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 | « src/objects.cc ('k') | src/string-stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
===================================================================
--- src/objects-inl.h (revision 3160)
+++ src/objects-inl.h (working copy)
@@ -1907,9 +1907,9 @@
Map* ExternalAsciiString::StringMap(int length) {
Map* map;
// Number of characters: determines the map.
- if (length <= String::kMaxShortStringSize) {
+ if (length <= String::kMaxShortSize) {
map = Heap::short_external_ascii_string_map();
- } else if (length <= String::kMaxMediumStringSize) {
+ } else if (length <= String::kMaxMediumSize) {
map = Heap::medium_external_ascii_string_map();
} else {
map = Heap::long_external_ascii_string_map();
@@ -1921,9 +1921,9 @@
Map* ExternalAsciiString::SymbolMap(int length) {
Map* map;
// Number of characters: determines the map.
- if (length <= String::kMaxShortStringSize) {
+ if (length <= String::kMaxShortSize) {
map = Heap::short_external_ascii_symbol_map();
- } else if (length <= String::kMaxMediumStringSize) {
+ } else if (length <= String::kMaxMediumSize) {
map = Heap::medium_external_ascii_symbol_map();
} else {
map = Heap::long_external_ascii_symbol_map();
@@ -1946,9 +1946,9 @@
Map* ExternalTwoByteString::StringMap(int length) {
Map* map;
// Number of characters: determines the map.
- if (length <= String::kMaxShortStringSize) {
+ if (length <= String::kMaxShortSize) {
map = Heap::short_external_string_map();
- } else if (length <= String::kMaxMediumStringSize) {
+ } else if (length <= String::kMaxMediumSize) {
map = Heap::medium_external_string_map();
} else {
map = Heap::long_external_string_map();
@@ -1960,9 +1960,9 @@
Map* ExternalTwoByteString::SymbolMap(int length) {
Map* map;
// Number of characters: determines the map.
- if (length <= String::kMaxShortStringSize) {
+ if (length <= String::kMaxShortSize) {
map = Heap::short_external_symbol_map();
- } else if (length <= String::kMaxMediumStringSize) {
+ } else if (length <= String::kMaxMediumSize) {
map = Heap::medium_external_symbol_map();
} else {
map = Heap::long_external_symbol_map();
@@ -2976,7 +2976,7 @@
bool StringHasher::has_trivial_hash() {
- return length_ > String::kMaxMediumStringSize;
+ return length_ > String::kMaxMediumSize;
}
« no previous file with comments | « src/objects.cc ('k') | src/string-stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698