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

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

Issue 10440087: Compute liveness of instructions to get better and fewer variable names. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
« no previous file with comments | « frog/tests/leg/type_inference_test.dart ('k') | lib/compiler/implementation/ssa/codegen.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 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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 Type type = cls.computeType(builder.compiler); 431 Type type = cls.computeType(builder.compiler);
432 cachedTypeOfThis = new HBoundedType.nonNull(type); 432 cachedTypeOfThis = new HBoundedType.nonNull(type);
433 } 433 }
434 res.guaranteedType = cachedTypeOfThis; 434 res.guaranteedType = cachedTypeOfThis;
435 } 435 }
436 return res; 436 return res;
437 } 437 }
438 438
439 HParameterValue getActivationParameter(Element element) { 439 HParameterValue getActivationParameter(Element element) {
440 // If the element is a parameter, we already have a 440 // If the element is a parameter, we already have a
441 // HParameterValue for it. 441 // HParameterValue for it. We cannot create another one because
442 // it could then have another name than the real parameter. And
443 // the other one would not not it is just a copy of the real
444 // parameter.
442 if (element.isParameter()) return directLocals[element]; 445 if (element.isParameter()) return directLocals[element];
443 446
444 return builder.activationVariables.putIfAbsent(element, () { 447 return builder.activationVariables.putIfAbsent(element, () {
445 HParameterValue parameter = new HParameterValue(element); 448 HParameterValue parameter = new HParameterValue(element);
446 builder.graph.entry.addAtExit(parameter); 449 builder.graph.entry.addAtExit(parameter);
447 return parameter; 450 return parameter;
448 }); 451 });
449 } 452 }
450 453
451 /** 454 /**
(...skipping 2950 matching lines...) Expand 10 before | Expand all | Expand 10 after
3402 <HInstruction>[target, input], 3405 <HInstruction>[target, input],
3403 HType.STRING)); 3406 HType.STRING));
3404 return builder.pop(); 3407 return builder.pop();
3405 } 3408 }
3406 3409
3407 HInstruction result(Node node) { 3410 HInstruction result(Node node) {
3408 flushLiterals(node); 3411 flushLiterals(node);
3409 return prefix; 3412 return prefix;
3410 } 3413 }
3411 } 3414 }
OLDNEW
« no previous file with comments | « frog/tests/leg/type_inference_test.dart ('k') | lib/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698