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

Side by Side Diff: lib/compiler/implementation/ssa/codegen.dart

Issue 10913133: Allow closures inside lazy initializers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | tests/language/language_dart2js.status » ('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) 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 class SsaCodeGeneratorTask extends CompilerTask { 5 class SsaCodeGeneratorTask extends CompilerTask {
6 6
7 final JavaScriptBackend backend; 7 final JavaScriptBackend backend;
8 8
9 SsaCodeGeneratorTask(JavaScriptBackend backend) 9 SsaCodeGeneratorTask(JavaScriptBackend backend)
10 : this.backend = backend, 10 : this.backend = backend,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } else { 71 } else {
72 backend.registerReturnType(work.element, HType.NULL); 72 backend.registerReturnType(work.element, HType.NULL);
73 } 73 }
74 }); 74 });
75 compiler.tracer.traceGraph("codegen", graph); 75 compiler.tracer.traceGraph("codegen", graph);
76 Map<Element, String> parameterNames = getParameterNames(work); 76 Map<Element, String> parameterNames = getParameterNames(work);
77 // Use [work.element] to ensure that the parameter element come from 77 // Use [work.element] to ensure that the parameter element come from
78 // the declaration. 78 // the declaration.
79 FunctionElement function = work.element; 79 FunctionElement function = work.element;
80 function.computeSignature(compiler).forEachParameter((element) { 80 function.computeSignature(compiler).forEachParameter((element) {
81 compiler.enqueuer.codegen.addToWorkList(element); 81 compiler.enqueuer.codegen.addToWorkList(element, work.resolutionTree);
82 }); 82 });
83 List<js.Parameter> parameters = <js.Parameter>[]; 83 List<js.Parameter> parameters = <js.Parameter>[];
84 parameterNames.forEach((element, name) { 84 parameterNames.forEach((element, name) {
85 parameters.add(new js.Parameter(name)); 85 parameters.add(new js.Parameter(name));
86 }); 86 });
87 addTypeParameters(work.element, parameters, parameterNames); 87 addTypeParameters(work.element, parameters, parameterNames);
88 String parametersString = Strings.join(parameterNames.getValues(), ", "); 88 String parametersString = Strings.join(parameterNames.getValues(), ", ");
89 SsaOptimizedCodeGenerator codegen = new SsaOptimizedCodeGenerator( 89 SsaOptimizedCodeGenerator codegen = new SsaOptimizedCodeGenerator(
90 backend, work, parameters, parameterNames); 90 backend, work, parameters, parameterNames);
91 codegen.visitGraph(graph); 91 codegen.visitGraph(graph);
(...skipping 2891 matching lines...) Expand 10 before | Expand all | Expand 10 after
2983 if (leftType.canBeNull() && rightType.canBeNull()) { 2983 if (leftType.canBeNull() && rightType.canBeNull()) {
2984 if (left.isConstantNull() || right.isConstantNull() || 2984 if (left.isConstantNull() || right.isConstantNull() ||
2985 (leftType.isPrimitive() && leftType == rightType)) { 2985 (leftType.isPrimitive() && leftType == rightType)) {
2986 return '=='; 2986 return '==';
2987 } 2987 }
2988 return null; 2988 return null;
2989 } else { 2989 } else {
2990 return '==='; 2990 return '===';
2991 } 2991 }
2992 } 2992 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698