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

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

Issue 1383503002: Add Resolution and Parsing interfaces for computeType, ensureResolved and parseNode. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Add TODOs. Created 5 years, 2 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
« no previous file with comments | « pkg/compiler/lib/src/native/native.dart ('k') | pkg/compiler/lib/src/parser/parser_task.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 part of native; 5 part of native;
6 6
7 final RegExp nativeRedirectionRegExp = new RegExp(r'^[a-zA-Z][a-zA-Z_$0-9]*$'); 7 final RegExp nativeRedirectionRegExp = new RegExp(r'^[a-zA-Z][a-zA-Z_$0-9]*$');
8 8
9 void handleSsaNative(SsaBuilder builder, Expression nativeBody) { 9 void handleSsaNative(SsaBuilder builder, Expression nativeBody) {
10 Compiler compiler = builder.compiler; 10 Compiler compiler = builder.compiler;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 FunctionSignature parameters = element.functionSignature; 53 FunctionSignature parameters = element.functionSignature;
54 if (!hasBody) { 54 if (!hasBody) {
55 List<String> arguments = <String>[]; 55 List<String> arguments = <String>[];
56 List<HInstruction> inputs = <HInstruction>[]; 56 List<HInstruction> inputs = <HInstruction>[];
57 String receiver = ''; 57 String receiver = '';
58 if (element.isInstanceMember) { 58 if (element.isInstanceMember) {
59 receiver = '#.'; 59 receiver = '#.';
60 inputs.add(builder.localsHandler.readThis()); 60 inputs.add(builder.localsHandler.readThis());
61 } 61 }
62 parameters.forEachParameter((ParameterElement parameter) { 62 parameters.forEachParameter((ParameterElement parameter) {
63 DartType type = parameter.type.unalias(compiler); 63 DartType type = parameter.type.unalias(compiler.resolution);
64 HInstruction input = builder.localsHandler.readLocal(parameter); 64 HInstruction input = builder.localsHandler.readLocal(parameter);
65 if (type is FunctionType) { 65 if (type is FunctionType) {
66 // The parameter type is a function type either directly or through 66 // The parameter type is a function type either directly or through
67 // typedef(s). 67 // typedef(s).
68 input = convertDartClosure(parameter, type); 68 input = convertDartClosure(parameter, type);
69 } 69 }
70 inputs.add(input); 70 inputs.add(input);
71 arguments.add('#'); 71 arguments.add('#');
72 }); 72 });
73 73
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 LiteralString jsCode = nativeBody.asLiteralString(); 105 LiteralString jsCode = nativeBody.asLiteralString();
106 builder.push(new HForeignCode.statement( 106 builder.push(new HForeignCode.statement(
107 js.js.statementTemplateYielding( 107 js.js.statementTemplateYielding(
108 new js.LiteralStatement(jsCode.dartString.slowToString())), 108 new js.LiteralStatement(jsCode.dartString.slowToString())),
109 <HInstruction>[], 109 <HInstruction>[],
110 new SideEffects(), 110 new SideEffects(),
111 null, 111 null,
112 backend.dynamicType)); 112 backend.dynamicType));
113 } 113 }
114 } 114 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/native/native.dart ('k') | pkg/compiler/lib/src/parser/parser_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698