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

Side by Side Diff: pkg/compiler/lib/src/inferrer/inferrer_visitor.dart

Issue 2577423002: Further reduce use of Compiler.closedWorld. (Closed)
Patch Set: Created 4 years 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) 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 inferrer_visitor; 5 library inferrer_visitor;
6 6
7 import 'dart:collection' show IterableMixin; 7 import 'dart:collection' show IterableMixin;
8 8
9 import '../common.dart'; 9 import '../common.dart';
10 import '../options.dart' show CompilerOptions; 10 import '../options.dart' show CompilerOptions;
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 } 854 }
855 855
856 T visitLiteralBool(LiteralBool node) { 856 T visitLiteralBool(LiteralBool node) {
857 return types.boolLiteralType(node); 857 return types.boolLiteralType(node);
858 } 858 }
859 859
860 T visitLiteralDouble(LiteralDouble node) { 860 T visitLiteralDouble(LiteralDouble node) {
861 ConstantSystem constantSystem = compiler.backend.constantSystem; 861 ConstantSystem constantSystem = compiler.backend.constantSystem;
862 // The JavaScript backend may turn this literal into an integer at 862 // The JavaScript backend may turn this literal into an integer at
863 // runtime. 863 // runtime.
864 return types.getConcreteTypeFor( 864 return types.getConcreteTypeFor(computeTypeMask(closedWorld,
865 computeTypeMask(compiler, constantSystem.createDouble(node.value))); 865 compiler.backend, constantSystem.createDouble(node.value)));
866 } 866 }
867 867
868 T visitLiteralInt(LiteralInt node) { 868 T visitLiteralInt(LiteralInt node) {
869 ConstantSystem constantSystem = compiler.backend.constantSystem; 869 ConstantSystem constantSystem = compiler.backend.constantSystem;
870 // The JavaScript backend may turn this literal into a double at 870 // The JavaScript backend may turn this literal into a double at
871 // runtime. 871 // runtime.
872 return types.getConcreteTypeFor( 872 return types.getConcreteTypeFor(computeTypeMask(
873 computeTypeMask(compiler, constantSystem.createInt(node.value))); 873 closedWorld, compiler.backend, constantSystem.createInt(node.value)));
874 } 874 }
875 875
876 T visitLiteralList(LiteralList node) { 876 T visitLiteralList(LiteralList node) {
877 node.visitChildren(this); 877 node.visitChildren(this);
878 return node.isConst ? types.constListType : types.growableListType; 878 return node.isConst ? types.constListType : types.growableListType;
879 } 879 }
880 880
881 T visitLiteralMap(LiteralMap node) { 881 T visitLiteralMap(LiteralMap node) {
882 node.visitChildren(this); 882 node.visitChildren(this);
883 return node.isConst ? types.constMapType : types.mapType; 883 return node.isConst ? types.constMapType : types.mapType;
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
1495 return type; 1495 return type;
1496 } 1496 }
1497 1497
1498 T visitCascade(Cascade node) { 1498 T visitCascade(Cascade node) {
1499 // Ignore the result of the cascade send and return the type of the cascade 1499 // Ignore the result of the cascade send and return the type of the cascade
1500 // receiver. 1500 // receiver.
1501 visit(node.expression); 1501 visit(node.expression);
1502 return cascadeReceiverStack.removeLast(); 1502 return cascadeReceiverStack.removeLast();
1503 } 1503 }
1504 } 1504 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/common/backend_api.dart ('k') | pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698