| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library fasta.source_loader; | 5 library fasta.source_loader; |
| 6 | 6 |
| 7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
| 8 | 8 |
| 9 import 'dart:typed_data' show Uint8List; | 9 import 'dart:typed_data' show Uint8List; |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 show | 25 show |
| 26 Builder, | 26 Builder, |
| 27 ClassBuilder, | 27 ClassBuilder, |
| 28 EnumBuilder, | 28 EnumBuilder, |
| 29 LibraryBuilder, | 29 LibraryBuilder, |
| 30 NamedTypeBuilder, | 30 NamedTypeBuilder, |
| 31 TypeBuilder; | 31 TypeBuilder; |
| 32 | 32 |
| 33 import '../compiler_context.dart' show CompilerContext; | 33 import '../compiler_context.dart' show CompilerContext; |
| 34 | 34 |
| 35 import '../deprecated_problems.dart' show deprecated_inputError; | 35 import '../deprecated_problems.dart' |
| 36 show deprecated_formatUnexpected, deprecated_inputError; |
| 36 | 37 |
| 37 import '../export.dart' show Export; | 38 import '../export.dart' show Export; |
| 38 | 39 |
| 39 import '../fasta_codes.dart' | 40 import '../fasta_codes.dart' |
| 40 show | 41 show |
| 42 Message, |
| 41 templateCyclicClassHierarchy, | 43 templateCyclicClassHierarchy, |
| 42 templateExtendingEnum, | 44 templateExtendingEnum, |
| 43 templateExtendingRestricted, | 45 templateExtendingRestricted, |
| 44 templateIllegalMixin, | 46 templateIllegalMixin, |
| 45 templateIllegalMixinDueToConstructors, | 47 templateIllegalMixinDueToConstructors, |
| 46 templateIllegalMixinDueToConstructorsCause, | 48 templateIllegalMixinDueToConstructorsCause, |
| 47 templateUnspecified; | 49 templateUnspecified; |
| 48 | 50 |
| 49 import '../kernel/kernel_shadow_ast.dart' show KernelTypeInferenceEngine; | 51 import '../kernel/kernel_shadow_ast.dart' show KernelTypeInferenceEngine; |
| 50 | 52 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 66 | 68 |
| 67 import 'source_class_builder.dart' show SourceClassBuilder; | 69 import 'source_class_builder.dart' show SourceClassBuilder; |
| 68 | 70 |
| 69 import 'source_library_builder.dart' show SourceLibraryBuilder; | 71 import 'source_library_builder.dart' show SourceLibraryBuilder; |
| 70 | 72 |
| 71 class SourceLoader<L> extends Loader<L> { | 73 class SourceLoader<L> extends Loader<L> { |
| 72 /// The [FileSystem] which should be used to access files. | 74 /// The [FileSystem] which should be used to access files. |
| 73 final FileSystem fileSystem; | 75 final FileSystem fileSystem; |
| 74 | 76 |
| 75 final Map<Uri, List<int>> sourceBytes = <Uri, List<int>>{}; | 77 final Map<Uri, List<int>> sourceBytes = <Uri, List<int>>{}; |
| 78 |
| 76 final bool excludeSource = CompilerContext.current.options.excludeSource; | 79 final bool excludeSource = CompilerContext.current.options.excludeSource; |
| 77 | 80 |
| 78 // Used when building directly to kernel. | 81 // Used when building directly to kernel. |
| 79 ClassHierarchy hierarchy; | 82 ClassHierarchy hierarchy; |
| 80 CoreTypes coreTypes; | 83 CoreTypes coreTypes; |
| 81 | 84 |
| 82 TypeInferenceEngine typeInferenceEngine; | 85 TypeInferenceEngine typeInferenceEngine; |
| 83 | 86 |
| 84 Instrumentation instrumentation; | 87 Instrumentation instrumentation; |
| 85 | 88 |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 isSuper: isSuper, | 522 isSuper: isSuper, |
| 520 isStatic: isStatic, | 523 isStatic: isStatic, |
| 521 isConstructor: isConstructor, | 524 isConstructor: isConstructor, |
| 522 isTopLevel: isTopLevel); | 525 isTopLevel: isTopLevel); |
| 523 } | 526 } |
| 524 | 527 |
| 525 Expression throwCompileConstantError(Expression error) { | 528 Expression throwCompileConstantError(Expression error) { |
| 526 return target.backendTarget.throwCompileConstantError(coreTypes, error); | 529 return target.backendTarget.throwCompileConstantError(coreTypes, error); |
| 527 } | 530 } |
| 528 | 531 |
| 529 Expression deprecated_buildCompileTimeError(String message, int offset) { | 532 Expression buildCompileTimeError(Message message, int offset, Uri uri) { |
| 530 return target.backendTarget | 533 String text = deprecated_formatUnexpected(uri, offset, message.message); |
| 531 .buildCompileTimeError(coreTypes, message, offset); | 534 return target.backendTarget.buildCompileTimeError(coreTypes, text, offset); |
| 532 } | 535 } |
| 533 } | 536 } |
| OLD | NEW |