OLD | NEW |
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 part of dart2js.semantics_visitor_test; | 5 part of dart2js.semantics_visitor_test; |
6 | 6 |
7 class SemanticDeclarationTestVisitor extends SemanticTestVisitor { | 7 class SemanticDeclarationTestVisitor extends SemanticTestVisitor { |
8 | 8 |
9 SemanticDeclarationTestVisitor(TreeElements elements) : super(elements); | 9 SemanticDeclarationTestVisitor(TreeElements elements) : super(elements); |
10 | 10 |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 FunctionExpression node, | 473 FunctionExpression node, |
474 MethodElement setter, | 474 MethodElement setter, |
475 NodeList parameters, | 475 NodeList parameters, |
476 Node body, | 476 Node body, |
477 arg) { | 477 arg) { |
478 visits.add(new Visit(VisitKind.VISIT_STATIC_SETTER_DECL, | 478 visits.add(new Visit(VisitKind.VISIT_STATIC_SETTER_DECL, |
479 element: setter, parameters: parameters, body: body)); | 479 element: setter, parameters: parameters, body: body)); |
480 applyParameters(parameters, arg); | 480 applyParameters(parameters, arg); |
481 apply(body, arg); | 481 apply(body, arg); |
482 } | 482 } |
483 | |
484 @override | |
485 visitUnresolvedClassConstructorInvoke( | |
486 NewExpression node, | |
487 Element constructor, | |
488 MalformedType type, | |
489 NodeList arguments, | |
490 Selector selector, | |
491 arg) { | |
492 // TODO(johnniwinther): Test [type] and [selector]. | |
493 visits.add(new Visit( | |
494 VisitKind.VISIT_UNRESOLVED_CLASS_CONSTRUCTOR_INVOKE, | |
495 arguments: arguments)); | |
496 apply(arguments, arg); | |
497 } | |
498 | |
499 @override | |
500 visitUnresolvedConstructorInvoke( | |
501 NewExpression node, | |
502 Element constructor, | |
503 DartType type, | |
504 NodeList arguments, | |
505 Selector selector, | |
506 arg) { | |
507 // TODO(johnniwinther): Test [type] and [selector]. | |
508 visits.add(new Visit( | |
509 VisitKind.VISIT_UNRESOLVED_CONSTRUCTOR_INVOKE, | |
510 arguments: arguments)); | |
511 apply(arguments, arg); | |
512 } | |
513 | |
514 @override | |
515 visitConstConstructorInvoke( | |
516 NewExpression node, | |
517 ConstructedConstantExpression constant, | |
518 arg) { | |
519 visits.add(new Visit(VisitKind.VISIT_CONST_CONSTRUCTOR_INVOKE, | |
520 constant: constant.getText())); | |
521 } | |
522 | |
523 @override | |
524 visitFactoryConstructorInvoke( | |
525 NewExpression node, | |
526 ConstructorElement constructor, | |
527 InterfaceType type, | |
528 NodeList arguments, | |
529 CallStructure callStructure, | |
530 arg) { | |
531 visits.add(new Visit( | |
532 VisitKind.VISIT_FACTORY_CONSTRUCTOR_INVOKE, | |
533 element: constructor, | |
534 type: type, | |
535 arguments: arguments, | |
536 selector: callStructure)); | |
537 apply(arguments, arg); | |
538 } | |
539 | |
540 @override | |
541 visitGenerativeConstructorInvoke( | |
542 NewExpression node, | |
543 ConstructorElement constructor, | |
544 InterfaceType type, | |
545 NodeList arguments, | |
546 CallStructure callStructure, | |
547 arg) { | |
548 visits.add(new Visit( | |
549 VisitKind.VISIT_GENERATIVE_CONSTRUCTOR_INVOKE, | |
550 element: constructor, | |
551 type: type, | |
552 arguments: arguments, | |
553 selector: callStructure)); | |
554 apply(arguments, arg); | |
555 } | |
556 | |
557 @override | |
558 visitRedirectingFactoryConstructorInvoke( | |
559 NewExpression node, | |
560 ConstructorElement constructor, | |
561 InterfaceType type, | |
562 ConstructorElement effectiveTarget, | |
563 InterfaceType effectiveTargetType, | |
564 NodeList arguments, | |
565 CallStructure callStructure, | |
566 arg) { | |
567 visits.add(new Visit( | |
568 VisitKind.VISIT_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE, | |
569 element: constructor, | |
570 type: type, | |
571 target: effectiveTarget, | |
572 targetType: effectiveTargetType, | |
573 arguments: arguments, | |
574 selector: callStructure)); | |
575 apply(arguments, arg); | |
576 } | |
577 | |
578 @override | |
579 visitRedirectingGenerativeConstructorInvoke( | |
580 NewExpression node, | |
581 ConstructorElement constructor, | |
582 InterfaceType type, | |
583 NodeList arguments, | |
584 CallStructure callStructure, | |
585 arg) { | |
586 visits.add(new Visit( | |
587 VisitKind.VISIT_REDIRECTING_GENERATIVE_CONSTRUCTOR_INVOKE, | |
588 element: constructor, | |
589 type: type, | |
590 arguments: arguments, | |
591 selector: callStructure)); | |
592 apply(arguments, arg); | |
593 } | |
594 | |
595 @override | |
596 visitAbstractClassConstructorInvoke( | |
597 NewExpression node, | |
598 ConstructorElement constructor, | |
599 InterfaceType type, | |
600 NodeList arguments, | |
601 CallStructure callStructure, | |
602 arg) { | |
603 visits.add(new Visit( | |
604 VisitKind.VISIT_ABSTRACT_CLASS_CONSTRUCTOR_INVOKE, | |
605 element: constructor, | |
606 type: type, | |
607 arguments: arguments, | |
608 selector: callStructure)); | |
609 apply(arguments, arg); | |
610 } | |
611 | |
612 @override | |
613 visitUnresolvedRedirectingFactoryConstructorInvoke( | |
614 NewExpression node, | |
615 ConstructorElement constructor, | |
616 InterfaceType type, | |
617 NodeList arguments, | |
618 CallStructure callStructure, | |
619 arg) { | |
620 visits.add(new Visit( | |
621 VisitKind.VISIT_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE, | |
622 element: constructor, | |
623 type: type, | |
624 arguments: arguments, | |
625 selector: callStructure)); | |
626 apply(arguments, arg); | |
627 } | |
628 } | 483 } |
OLD | NEW |