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

Unified Diff: src/factory.h

Issue 249103002: StringTable::LookupKey() and all callers handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review notes Created 6 years, 8 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/factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.h
diff --git a/src/factory.h b/src/factory.h
index f29aac4aa8fee8dd43d48712bf562040e44f0f6a..a19f297c00f1b859491a15406ab5040aac28bf05 100644
--- a/src/factory.h
+++ b/src/factory.h
@@ -81,6 +81,8 @@ class Factory V8_FINAL {
// Create an empty TypeFeedbackInfo.
Handle<TypeFeedbackInfo> NewTypeFeedbackInfo();
+ // Finds the internalized copy for string in the string table.
+ // If not found, a new string is added to the table and returned.
Handle<String> InternalizeUtf8String(Vector<const char> str);
Handle<String> InternalizeUtf8String(const char* str) {
return InternalizeUtf8String(CStrVector(str));
@@ -165,7 +167,9 @@ class Factory V8_FINAL {
int length,
PretenureFlag pretenure = NOT_TENURED);
- Handle<String> LookupSingleCharacterStringFromCode(uint32_t index);
+ // Creates a single character string where the character has given code.
+ // A cache is used for ASCII codes.
+ Handle<String> LookupSingleCharacterStringFromCode(uint32_t code);
// Create a new cons string object which consists of a pair of strings.
MUST_USE_RESULT MaybeHandle<String> NewConsString(Handle<String> left,
@@ -575,6 +579,10 @@ class Factory V8_FINAL {
INTERNALIZED_STRING_LIST(STRING_ACCESSOR)
#undef STRING_ACCESSOR
+ inline void set_string_table(Handle<StringTable> table) {
+ isolate()->heap()->set_string_table(*table);
+ }
+
Handle<String> hidden_string() {
return Handle<String>(&isolate()->heap()->hidden_string_);
}
« no previous file with comments | « no previous file | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698