| 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 library dart2js.cps_ir.gvn; | 5 library dart2js.cps_ir.gvn; |
| 6 | 6 |
| 7 import 'cps_ir_nodes.dart'; | 7 import 'cps_ir_nodes.dart'; |
| 8 import '../universe/side_effects.dart'; | 8 import '../universe/side_effects.dart'; |
| 9 import '../elements/elements.dart'; | 9 import '../elements/elements.dart'; |
| 10 import 'optimizers.dart' show Pass; | 10 import 'optimizers.dart' show Pass; |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 | 571 |
| 572 processReifyRuntimeType(ReifyRuntimeType node) { | 572 processReifyRuntimeType(ReifyRuntimeType node) { |
| 573 vector = [GvnCode.REIFY_RUNTIME_TYPE]; | 573 vector = [GvnCode.REIFY_RUNTIME_TYPE]; |
| 574 } | 574 } |
| 575 | 575 |
| 576 processReadTypeVariable(ReadTypeVariable node) { | 576 processReadTypeVariable(ReadTypeVariable node) { |
| 577 vector = [GvnCode.READ_TYPE_VARIABLE, node.variable]; | 577 vector = [GvnCode.READ_TYPE_VARIABLE, node.variable]; |
| 578 } | 578 } |
| 579 | 579 |
| 580 processTypeExpression(TypeExpression node) { | 580 processTypeExpression(TypeExpression node) { |
| 581 vector = [GvnCode.TYPE_EXPRESSION, node.dartType]; | 581 vector = [GvnCode.TYPE_EXPRESSION, node.kind.index, node.dartType]; |
| 582 } | 582 } |
| 583 | 583 |
| 584 processInterceptor(Interceptor node) { | 584 processInterceptor(Interceptor node) { |
| 585 vector = [GvnCode.INTERCEPTOR]; | 585 vector = [GvnCode.INTERCEPTOR]; |
| 586 } | 586 } |
| 587 } | 587 } |
| 588 | 588 |
| 589 class GvnCode { | 589 class GvnCode { |
| 590 static const int TYPE_TEST = 1; | 590 static const int TYPE_TEST = 1; |
| 591 static const int TYPE_TEST_VIA_FLAG = 2; | 591 static const int TYPE_TEST_VIA_FLAG = 2; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 609 | 609 |
| 610 @override | 610 @override |
| 611 processReference(Reference ref) { | 611 processReference(Reference ref) { |
| 612 callback(ref); | 612 callback(ref); |
| 613 } | 613 } |
| 614 | 614 |
| 615 static void forEach(Primitive node, ReferenceCallback callback) { | 615 static void forEach(Primitive node, ReferenceCallback callback) { |
| 616 new InputVisitor(callback).visit(node); | 616 new InputVisitor(callback).visit(node); |
| 617 } | 617 } |
| 618 } | 618 } |
| OLD | NEW |