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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/gvn.dart

Issue 1784263002: dart2js cps: A few extra RTI optimizations. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix negation Created 4 years, 9 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.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
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
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 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart ('k') | pkg/compiler/lib/src/cps_ir/type_propagation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698