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

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

Issue 10534109: Use simple loop tracking instead of size to determine if (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add comment. Created 8 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 | Annotate | Revision Log
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 Interceptors { 5 class Interceptors {
6 Compiler compiler; 6 Compiler compiler;
7 Interceptors(Compiler this.compiler); 7 Interceptors(Compiler this.compiler);
8 8
9 SourceString mapOperatorToMethodName(Operator op) { 9 SourceString mapOperatorToMethodName(Operator op) {
10 String name = op.source.stringValue; 10 String name = op.source.stringValue;
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 graph = compileConstructor(builder, work); 159 graph = compileConstructor(builder, work);
160 break; 160 break;
161 case ElementKind.GENERATIVE_CONSTRUCTOR_BODY: 161 case ElementKind.GENERATIVE_CONSTRUCTOR_BODY:
162 case ElementKind.FUNCTION: 162 case ElementKind.FUNCTION:
163 case ElementKind.GETTER: 163 case ElementKind.GETTER:
164 case ElementKind.SETTER: 164 case ElementKind.SETTER:
165 graph = builder.buildMethod(work.element); 165 graph = builder.buildMethod(work.element);
166 break; 166 break;
167 } 167 }
168 assert(graph.isValid()); 168 assert(graph.isValid());
169 graph.calledInLoop = element.calledInLoop;
169 if (compiler.tracer.enabled) { 170 if (compiler.tracer.enabled) {
170 String name; 171 String name;
171 if (element.enclosingElement !== null && 172 if (element.enclosingElement !== null &&
172 element.enclosingElement.kind == ElementKind.CLASS) { 173 element.enclosingElement.kind == ElementKind.CLASS) {
173 String className = element.enclosingElement.name.slowToString(); 174 String className = element.enclosingElement.name.slowToString();
174 String memberName = element.name.slowToString(); 175 String memberName = element.name.slowToString();
175 name = "$className.$memberName"; 176 name = "$className.$memberName";
176 if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY) { 177 if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY) {
177 name = "$name (body)"; 178 name = "$name (body)";
178 } 179 }
(...skipping 3263 matching lines...) Expand 10 before | Expand all | Expand 10 after
3442 void visitNodeList(NodeList node) { 3443 void visitNodeList(NodeList node) {
3443 node.visitChildren(this); 3444 node.visitChildren(this);
3444 } 3445 }
3445 3446
3446 HInstruction concat(HInstruction left, HInstruction right) { 3447 HInstruction concat(HInstruction left, HInstruction right) {
3447 HInstruction instruction = new HStringConcat(left, right, node); 3448 HInstruction instruction = new HStringConcat(left, right, node);
3448 builder.add(instruction); 3449 builder.add(instruction);
3449 return instruction; 3450 return instruction;
3450 } 3451 }
3451 } 3452 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698