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

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

Issue 10876008: Remove most superfluous getter arguments from dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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 BailoutInfo { 5 class BailoutInfo {
6 int instructionId; 6 int instructionId;
7 int bailoutId; 7 int bailoutId;
8 BailoutInfo(this.instructionId, this.bailoutId); 8 BailoutInfo(this.instructionId, this.bailoutId);
9 } 9 }
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 instruction = instruction.next; 99 instruction = instruction.next;
100 } 100 }
101 } 101 }
102 102
103 // Primitive types that are not null are valuable. These include 103 // Primitive types that are not null are valuable. These include
104 // indexable arrays. 104 // indexable arrays.
105 bool typeValuable(HType type) { 105 bool typeValuable(HType type) {
106 return type.isPrimitive() && !type.isNull(); 106 return type.isPrimitive() && !type.isNull();
107 } 107 }
108 108
109 bool get hasTypeGuards() => work.guards.length != 0; 109 bool get hasTypeGuards => work.guards.length != 0;
110 110
111 bool typeGuardWouldBeValuable(HInstruction instruction, 111 bool typeGuardWouldBeValuable(HInstruction instruction,
112 HType speculativeType) { 112 HType speculativeType) {
113 // If the type itself is not valuable, do not generate a guard for it. 113 // If the type itself is not valuable, do not generate a guard for it.
114 if (!typeValuable(speculativeType)) return false; 114 if (!typeValuable(speculativeType)) return false;
115 115
116 // Do not insert a type guard if the instruction has a type 116 // Do not insert a type guard if the instruction has a type
117 // annotation that disagrees with the speculated type. 117 // annotation that disagrees with the speculated type.
118 Element source = instruction.sourceElement; 118 Element source = instruction.sourceElement;
119 if (source !== null) { 119 if (source !== null) {
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 hasComplexBailoutTargets = true; 537 hasComplexBailoutTargets = true;
538 } 538 }
539 } else { 539 } else {
540 hasComplexBailoutTargets = true; 540 hasComplexBailoutTargets = true;
541 blocks.forEach((HBasicBlock block) { 541 blocks.forEach((HBasicBlock block) {
542 block.bailoutTargets.add(target); 542 block.bailoutTargets.add(target);
543 }); 543 });
544 } 544 }
545 } 545 }
546 } 546 }
OLDNEW
« no previous file with comments | « dart/lib/compiler/implementation/source_file.dart ('k') | dart/lib/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698