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

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

Issue 2688413003: Extract BackendUsage, MirrorsData, and CheckedModeHelpers from Backend. (Closed)
Patch Set: Cleanup Created 3 years, 10 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) 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 2871 matching lines...) Expand 10 before | Expand all | Expand 10 after
2882 // function types. 2882 // function types.
2883 registry.registerTypeUse( 2883 registry.registerTypeUse(
2884 new TypeUse.isCheck(compiler.commonElements.functionType)); 2884 new TypeUse.isCheck(compiler.commonElements.functionType));
2885 } 2885 }
2886 registry.registerTypeUse(new TypeUse.isCheck(type)); 2886 registry.registerTypeUse(new TypeUse.isCheck(type));
2887 2887
2888 CheckedModeHelper helper; 2888 CheckedModeHelper helper;
2889 if (node.isBooleanConversionCheck) { 2889 if (node.isBooleanConversionCheck) {
2890 helper = const CheckedModeHelper('boolConversionCheck'); 2890 helper = const CheckedModeHelper('boolConversionCheck');
2891 } else { 2891 } else {
2892 helper = 2892 helper = backend.checkedModeHelpers
2893 backend.getCheckedModeHelper(type, typeCast: node.isCastTypeCheck); 2893 .getCheckedModeHelper(type, typeCast: node.isCastTypeCheck);
2894 } 2894 }
2895 2895
2896 if (helper == null) { 2896 if (helper == null) {
2897 assert(type.isFunctionType); 2897 assert(type.isFunctionType);
2898 assert(node.usesMethodOnType); 2898 assert(node.usesMethodOnType);
2899 2899
2900 String name = node.isCastTypeCheck ? '_asCheck' : '_assertCheck'; 2900 String name = node.isCastTypeCheck ? '_asCheck' : '_assertCheck';
2901 HInstruction reifiedType = node.inputs[0]; 2901 HInstruction reifiedType = node.inputs[0];
2902 HInstruction checkedInput = node.inputs[1]; 2902 HInstruction checkedInput = node.inputs[1];
2903 use(reifiedType); 2903 use(reifiedType);
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
3116 registry.registerStaticUse(new StaticUse.staticInvoke( 3116 registry.registerStaticUse(new StaticUse.staticInvoke(
3117 helper, new CallStructure.unnamed(argumentCount))); 3117 helper, new CallStructure.unnamed(argumentCount)));
3118 return backend.emitter.staticFunctionAccess(helper); 3118 return backend.emitter.staticFunctionAccess(helper);
3119 } 3119 }
3120 3120
3121 @override 3121 @override
3122 void visitRef(HRef node) { 3122 void visitRef(HRef node) {
3123 visit(node.value); 3123 visit(node.value);
3124 } 3124 }
3125 } 3125 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | tests/compiler/dart2js/deferred_mirrors_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698