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

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

Issue 2609063002: Further reduce use of Element in codegen. (Closed)
Patch Set: Created 3 years, 11 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_backend.helpers; 5 library dart2js.js_backend.helpers;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/names.dart' show Identifiers, Uris; 8 import '../common/names.dart' show Identifiers, Uris;
9 import '../common/resolution.dart' show Resolution; 9 import '../common/resolution.dart' show Resolution;
10 import '../compiler.dart' show Compiler; 10 import '../compiler.dart' show Compiler;
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 } 494 }
495 495
496 MethodElement get _consoleTraceHelper { 496 MethodElement get _consoleTraceHelper {
497 return _findHelper('consoleTraceHelper'); 497 return _findHelper('consoleTraceHelper');
498 } 498 }
499 499
500 MethodElement get _postTraceHelper { 500 MethodElement get _postTraceHelper {
501 return _findHelper('postTraceHelper'); 501 return _findHelper('postTraceHelper');
502 } 502 }
503 503
504 FunctionElement get closureFromTearOff { 504 MethodElement get closureFromTearOff {
505 return _findHelper('closureFromTearOff'); 505 return _findHelper('closureFromTearOff');
506 } 506 }
507 507
508 Element get isJsIndexable { 508 Element get isJsIndexable {
509 return _findHelper('isJsIndexable'); 509 return _findHelper('isJsIndexable');
510 } 510 }
511 511
512 Element get throwIllegalArgumentException { 512 MethodElement get throwIllegalArgumentException {
513 return _findHelper('iae'); 513 return _findHelper('iae');
514 } 514 }
515 515
516 Element get throwIndexOutOfRangeException { 516 MethodElement get throwIndexOutOfRangeException {
517 return _findHelper('ioore'); 517 return _findHelper('ioore');
518 } 518 }
519 519
520 Element get exceptionUnwrapper { 520 Element get exceptionUnwrapper {
521 return _findHelper('unwrapException'); 521 return _findHelper('unwrapException');
522 } 522 }
523 523
524 Element get throwRuntimeError { 524 Element get throwRuntimeError {
525 return _findHelper('throwRuntimeError'); 525 return _findHelper('throwRuntimeError');
526 } 526 }
527 527
528 Element get throwTypeError { 528 Element get throwTypeError {
529 return _findHelper('throwTypeError'); 529 return _findHelper('throwTypeError');
530 } 530 }
531 531
532 Element get throwAbstractClassInstantiationError { 532 Element get throwAbstractClassInstantiationError {
533 return _findHelper('throwAbstractClassInstantiationError'); 533 return _findHelper('throwAbstractClassInstantiationError');
534 } 534 }
535 535
536 Element get checkConcurrentModificationError { 536 Element get checkConcurrentModificationError {
537 if (cachedCheckConcurrentModificationError == null) { 537 if (cachedCheckConcurrentModificationError == null) {
538 cachedCheckConcurrentModificationError = 538 cachedCheckConcurrentModificationError =
539 _findHelper('checkConcurrentModificationError'); 539 _findHelper('checkConcurrentModificationError');
540 } 540 }
541 return cachedCheckConcurrentModificationError; 541 return cachedCheckConcurrentModificationError;
542 } 542 }
543 543
544 Element get throwConcurrentModificationError { 544 MethodElement get throwConcurrentModificationError {
545 return _findHelper('throwConcurrentModificationError'); 545 return _findHelper('throwConcurrentModificationError');
546 } 546 }
547 547
548 Element get checkInt => _checkInt ??= _findHelper('checkInt'); 548 Element get checkInt => _checkInt ??= _findHelper('checkInt');
549 Element _checkInt; 549 Element _checkInt;
550 550
551 Element get checkNum => _checkNum ??= _findHelper('checkNum'); 551 Element get checkNum => _checkNum ??= _findHelper('checkNum');
552 Element _checkNum; 552 Element _checkNum;
553 553
554 Element get checkString => _checkString ??= _findHelper('checkString'); 554 Element get checkString => _checkString ??= _findHelper('checkString');
555 Element _checkString; 555 Element _checkString;
556 556
557 Element get stringInterpolationHelper { 557 MethodElement get stringInterpolationHelper {
558 return _findHelper('S'); 558 return _findHelper('S');
559 } 559 }
560 560
561 Element get wrapExceptionHelper { 561 MethodElement get wrapExceptionHelper {
562 return _findHelper(r'wrapException'); 562 return _findHelper(r'wrapException');
563 } 563 }
564 564
565 Element get throwExpressionHelper { 565 MethodElement get throwExpressionHelper {
566 return _findHelper('throwExpression'); 566 return _findHelper('throwExpression');
567 } 567 }
568 568
569 Element get closureConverter { 569 Element get closureConverter {
570 return _findHelper('convertDartClosureToJS'); 570 return _findHelper('convertDartClosureToJS');
571 } 571 }
572 572
573 Element get traceFromException { 573 Element get traceFromException {
574 return _findHelper('getTraceFromException'); 574 return _findHelper('getTraceFromException');
575 } 575 }
576 576
577 Element get setRuntimeTypeInfo { 577 Element get setRuntimeTypeInfo {
578 return _findHelper('setRuntimeTypeInfo'); 578 return _findHelper('setRuntimeTypeInfo');
579 } 579 }
580 580
581 Element get getRuntimeTypeInfo { 581 Element get getRuntimeTypeInfo {
582 return _findHelper('getRuntimeTypeInfo'); 582 return _findHelper('getRuntimeTypeInfo');
583 } 583 }
584 584
585 Element get getTypeArgumentByIndex { 585 MethodElement get getTypeArgumentByIndex {
586 return _findHelper('getTypeArgumentByIndex'); 586 return _findHelper('getTypeArgumentByIndex');
587 } 587 }
588 588
589 Element get computeSignature { 589 Element get computeSignature {
590 return _findHelper('computeSignature'); 590 return _findHelper('computeSignature');
591 } 591 }
592 592
593 Element get getRuntimeTypeArguments { 593 Element get getRuntimeTypeArguments {
594 return _findHelper('getRuntimeTypeArguments'); 594 return _findHelper('getRuntimeTypeArguments');
595 } 595 }
596 596
597 Element get getRuntimeTypeArgument { 597 MethodElement get getRuntimeTypeArgument {
598 return _findHelper('getRuntimeTypeArgument'); 598 return _findHelper('getRuntimeTypeArgument');
599 } 599 }
600 600
601 Element get runtimeTypeToString { 601 Element get runtimeTypeToString {
602 return _findHelper('runtimeTypeToString'); 602 return _findHelper('runtimeTypeToString');
603 } 603 }
604 604
605 Element get assertIsSubtype { 605 Element get assertIsSubtype {
606 return _findHelper('assertIsSubtype'); 606 return _findHelper('assertIsSubtype');
607 } 607 }
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 } 819 }
820 820
821 Element get callInIsolate { 821 Element get callInIsolate {
822 return _find(isolateHelperLibrary, '_callInIsolate'); 822 return _find(isolateHelperLibrary, '_callInIsolate');
823 } 823 }
824 824
825 Element get findIndexForNativeSubclassType { 825 Element get findIndexForNativeSubclassType {
826 return _findInterceptor('findIndexForNativeSubclassType'); 826 return _findInterceptor('findIndexForNativeSubclassType');
827 } 827 }
828 828
829 Element get convertRtiToRuntimeType { 829 MethodElement get convertRtiToRuntimeType {
830 return _findHelper('convertRtiToRuntimeType'); 830 return _findHelper('convertRtiToRuntimeType');
831 } 831 }
832 832
833 ClassElement get stackTraceClass { 833 ClassElement get stackTraceClass {
834 return _findHelper('_StackTrace'); 834 return _findHelper('_StackTrace');
835 } 835 }
836 836
837 MethodElement _objectNoSuchMethod; 837 MethodElement _objectNoSuchMethod;
838 838
839 MethodElement get objectNoSuchMethod { 839 MethodElement get objectNoSuchMethod {
(...skipping 26 matching lines...) Expand all
866 } 866 }
867 867
868 MethodElement get toStringForNativeObject { 868 MethodElement get toStringForNativeObject {
869 return _findHelper('toStringForNativeObject'); 869 return _findHelper('toStringForNativeObject');
870 } 870 }
871 871
872 MethodElement get hashCodeForNativeObject { 872 MethodElement get hashCodeForNativeObject {
873 return _findHelper('hashCodeForNativeObject'); 873 return _findHelper('hashCodeForNativeObject');
874 } 874 }
875 } 875 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698