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

Unified Diff: src/factory.cc

Issue 227593004: Handlify LookupSingleCharacterStringFromCode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « src/factory.h ('k') | src/handles.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index d3a69744d2d7250a2666af9312c9104cbb9b7b32..d4909a7c1ba13280faf34c02a8cbc07e94d56c56 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -287,6 +287,14 @@ MaybeHandle<SeqTwoByteString> Factory::NewRawTwoByteString(
}
+Handle<String> Factory::LookupSingleCharacterStringFromCode(uint32_t index) {
+ CALL_HEAP_FUNCTION(
+ isolate(),
+ isolate()->heap()->LookupSingleCharacterStringFromCode(index),
+ String);
+}
+
+
// Returns true for a character in a range. Both limits are inclusive.
static inline bool Between(uint32_t character, uint32_t from, uint32_t to) {
// This makes uses of the the unsigned wraparound.
@@ -469,7 +477,7 @@ Handle<String> Factory::NewProperSubString(Handle<String> str,
int length = end - begin;
if (length <= 0) return empty_string();
if (length == 1) {
- return LookupSingleCharacterStringFromCode(isolate(), str->Get(begin));
+ return LookupSingleCharacterStringFromCode(str->Get(begin));
}
if (length == 2) {
// Optimization for 2-byte strings often used as keys in a decompression
« no previous file with comments | « src/factory.h ('k') | src/handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698