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

Unified Diff: src/string.js

Issue 660184: Implemented one-char cache lookup in generated code. (Closed)
Patch Set: Created 10 years, 10 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/string.js
diff --git a/src/string.js b/src/string.js
index 49f403de7da8140bb8aeebd9d87c00c329850a0d..531c6a9b949bbb4c897c761926fcd9164cbbb024 100644
--- a/src/string.js
+++ b/src/string.js
@@ -69,7 +69,7 @@ function StringCharAt(pos) {
if (index >= subject.length || index < 0) return "";
char_code = %StringCharCodeAt(subject, index);
}
- return %CharFromCode(char_code);
+ return %_CharFromCode(char_code);
}
@@ -184,7 +184,7 @@ function SubString(string, start, end) {
if (!%_IsSmi(char_code)) {
char_code = %StringCharCodeAt(string, start);
}
- return %CharFromCode(char_code);
+ return %_CharFromCode(char_code);
}
return %_SubString(string, start, end);
}
@@ -726,7 +726,7 @@ function StringTrimRight() {
// ECMA-262, section 15.5.3.2
function StringFromCharCode(code) {
var n = %_ArgumentsLength();
- if (n == 1) return %CharFromCode(ToNumber(code) & 0xffff)
+ if (n == 1) return %_CharFromCode(ToNumber(code) & 0xffff)
// NOTE: This is not super-efficient, but it is necessary because we
// want to avoid converting to numbers from within the virtual

Powered by Google App Engine
This is Rietveld 408576698