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

Unified Diff: src/string.js

Issue 565093002: Reland "Change the order of arguments of the (One|Two)ByteSeqStringSetChar intrinsic." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix typo Created 6 years, 3 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/runtime.cc ('k') | src/uri.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/string.js
diff --git a/src/string.js b/src/string.js
index ae65264d4a3ae2c29cc39add829dd45e51ccf0c3..99f5fc976c2996506fcc2504c377fdedb28b6839 100644
--- a/src/string.js
+++ b/src/string.js
@@ -812,7 +812,7 @@ function StringFromCharCode(code) {
if (!%_IsSmi(code)) code = ToNumber(code) & 0xffff;
if (code < 0) code = code & 0xffff;
if (code > 0xff) break;
- %_OneByteSeqStringSetChar(one_byte, i, code);
+ %_OneByteSeqStringSetChar(i, code, one_byte);
}
if (i == n) return one_byte;
one_byte = %TruncateString(one_byte, i);
@@ -821,7 +821,7 @@ function StringFromCharCode(code) {
for (var j = 0; i < n; i++, j++) {
var code = %_Arguments(i);
if (!%_IsSmi(code)) code = ToNumber(code) & 0xffff;
- %_TwoByteSeqStringSetChar(two_byte, j, code);
+ %_TwoByteSeqStringSetChar(j, code, two_byte);
}
return one_byte + two_byte;
}
« no previous file with comments | « src/runtime.cc ('k') | src/uri.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698