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

Unified Diff: src/runtime.cc

Issue 14296009: Inline String.fromCharCode in hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index dffa959c3cb3473f972770bd70b9bff973157e6e..d71383d6e571c818ef0e59382ffaa3610b10ae53 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -2417,9 +2417,7 @@ MUST_USE_RESULT static MaybeObject* CharFromCode(Isolate* isolate,
Object* char_code) {
uint32_t code;
if (char_code->ToArrayIndex(&code)) {
Toon Verwaest 2013/04/16 22:19:30 This currently works by accident I presume; given
- if (code <= 0xffff) {
- return isolate->heap()->LookupSingleCharacterStringFromCode(code);
- }
+ return isolate->heap()->LookupSingleCharacterStringFromCode(code & 0xffff);
}
return isolate->heap()->empty_string();
}
« src/hydrogen.cc ('K') | « src/hydrogen.cc ('k') | test/mjsunit/string-fromcharcode.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698