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 dart2js.serialization_system; | 5 library dart2js.serialization_system; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import '../commandline_options.dart'; | 8 import '../commandline_options.dart'; |
9 import '../common.dart'; | 9 import '../common.dart'; |
10 import '../common/backend_api.dart'; | 10 import '../common/backend_api.dart'; |
(...skipping 18 matching lines...) Expand all Loading... |
29 class DeserializerSystemImpl extends DeserializerSystem { | 29 class DeserializerSystemImpl extends DeserializerSystem { |
30 final Compiler _compiler; | 30 final Compiler _compiler; |
31 final DeserializationContext deserializationContext; | 31 final DeserializationContext deserializationContext; |
32 final List<LibraryElement> deserializedLibraries = <LibraryElement>[]; | 32 final List<LibraryElement> deserializedLibraries = <LibraryElement>[]; |
33 final ResolutionImpactDeserializer _resolutionImpactDeserializer; | 33 final ResolutionImpactDeserializer _resolutionImpactDeserializer; |
34 final ResolvedAstDeserializerPlugin _resolvedAstDeserializer; | 34 final ResolvedAstDeserializerPlugin _resolvedAstDeserializer; |
35 final ImpactTransformer _impactTransformer; | 35 final ImpactTransformer _impactTransformer; |
36 | 36 |
37 factory DeserializerSystemImpl( | 37 factory DeserializerSystemImpl( |
38 Compiler compiler, ImpactTransformer impactTransformer) { | 38 Compiler compiler, ImpactTransformer impactTransformer) { |
39 DeserializationContext context = new DeserializationContext(); | 39 DeserializationContext context = |
| 40 new DeserializationContext(compiler.reporter); |
40 DeserializerPlugin backendDeserializer = | 41 DeserializerPlugin backendDeserializer = |
41 compiler.backend.serialization.deserializer; | 42 compiler.backend.serialization.deserializer; |
42 context.plugins.add(backendDeserializer); | 43 context.plugins.add(backendDeserializer); |
43 ResolutionImpactDeserializer resolutionImpactDeserializer = | 44 ResolutionImpactDeserializer resolutionImpactDeserializer = |
44 new ResolutionImpactDeserializer(backendDeserializer); | 45 new ResolutionImpactDeserializer(backendDeserializer); |
45 context.plugins.add(resolutionImpactDeserializer); | 46 context.plugins.add(resolutionImpactDeserializer); |
46 ResolvedAstDeserializerPlugin resolvedAstDeserializer = | 47 ResolvedAstDeserializerPlugin resolvedAstDeserializer = |
47 new ResolvedAstDeserializerPlugin( | 48 new ResolvedAstDeserializerPlugin( |
48 compiler.parsingContext, backendDeserializer); | 49 compiler.parsingContext, backendDeserializer); |
49 context.plugins.add(resolvedAstDeserializer); | 50 context.plugins.add(resolvedAstDeserializer); |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 } | 243 } |
243 | 244 |
244 @override | 245 @override |
245 void onElement(Element element, ObjectDecoder getDecoder(String tag)) { | 246 void onElement(Element element, ObjectDecoder getDecoder(String tag)) { |
246 ObjectDecoder decoder = getDecoder(RESOLVED_AST_TAG); | 247 ObjectDecoder decoder = getDecoder(RESOLVED_AST_TAG); |
247 if (decoder != null) { | 248 if (decoder != null) { |
248 _decoderMap[element] = decoder; | 249 _decoderMap[element] = decoder; |
249 } | 250 } |
250 } | 251 } |
251 } | 252 } |
OLD | NEW |