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

Side by Side Diff: pkg/compiler/lib/src/common/backend_api.dart

Issue 1892093003: Support deserialized compilation of the empty program. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.backend_api; 5 library dart2js.backend_api;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common/codegen.dart' show CodegenImpact; 10 import '../common/codegen.dart' show CodegenImpact;
11 import '../common/resolution.dart' show ResolutionImpact; 11 import '../common/resolution.dart' show ResolutionImpact, Frontend;
12 import '../compile_time_constants.dart' 12 import '../compile_time_constants.dart'
13 show BackendConstantEnvironment, ConstantCompilerTask; 13 show BackendConstantEnvironment, ConstantCompilerTask;
14 import '../compiler.dart' show Compiler; 14 import '../compiler.dart' show Compiler;
15 import '../constants/constant_system.dart' show ConstantSystem; 15 import '../constants/constant_system.dart' show ConstantSystem;
16 import '../constants/expressions.dart' show ConstantExpression; 16 import '../constants/expressions.dart' show ConstantExpression;
17 import '../constants/values.dart' show ConstantValue; 17 import '../constants/values.dart' show ConstantValue;
18 import '../dart_types.dart' show DartType, InterfaceType; 18 import '../dart_types.dart' show DartType, InterfaceType;
19 import '../elements/elements.dart' 19 import '../elements/elements.dart'
20 show 20 show
21 ClassElement, 21 ClassElement,
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 /// Returns null if there is none. 386 /// Returns null if there is none.
387 Uri resolvePatchUri(String libraryName, Uri plaformConfigUri); 387 Uri resolvePatchUri(String libraryName, Uri plaformConfigUri);
388 388
389 /// Creates an impact strategy to use for compilation. 389 /// Creates an impact strategy to use for compilation.
390 ImpactStrategy createImpactStrategy( 390 ImpactStrategy createImpactStrategy(
391 {bool supportDeferredLoad: true, 391 {bool supportDeferredLoad: true,
392 bool supportDumpInfo: true, 392 bool supportDumpInfo: true,
393 bool supportSerialization: true}) { 393 bool supportSerialization: true}) {
394 return const ImpactStrategy(); 394 return const ImpactStrategy();
395 } 395 }
396
397 /// Backend access to the front-end.
398 Frontend get frontend => compiler.resolution;
396 } 399 }
397 400
398 /// Interface for resolving calls to foreign functions. 401 /// Interface for resolving calls to foreign functions.
399 abstract class ForeignResolver { 402 abstract class ForeignResolver {
400 /// Returns the constant expression of [node], or `null` if [node] is not 403 /// Returns the constant expression of [node], or `null` if [node] is not
401 /// a constant expression. 404 /// a constant expression.
402 ConstantExpression getConstant(Node node); 405 ConstantExpression getConstant(Node node);
403 406
404 /// Registers [type] as instantiated. 407 /// Registers [type] as instantiated.
405 void registerInstantiatedType(InterfaceType type); 408 void registerInstantiatedType(InterfaceType type);
(...skipping 17 matching lines...) Expand all
423 } 426 }
424 } 427 }
425 428
426 /// Interface for serialization of backend specific data. 429 /// Interface for serialization of backend specific data.
427 class BackendSerialization { 430 class BackendSerialization {
428 const BackendSerialization(); 431 const BackendSerialization();
429 432
430 SerializerPlugin get serializer => const SerializerPlugin(); 433 SerializerPlugin get serializer => const SerializerPlugin();
431 DeserializerPlugin get deserializer => const DeserializerPlugin(); 434 DeserializerPlugin get deserializer => const DeserializerPlugin();
432 } 435 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698