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

Unified Diff: src/uri.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/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 88ea75f82d49d376408158e7829cd7ff749fadf7..09079bc29f0871e6140672c1d78a45018f006f10 100644
--- a/src/uri.js
+++ b/src/uri.js
@@ -172,10 +172,10 @@
throw new $URIError("URI malformed");
}
if (value < 0x10000) {
- %_TwoByteSeqStringSetChar(result, index++, value);
+ %_TwoByteSeqStringSetChar(index++, value, result);
} else {
- %_TwoByteSeqStringSetChar(result, index++, (value >> 10) + 0xd7c0);
- %_TwoByteSeqStringSetChar(result, index++, (value & 0x3ff) + 0xdc00);
+ %_TwoByteSeqStringSetChar(index++, (value >> 10) + 0xd7c0, result);
+ %_TwoByteSeqStringSetChar(index++, (value & 0x3ff) + 0xdc00, result);
}
return index;
}
@@ -205,7 +205,7 @@
var result = %NewString(array.length, NEW_ONE_BYTE_STRING);
for (var i = 0; i < array.length; i++) {
- %_OneByteSeqStringSetChar(result, i, array[i]);
+ %_OneByteSeqStringSetChar(i, array[i], result);
}
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(one_byte, index++, 37); // '%'.
- %_OneByteSeqStringSetChar(one_byte, index++, uri.charCodeAt(k+1));
- %_OneByteSeqStringSetChar(one_byte, index++, uri.charCodeAt(k+2));
+ %_OneByteSeqStringSetChar(index++, 37, one_byte); // '%'.
+ %_OneByteSeqStringSetChar(index++, uri.charCodeAt(k+1), one_byte);
+ %_OneByteSeqStringSetChar(index++, uri.charCodeAt(k+2), one_byte);
} else {
- %_OneByteSeqStringSetChar(one_byte, index++, cc);
+ %_OneByteSeqStringSetChar(index++, cc, one_byte);
}
k += 2;
} else {
if (code > 0x7f) break; // Assumption wrong, two-byte string.
- %_OneByteSeqStringSetChar(one_byte, index++, code);
+ %_OneByteSeqStringSetChar(index++, code, one_byte);
}
}
@@ -264,14 +264,14 @@
}
index = URIDecodeOctets(octets, two_byte, index);
} else if (reserved(cc)) {
- %_TwoByteSeqStringSetChar(two_byte, index++, 37); // '%'.
- %_TwoByteSeqStringSetChar(two_byte, index++, uri.charCodeAt(k - 1));
- %_TwoByteSeqStringSetChar(two_byte, index++, uri.charCodeAt(k));
+ %_TwoByteSeqStringSetChar(index++, 37, two_byte); // '%'.
+ %_TwoByteSeqStringSetChar(index++, uri.charCodeAt(k - 1), two_byte);
+ %_TwoByteSeqStringSetChar(index++, uri.charCodeAt(k), two_byte);
} else {
- %_TwoByteSeqStringSetChar(two_byte, index++, cc);
+ %_TwoByteSeqStringSetChar(index++, cc, two_byte);
}
} else {
- %_TwoByteSeqStringSetChar(two_byte, index++, code);
+ %_TwoByteSeqStringSetChar(index++, code, two_byte);
}
}
« 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