OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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.ir_builder_task; | 5 library dart2js.ir_builder_task; |
6 | 6 |
7 import '../closure.dart' as closurelib; | 7 import '../closure.dart' as closurelib; |
8 import '../closure.dart' hide ClosureScope; | 8 import '../closure.dart' hide ClosureScope; |
9 import '../constants/expressions.dart'; | 9 import '../constants/expressions.dart'; |
10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 | 764 |
765 @override | 765 @override |
766 ir.Primitive handleStaticFunctionGet( | 766 ir.Primitive handleStaticFunctionGet( |
767 ast.Send node, | 767 ast.Send node, |
768 MethodElement function, | 768 MethodElement function, |
769 _) { | 769 _) { |
770 // TODO(karlklose): support foreign functions. | 770 // TODO(karlklose): support foreign functions. |
771 if (function.isForeign(compiler.backend)) { | 771 if (function.isForeign(compiler.backend)) { |
772 return giveup(node, 'handleStaticFunctionGet: foreign: $function'); | 772 return giveup(node, 'handleStaticFunctionGet: foreign: $function'); |
773 } | 773 } |
774 return giveup(node, 'handleStaticFunctionGet: $function'); | 774 return irBuilder.buildStaticFunctionGet(function); |
775 } | 775 } |
776 | 776 |
777 @override | 777 @override |
778 ir.Primitive handleStaticGetterGet( | 778 ir.Primitive handleStaticGetterGet( |
779 ast.Send node, | 779 ast.Send node, |
780 FunctionElement getter, | 780 FunctionElement getter, |
781 _) { | 781 _) { |
782 return irBuilder.buildStaticGetterGet(getter); | 782 return irBuilder.buildStaticGetterGet(getter); |
783 } | 783 } |
784 | 784 |
(...skipping 2898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3683 } | 3683 } |
3684 | 3684 |
3685 processDeclareFunction(ir.DeclareFunction node) { | 3685 processDeclareFunction(ir.DeclareFunction node) { |
3686 node.body = replacementFor(node.body); | 3686 node.body = replacementFor(node.body); |
3687 } | 3687 } |
3688 | 3688 |
3689 processSetField(ir.SetField node) { | 3689 processSetField(ir.SetField node) { |
3690 node.body = replacementFor(node.body); | 3690 node.body = replacementFor(node.body); |
3691 } | 3691 } |
3692 | 3692 |
| 3693 processSetStatic(ir.SetStatic node) { |
| 3694 node.body = replacementFor(node.body); |
| 3695 } |
| 3696 |
3693 processContinuation(ir.Continuation node) { | 3697 processContinuation(ir.Continuation node) { |
3694 node.body = replacementFor(node.body); | 3698 node.body = replacementFor(node.body); |
3695 } | 3699 } |
3696 | 3700 |
3697 processBody(ir.Body node) { | 3701 processBody(ir.Body node) { |
3698 node.body = replacementFor(node.body); | 3702 node.body = replacementFor(node.body); |
3699 } | 3703 } |
3700 } | 3704 } |
3701 | 3705 |
3702 /// Visit a just-deleted subterm and unlink all [Reference]s in it. | 3706 /// Visit a just-deleted subterm and unlink all [Reference]s in it. |
3703 class RemovalVisitor extends ir.RecursiveVisitor { | 3707 class RemovalVisitor extends ir.RecursiveVisitor { |
3704 processReference(ir.Reference reference) { | 3708 processReference(ir.Reference reference) { |
3705 reference.unlink(); | 3709 reference.unlink(); |
3706 } | 3710 } |
3707 } | 3711 } |
OLD | NEW |