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

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

Issue 2302363003: No longer store the compilation-context in WorkItem. (Closed)
Patch Set: ... lint Created 4 years, 3 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/common/codegen.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
(...skipping 16 matching lines...) Expand all
27 import '../native/native.dart' as native show NativeEnqueuer, maybeEnableNative; 27 import '../native/native.dart' as native show NativeEnqueuer, maybeEnableNative;
28 import '../patch_parser.dart' 28 import '../patch_parser.dart'
29 show checkNativeAnnotation, checkJsInteropAnnotation; 29 show checkNativeAnnotation, checkJsInteropAnnotation;
30 import '../serialization/serialization.dart' 30 import '../serialization/serialization.dart'
31 show DeserializerPlugin, SerializerPlugin; 31 show DeserializerPlugin, SerializerPlugin;
32 import '../tree/tree.dart' show Node; 32 import '../tree/tree.dart' show Node;
33 import '../universe/world_impact.dart' show ImpactStrategy, WorldImpact; 33 import '../universe/world_impact.dart' show ImpactStrategy, WorldImpact;
34 import 'codegen.dart' show CodegenWorkItem; 34 import 'codegen.dart' show CodegenWorkItem;
35 import 'registry.dart' show Registry; 35 import 'registry.dart' show Registry;
36 import 'tasks.dart' show CompilerTask; 36 import 'tasks.dart' show CompilerTask;
37 import 'work.dart' show ItemCompilationContext;
38 37
39 abstract class Backend extends Target { 38 abstract class Backend extends Target {
40 final Compiler compiler; 39 final Compiler compiler;
41 40
42 Backend(this.compiler); 41 Backend(this.compiler);
43 42
44 /// Returns true if the backend supports reflection. 43 /// Returns true if the backend supports reflection.
45 bool get supportsReflection; 44 bool get supportsReflection;
46 45
47 /// The [ConstantSystem] used to interpret compile-time constants for this 46 /// The [ConstantSystem] used to interpret compile-time constants for this
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 97 }
99 98
100 /// Generates the output and returns the total size of the generated code. 99 /// Generates the output and returns the total size of the generated code.
101 int assembleProgram(); 100 int assembleProgram();
102 101
103 List<CompilerTask> get tasks; 102 List<CompilerTask> get tasks;
104 103
105 void onResolutionComplete() {} 104 void onResolutionComplete() {}
106 void onTypeInferenceComplete() {} 105 void onTypeInferenceComplete() {}
107 106
108 ItemCompilationContext createItemCompilationContext() {
109 return new ItemCompilationContext();
110 }
111
112 bool classNeedsRti(ClassElement cls); 107 bool classNeedsRti(ClassElement cls);
113 bool methodNeedsRti(FunctionElement function); 108 bool methodNeedsRti(FunctionElement function);
114 109
115 /// Enable compilation of code with compile time errors. Returns `true` if 110 /// Enable compilation of code with compile time errors. Returns `true` if
116 /// supported by the backend. 111 /// supported by the backend.
117 bool enableCodegenWithErrorsIfSupported(Spannable node); 112 bool enableCodegenWithErrorsIfSupported(Spannable node);
118 113
119 /// Enable deferred loading. Returns `true` if the backend supports deferred 114 /// Enable deferred loading. Returns `true` if the backend supports deferred
120 /// loading. 115 /// loading.
121 bool enableDeferredLoadingIfSupported(Spannable node, Registry registry); 116 bool enableDeferredLoadingIfSupported(Spannable node, Registry registry);
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 } 404 }
410 } 405 }
411 406
412 /// Interface for serialization of backend specific data. 407 /// Interface for serialization of backend specific data.
413 class BackendSerialization { 408 class BackendSerialization {
414 const BackendSerialization(); 409 const BackendSerialization();
415 410
416 SerializerPlugin get serializer => const SerializerPlugin(); 411 SerializerPlugin get serializer => const SerializerPlugin();
417 DeserializerPlugin get deserializer => const DeserializerPlugin(); 412 DeserializerPlugin get deserializer => const DeserializerPlugin();
418 } 413 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/common/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698