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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart

Issue 27510003: Scanner for UTF-8 byte arrays (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixes compiler tests Created 7 years, 2 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: sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
index 7c919df3a26a980f4d271a025a6c47cc0e7013cb..4168c72fa3789a2d3b5b8ff48505b263ff1cc93c 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
@@ -381,8 +381,8 @@ class DartBackend extends Backend {
// Add synthesized constructors to classes with no resolved constructors,
// but which originally had any constructor. That should prevent
// those classes from being instantiable with default constructor.
- Identifier synthesizedIdentifier =
- new Identifier(new StringToken(IDENTIFIER_INFO, '', -1));
+ Identifier synthesizedIdentifier = new Identifier(
+ new StringToken.fromString(IDENTIFIER_INFO, '', -1));
NextClassElement:
for (ClassElement classElement in classMembers.keys) {
@@ -408,10 +408,11 @@ class DartBackend extends Backend {
);
constructor.cachedNode = new FunctionExpression(
new Send(classNode.name, synthesizedIdentifier),
- new NodeList(new StringToken(OPEN_PAREN_INFO, '(', -1),
+ new NodeList(new StringToken.fromString(OPEN_PAREN_INFO, '(', -1),
const Link<Node>(),
- new StringToken(CLOSE_PAREN_INFO, ')', -1)),
- new EmptyStatement(new StringToken(SEMICOLON_INFO, ';', -1)),
+ new StringToken.fromString(CLOSE_PAREN_INFO, ')', -1)),
+ new EmptyStatement(
+ new StringToken.fromString(SEMICOLON_INFO, ';', -1)),
null, Modifiers.EMPTY, null, null);
if (!constructor.isSynthesized) {
@@ -506,7 +507,7 @@ class DartBackend extends Backend {
int nonPlatformSize = 0;
for (LibraryElement lib in referencedLibraries) {
for (CompilationUnitElement compilationUnit in lib.compilationUnits) {
- nonPlatformSize += compilationUnit.script.text.length;
+ nonPlatformSize += compilationUnit.script.file.length;
}
}
int percentage = compiler.assembledCode.length * 100 ~/ nonPlatformSize;

Powered by Google App Engine
This is Rietveld 408576698