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; |