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

Unified Diff: src/uri.js

Issue 552253003: Revert "Change the order of arguments of the (One|Two)ByteSeqStringSetChar intrinsic." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/string.js ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/uri.js
diff --git a/src/uri.js b/src/uri.js
index a2a36cf8c7a82301fea723512cc5f88db8d959fe..88ea75f82d49d376408158e7829cd7ff749fadf7 100644
--- a/src/uri.js
+++ b/src/uri.js
@@ -172,10 +172,10 @@
throw new $URIError("URI malformed");
}
if (value < 0x10000) {
- %_TwoByteSeqStringSetChar(index++, value, result);
+ %_TwoByteSeqStringSetChar(result, index++, value);
} else {
- %_TwoByteSeqStringSetChar(index++, (value >> 10) + 0xd7c0, result);
- %_TwoByteSeqStringSetChar(index++, (value & 0x3ff) + 0xdc00, result);
+ %_TwoByteSeqStringSetChar(result, index++, (value >> 10) + 0xd7c0);
+ %_TwoByteSeqStringSetChar(result, index++, (value & 0x3ff) + 0xdc00);
}
return index;
}
@@ -205,7 +205,7 @@
var result = %NewString(array.length, NEW_ONE_BYTE_STRING);
for (var i = 0; i < array.length; i++) {
- %_OneByteSeqStringSetChar(i, array[i], result);
+ %_OneByteSeqStringSetChar(result, i, array[i]);
}
return result;
}
@@ -225,16 +225,16 @@
var cc = URIHexCharsToCharCode(uri.charCodeAt(k+1), uri.charCodeAt(k+2));
if (cc >> 7) break; // Assumption wrong, two-byte string.
if (reserved(cc)) {
- %_OneByteSeqStringSetChar(index++, 37, one_bye); // '%'.
- %_OneByteSeqStringSetChar(index++, uri.charCodeAt(k+1), one_byte);
- %_OneByteSeqStringSetChar(index++, uri.charCodeAt(k+2), one_byte);
+ %_OneByteSeqStringSetChar(one_byte, index++, 37); // '%'.
+ %_OneByteSeqStringSetChar(one_byte, index++, uri.charCodeAt(k+1));
+ %_OneByteSeqStringSetChar(one_byte, index++, uri.charCodeAt(k+2));
} else {
- %_OneByteSeqStringSetChar(index++, cc, one_byte);
+ %_OneByteSeqStringSetChar(one_byte, index++, cc);
}
k += 2;
} else {
if (code > 0x7f) break; // Assumption wrong, two-byte string.
- %_OneByteSeqStringSetChar(index++, code, one_byte);
+ %_OneByteSeqStringSetChar(one_byte, index++, code);
}
}
@@ -264,14 +264,14 @@
}
index = URIDecodeOctets(octets, two_byte, index);
} else if (reserved(cc)) {
- %_TwoByteSeqStringSetChar(index++, 37, two_byte); // '%'.
- %_TwoByteSeqStringSetChar(index++, uri.charCodeAt(k - 1), two_byte);
- %_TwoByteSeqStringSetChar(index++, uri.charCodeAt(k), two_byte);
+ %_TwoByteSeqStringSetChar(two_byte, index++, 37); // '%'.
+ %_TwoByteSeqStringSetChar(two_byte, index++, uri.charCodeAt(k - 1));
+ %_TwoByteSeqStringSetChar(two_byte, index++, uri.charCodeAt(k));
} else {
- %_TwoByteSeqStringSetChar(index++, cc, two_byte);
+ %_TwoByteSeqStringSetChar(two_byte, index++, cc);
}
} else {
- %_TwoByteSeqStringSetChar(index++, code, two_byte);
+ %_TwoByteSeqStringSetChar(two_byte, index++, code);
}
}
« no previous file with comments | « src/string.js ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698