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

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

Issue 2941033002: Finish strong mode cleaning of dart2js. (Closed)
Patch Set: Created 3 years, 6 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 '../common.dart'; 5 import '../common.dart';
6 import '../constants/values.dart'; 6 import '../constants/values.dart';
7 import '../elements/resolution_types.dart'; 7 import '../elements/resolution_types.dart';
8 import '../elements/elements.dart'; 8 import '../elements/elements.dart';
9 import '../js/js.dart' as js; 9 import '../js/js.dart' as js;
10 import '../js_emitter/js_emitter.dart' show NativeEmitter; 10 import '../js_emitter/js_emitter.dart' show NativeEmitter;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 FunctionSignature parameters = element.functionSignature; 61 FunctionSignature parameters = element.functionSignature;
62 if (!hasBody) { 62 if (!hasBody) {
63 List<String> arguments = <String>[]; 63 List<String> arguments = <String>[];
64 List<HInstruction> inputs = <HInstruction>[]; 64 List<HInstruction> inputs = <HInstruction>[];
65 String receiver = ''; 65 String receiver = '';
66 if (element.isInstanceMember) { 66 if (element.isInstanceMember) {
67 receiver = '#.'; 67 receiver = '#.';
68 inputs.add(builder.localsHandler.readThis()); 68 inputs.add(builder.localsHandler.readThis());
69 } 69 }
70 parameters.forEachParameter((ParameterElement parameter) { 70 parameters.forEachParameter((_parameter) {
71 ParameterElement parameter = _parameter;
71 ResolutionDartType type = parameter.type.unaliased; 72 ResolutionDartType type = parameter.type.unaliased;
72 HInstruction input = builder.localsHandler.readLocal(parameter); 73 HInstruction input = builder.localsHandler.readLocal(parameter);
73 if (type is ResolutionFunctionType) { 74 if (type is ResolutionFunctionType) {
74 // The parameter type is a function type either directly or through 75 // The parameter type is a function type either directly or through
75 // typedef(s). 76 // typedef(s).
76 input = convertDartClosure(parameter, type); 77 input = convertDartClosure(parameter, type);
77 } 78 }
78 inputs.add(input); 79 inputs.add(input);
79 arguments.add('#'); 80 arguments.add('#');
80 }); 81 });
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 LiteralString jsCode = nativeBody.asLiteralString(); 115 LiteralString jsCode = nativeBody.asLiteralString();
115 builder.push(new HForeignCode.statement( 116 builder.push(new HForeignCode.statement(
116 js.js.statementTemplateYielding( 117 js.js.statementTemplateYielding(
117 new js.LiteralStatement(jsCode.dartString.slowToString())), 118 new js.LiteralStatement(jsCode.dartString.slowToString())),
118 <HInstruction>[], 119 <HInstruction>[],
119 new SideEffects(), 120 new SideEffects(),
120 null, 121 null,
121 builder.commonMasks.dynamicType)); 122 builder.commonMasks.dynamicType));
122 } 123 }
123 } 124 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698