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

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

Issue 10332070: Call 'use' instead of 'visit' on the input when generating code for an unchecked HTypeConversion. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 7 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 | « no previous file | dart/tests/language/type_guard_conversion_test.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) 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 SsaCodeGeneratorTask(Compiler compiler) : super(compiler); 6 SsaCodeGeneratorTask(Compiler compiler) : super(compiler);
7 String get name() => 'SSA code generator'; 7 String get name() => 'SSA code generator';
8 8
9 9
10 String buildJavaScriptFunction(FunctionElement element, 10 String buildJavaScriptFunction(FunctionElement element,
(...skipping 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 } 2184 }
2185 Element helperElement = compiler.findHelper(helper); 2185 Element helperElement = compiler.findHelper(helper);
2186 compiler.registerStaticUse(helperElement); 2186 compiler.registerStaticUse(helperElement);
2187 buffer.add(compiler.namer.isolateAccess(helperElement)); 2187 buffer.add(compiler.namer.isolateAccess(helperElement));
2188 buffer.add('('); 2188 buffer.add('(');
2189 use(node.checkedInput, JSPrecedence.EXPRESSION_PRECEDENCE); 2189 use(node.checkedInput, JSPrecedence.EXPRESSION_PRECEDENCE);
2190 if (additionalArgument !== null) buffer.add(", '$additionalArgument'"); 2190 if (additionalArgument !== null) buffer.add(", '$additionalArgument'");
2191 buffer.add(')'); 2191 buffer.add(')');
2192 endExpression(JSPrecedence.CALL_PRECEDENCE); 2192 endExpression(JSPrecedence.CALL_PRECEDENCE);
2193 } else { 2193 } else {
2194 visit(node.checkedInput, expectedPrecedence); 2194 use(node.checkedInput, expectedPrecedence);
Lasse Reichstein Nielsen 2012/05/10 08:16:55 I think we are getting to the point where "visit"
ngeoffray 2012/05/10 08:19:38 Agree.
2195 } 2195 }
2196 } 2196 }
2197 } 2197 }
2198 2198
2199 class SsaOptimizedCodeGenerator extends SsaCodeGenerator { 2199 class SsaOptimizedCodeGenerator extends SsaCodeGenerator {
2200 SsaOptimizedCodeGenerator(compiler, work, parameters, parameterNames) 2200 SsaOptimizedCodeGenerator(compiler, work, parameters, parameterNames)
2201 : super(compiler, work, parameters, parameterNames); 2201 : super(compiler, work, parameters, parameterNames);
2202 2202
2203 void beginGraph(HGraph graph) {} 2203 void beginGraph(HGraph graph) {}
2204 void endGraph(HGraph graph) {} 2204 void endGraph(HGraph graph) {}
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
2593 startBailoutSwitch(); 2593 startBailoutSwitch();
2594 } 2594 }
2595 } 2595 }
2596 2596
2597 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { 2597 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) {
2598 if (labeledBlockInfo.body.start.hasGuards()) { 2598 if (labeledBlockInfo.body.start.hasGuards()) {
2599 endBailoutSwitch(); 2599 endBailoutSwitch();
2600 } 2600 }
2601 } 2601 }
2602 } 2602 }
OLDNEW
« no previous file with comments | « no previous file | dart/tests/language/type_guard_conversion_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698