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

Side by Side Diff: pkg/compiler/lib/src/ssa/codegen.dart

Issue 2595493002: Merge CoreTypes and CoreClasses into CommonElements. (Closed)
Patch Set: Updated cf. comment 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 import 'dart:math' as math; 5 import 'dart:math' as math;
6 import '../common.dart'; 6 import '../common.dart';
7 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; 7 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem;
8 import '../common/tasks.dart' show CompilerTask; 8 import '../common/tasks.dart' show CompilerTask;
9 import '../compiler.dart' show Compiler; 9 import '../compiler.dart' show Compiler;
10 import '../constants/constant_system.dart'; 10 import '../constants/constant_system.dart';
(...skipping 2848 matching lines...) Expand 10 before | Expand all | Expand 10 after
2859 return; 2859 return;
2860 } 2860 }
2861 2861
2862 assert(node.isCheckedModeCheck || node.isCastTypeCheck); 2862 assert(node.isCheckedModeCheck || node.isCastTypeCheck);
2863 DartType type = node.typeExpression; 2863 DartType type = node.typeExpression;
2864 assert(type.kind != TypeKind.TYPEDEF); 2864 assert(type.kind != TypeKind.TYPEDEF);
2865 if (type.isFunctionType) { 2865 if (type.isFunctionType) {
2866 // TODO(5022): We currently generate $isFunction checks for 2866 // TODO(5022): We currently generate $isFunction checks for
2867 // function types. 2867 // function types.
2868 registry.registerTypeUse( 2868 registry.registerTypeUse(
2869 new TypeUse.isCheck(compiler.coreTypes.functionType)); 2869 new TypeUse.isCheck(compiler.commonElements.functionType));
2870 } 2870 }
2871 registry.registerTypeUse(new TypeUse.isCheck(type)); 2871 registry.registerTypeUse(new TypeUse.isCheck(type));
2872 2872
2873 CheckedModeHelper helper; 2873 CheckedModeHelper helper;
2874 if (node.isBooleanConversionCheck) { 2874 if (node.isBooleanConversionCheck) {
2875 helper = const CheckedModeHelper('boolConversionCheck'); 2875 helper = const CheckedModeHelper('boolConversionCheck');
2876 } else { 2876 } else {
2877 helper = 2877 helper =
2878 backend.getCheckedModeHelper(type, typeCast: node.isCastTypeCheck); 2878 backend.getCheckedModeHelper(type, typeCast: node.isCastTypeCheck);
2879 } 2879 }
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
3098 registry.registerStaticUse(new StaticUse.staticInvoke( 3098 registry.registerStaticUse(new StaticUse.staticInvoke(
3099 helper, new CallStructure.unnamed(argumentCount))); 3099 helper, new CallStructure.unnamed(argumentCount)));
3100 return backend.emitter.staticFunctionAccess(helper); 3100 return backend.emitter.staticFunctionAccess(helper);
3101 } 3101 }
3102 3102
3103 @override 3103 @override
3104 void visitRef(HRef node) { 3104 void visitRef(HRef node) {
3105 visit(node.value); 3105 visit(node.value);
3106 } 3106 }
3107 } 3107 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698