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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend_impact.dart

Issue 2989453002: Add support for compiling Dart via the FE in dart2js. (Closed)
Patch Set: update status Created 3 years, 4 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.js_helpers.impact; 5 library dart2js.js_helpers.impact;
6 6
7 import '../common/names.dart'; 7 import '../common/names.dart';
8 import '../common_elements.dart' show CommonElements, ElementEnvironment; 8 import '../common_elements.dart' show CommonElements, ElementEnvironment;
9 import '../elements/types.dart' show InterfaceType; 9 import '../elements/types.dart' show InterfaceType;
10 import '../elements/entities.dart'; 10 import '../elements/entities.dart';
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 BackendImpact get asCheck { 197 BackendImpact get asCheck {
198 return _asCheck ??= 198 return _asCheck ??=
199 new BackendImpact(staticUses: [_commonElements.throwRuntimeError]); 199 new BackendImpact(staticUses: [_commonElements.throwRuntimeError]);
200 } 200 }
201 201
202 BackendImpact _throwNoSuchMethod; 202 BackendImpact _throwNoSuchMethod;
203 203
204 BackendImpact get throwNoSuchMethod { 204 BackendImpact get throwNoSuchMethod {
205 return _throwNoSuchMethod ??= new BackendImpact( 205 return _throwNoSuchMethod ??= new BackendImpact(
206 instantiatedClasses: _options.useKernel 206 instantiatedClasses: _options.useKernelInSsa
207 ? [ 207 ? [
208 _commonElements.symbolImplementationClass, 208 _commonElements.symbolImplementationClass,
209 ] 209 ]
210 : [], 210 : [],
211 staticUses: _options.useKernel 211 staticUses: _options.useKernelInSsa
212 ? [ 212 ? [
213 _commonElements.genericNoSuchMethod, 213 _commonElements.genericNoSuchMethod,
214 _commonElements.unresolvedConstructorError, 214 _commonElements.unresolvedConstructorError,
215 _commonElements.unresolvedStaticMethodError, 215 _commonElements.unresolvedStaticMethodError,
216 _commonElements.unresolvedStaticGetterError, 216 _commonElements.unresolvedStaticGetterError,
217 _commonElements.unresolvedStaticSetterError, 217 _commonElements.unresolvedStaticSetterError,
218 _commonElements.unresolvedTopLevelMethodError, 218 _commonElements.unresolvedTopLevelMethodError,
219 _commonElements.unresolvedTopLevelGetterError, 219 _commonElements.unresolvedTopLevelGetterError,
220 _commonElements.unresolvedTopLevelSetterError, 220 _commonElements.unresolvedTopLevelSetterError,
221 _commonElements.symbolConstructorTarget, 221 _commonElements.symbolConstructorTarget,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 _commonElements.jsFixedArrayClass, 280 _commonElements.jsFixedArrayClass,
281 _commonElements.jsExtendableArrayClass, 281 _commonElements.jsExtendableArrayClass,
282 _commonElements.jsUnmodifiableArrayClass 282 _commonElements.jsUnmodifiableArrayClass
283 ]); 283 ]);
284 } 284 }
285 285
286 BackendImpact _throwRuntimeError; 286 BackendImpact _throwRuntimeError;
287 287
288 BackendImpact get throwRuntimeError { 288 BackendImpact get throwRuntimeError {
289 return _throwRuntimeError ??= new BackendImpact( 289 return _throwRuntimeError ??= new BackendImpact(
290 staticUses: _options.useKernel 290 staticUses: _options.useKernelInSsa
291 ? [ 291 ? [
292 // TODO(sra): Refactor impacts so that we know which of these 292 // TODO(sra): Refactor impacts so that we know which of these
293 // are called. 293 // are called.
294 _commonElements.malformedTypeError, 294 _commonElements.malformedTypeError,
295 _commonElements.throwRuntimeError, 295 _commonElements.throwRuntimeError,
296 ] 296 ]
297 : [ 297 : [
298 _commonElements.throwRuntimeError, 298 _commonElements.throwRuntimeError,
299 ], 299 ],
300 otherImpacts: [ 300 otherImpacts: [
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 498
499 BackendImpact get checkedModeTypeCheck { 499 BackendImpact get checkedModeTypeCheck {
500 return _checkedModeTypeCheck ??= 500 return _checkedModeTypeCheck ??=
501 new BackendImpact(staticUses: [_commonElements.throwRuntimeError]); 501 new BackendImpact(staticUses: [_commonElements.throwRuntimeError]);
502 } 502 }
503 503
504 BackendImpact _malformedTypeCheck; 504 BackendImpact _malformedTypeCheck;
505 505
506 BackendImpact get malformedTypeCheck { 506 BackendImpact get malformedTypeCheck {
507 return _malformedTypeCheck ??= new BackendImpact( 507 return _malformedTypeCheck ??= new BackendImpact(
508 staticUses: _options.useKernel 508 staticUses: _options.useKernelInSsa
509 ? [ 509 ? [
510 _commonElements.malformedTypeError, 510 _commonElements.malformedTypeError,
511 ] 511 ]
512 : [ 512 : [
513 _commonElements.throwTypeError, 513 _commonElements.throwTypeError,
514 ]); 514 ]);
515 } 515 }
516 516
517 BackendImpact _genericTypeCheck; 517 BackendImpact _genericTypeCheck;
518 518
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 /// Backend impact for type variables through mirrors. 803 /// Backend impact for type variables through mirrors.
804 BackendImpact get typeVariableMirror { 804 BackendImpact get typeVariableMirror {
805 return _typeVariableMirror ??= new BackendImpact(staticUses: [ 805 return _typeVariableMirror ??= new BackendImpact(staticUses: [
806 _commonElements.typeVariableConstructor, 806 _commonElements.typeVariableConstructor,
807 _commonElements.createRuntimeType 807 _commonElements.createRuntimeType
808 ], instantiatedClasses: [ 808 ], instantiatedClasses: [
809 _commonElements.typeVariableClass 809 _commonElements.typeVariableClass
810 ]); 810 ]);
811 } 811 }
812 } 812 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698