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

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

Issue 2545153002: Handle synthetic nodes use to throw exceptions (Closed)
Patch Set: Also handle malformed type Created 4 years 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 '../compiler.dart' show Compiler; 8 import '../compiler.dart' show Compiler;
9 import '../core_types.dart' show CommonElements; 9 import '../core_types.dart' show CommonElements;
10 import '../dart_types.dart' show InterfaceType; 10 import '../dart_types.dart' show InterfaceType;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 BackendImpact get asCheck { 155 BackendImpact get asCheck {
156 return _asCheck ??= 156 return _asCheck ??=
157 new BackendImpact(staticUses: [helpers.throwRuntimeError]); 157 new BackendImpact(staticUses: [helpers.throwRuntimeError]);
158 } 158 }
159 159
160 BackendImpact _throwNoSuchMethod; 160 BackendImpact _throwNoSuchMethod;
161 161
162 BackendImpact get throwNoSuchMethod { 162 BackendImpact get throwNoSuchMethod {
163 return _throwNoSuchMethod ??= new BackendImpact(staticUses: [ 163 return _throwNoSuchMethod ??= new BackendImpact(staticUses: [
164 helpers.throwNoSuchMethod 164 helpers.throwNoSuchMethod,
165 helpers.genericNoSuchMethod, // Used by kernel.
Siggi Cherem (dart-lang) 2016/12/02 23:44:18 should we make this conditional? if (compiler.opt
sra1 2016/12/03 00:12:38 Done.
166 helpers.unresolvedConstructorError, // Used by kernel.
165 ], otherImpacts: [ 167 ], otherImpacts: [
166 // Also register the types of the arguments passed to this method. 168 // Also register the types of the arguments passed to this method.
167 _needsList('Needed to encode the arguments for throw NoSuchMethodError.'), 169 _needsList('Needed to encode the arguments for throw NoSuchMethodError.'),
168 _needsString('Needed to encode the name for throw NoSuchMethodError.') 170 _needsString('Needed to encode the name for throw NoSuchMethodError.')
169 ]); 171 ]);
170 } 172 }
171 173
172 BackendImpact _stringValues; 174 BackendImpact _stringValues;
173 175
174 BackendImpact get stringValues { 176 BackendImpact get stringValues {
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 BackendImpact _checkedModeTypeCheck; 422 BackendImpact _checkedModeTypeCheck;
421 423
422 BackendImpact get checkedModeTypeCheck { 424 BackendImpact get checkedModeTypeCheck {
423 return _checkedModeTypeCheck ??= 425 return _checkedModeTypeCheck ??=
424 new BackendImpact(staticUses: [helpers.throwRuntimeError]); 426 new BackendImpact(staticUses: [helpers.throwRuntimeError]);
425 } 427 }
426 428
427 BackendImpact _malformedTypeCheck; 429 BackendImpact _malformedTypeCheck;
428 430
429 BackendImpact get malformedTypeCheck { 431 BackendImpact get malformedTypeCheck {
430 return _malformedTypeCheck ??= 432 return _malformedTypeCheck ??= new BackendImpact(staticUses: [
431 new BackendImpact(staticUses: [helpers.throwTypeError]); 433 helpers.throwTypeError,
434 helpers.malformedTypeError, // Used by kernel.
435 ]);
432 } 436 }
433 437
434 BackendImpact _genericTypeCheck; 438 BackendImpact _genericTypeCheck;
435 439
436 BackendImpact get genericTypeCheck { 440 BackendImpact get genericTypeCheck {
437 return _genericTypeCheck ??= new BackendImpact(staticUses: [ 441 return _genericTypeCheck ??= new BackendImpact(staticUses: [
438 helpers.checkSubtype, 442 helpers.checkSubtype,
439 // TODO(johnniwinther): Investigate why this is needed. 443 // TODO(johnniwinther): Investigate why this is needed.
440 helpers.setRuntimeTypeInfo, 444 helpers.setRuntimeTypeInfo,
441 helpers.getRuntimeTypeInfo 445 helpers.getRuntimeTypeInfo
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 705
702 BackendImpact _staticClosure; 706 BackendImpact _staticClosure;
703 707
704 /// Backend impact for performing closurization of a top-level or static 708 /// Backend impact for performing closurization of a top-level or static
705 /// function. 709 /// function.
706 BackendImpact get staticClosure { 710 BackendImpact get staticClosure {
707 return _staticClosure ??= 711 return _staticClosure ??=
708 new BackendImpact(globalClasses: [helpers.closureClass]); 712 new BackendImpact(globalClasses: [helpers.closureClass]);
709 } 713 }
710 } 714 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend_helpers.dart ('k') | pkg/compiler/lib/src/js_backend/no_such_method_registry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698