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

Unified Diff: runtime/vm/scanner.cc

Issue 11411092: Revert "Add some support for the code-point code-unit distinction." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | « runtime/vm/scanner.h ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scanner.cc
diff --git a/runtime/vm/scanner.cc b/runtime/vm/scanner.cc
index 52c7248102cf80d47e52da89eaff6e51fbbbf47d..54ae2bdd606c84492178b8e7a2212c9070ceeb2e 100644
--- a/runtime/vm/scanner.cc
+++ b/runtime/vm/scanner.cc
@@ -529,7 +529,7 @@ void Scanner::ScanEscapedCodePoint(uint32_t* code_point) {
void Scanner::ScanLiteralStringChars(bool is_raw) {
- GrowableArray<uint16_t> string_chars(64);
+ GrowableArray<uint32_t> string_chars(64);
ASSERT(IsScanningString());
// We are at the first character of a string literal piece. A string literal
@@ -565,15 +565,7 @@ void Scanner::ScanLiteralStringChars(bool is_raw) {
break;
case 'u':
case 'x': {
- uint32_t ch;
- ScanEscapedCodePoint(&ch);
- int32_t code_point = ch;
- if (code_point > Utf16::kMaxCodeUnit) {
- string_chars.Add(Utf16::LeadFromCodePoint(code_point));
- escape_char = Utf16::TrailFromCodePoint(code_point);
- } else {
- escape_char = code_point;
- }
+ ScanEscapedCodePoint(&escape_char);
break;
}
default:
« no previous file with comments | « runtime/vm/scanner.h ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698