| OLD | NEW |
| 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 import '../common/codegen.dart' show CodegenWorkItem; | 5 import '../common/codegen.dart' show CodegenWorkItem; |
| 6 import '../common/tasks.dart' show CompilerTask; | 6 import '../common/tasks.dart' show CompilerTask; |
| 7 import '../compiler.dart' show Compiler; | 7 import '../compiler.dart' show Compiler; |
| 8 import '../constants/constant_system.dart'; | 8 import '../constants/constant_system.dart'; |
| 9 import '../constants/values.dart'; | 9 import '../constants/values.dart'; |
| 10 import '../core_types.dart' show CoreClasses; | 10 import '../core_types.dart' show CoreClasses; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 // a single use. This protects against exponentially large constant folded | 150 // a single use. This protects against exponentially large constant folded |
| 151 // strings. | 151 // strings. |
| 152 static const MAX_SHARED_CONSTANT_FOLDED_STRING_LENGTH = 512; | 152 static const MAX_SHARED_CONSTANT_FOLDED_STRING_LENGTH = 512; |
| 153 | 153 |
| 154 final String name = "SsaInstructionSimplifier"; | 154 final String name = "SsaInstructionSimplifier"; |
| 155 final JavaScriptBackend backend; | 155 final JavaScriptBackend backend; |
| 156 final ConstantSystem constantSystem; | 156 final ConstantSystem constantSystem; |
| 157 HGraph graph; | 157 HGraph graph; |
| 158 Compiler get compiler => backend.compiler; | 158 Compiler get compiler => backend.compiler; |
| 159 final SsaOptimizerTask optimizer; | 159 final SsaOptimizerTask optimizer; |
| 160 final Set<HInstruction> allocatedFixedLists; | |
| 161 | 160 |
| 162 SsaInstructionSimplifier(this.constantSystem, this.backend, this.optimizer); | 161 SsaInstructionSimplifier(this.constantSystem, this.backend, this.optimizer); |
| 163 | 162 |
| 164 CoreClasses get coreClasses => compiler.coreClasses; | 163 CoreClasses get coreClasses => compiler.coreClasses; |
| 165 | 164 |
| 166 BackendHelpers get helpers => backend.helpers; | 165 BackendHelpers get helpers => backend.helpers; |
| 167 | 166 |
| 168 void visitGraph(HGraph visitee) { | 167 void visitGraph(HGraph visitee) { |
| 169 graph = visitee; | 168 graph = visitee; |
| 170 visitDominatorTree(visitee); | 169 visitDominatorTree(visitee); |
| (...skipping 2410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2581 | 2580 |
| 2582 keyedValues.forEach((receiver, values) { | 2581 keyedValues.forEach((receiver, values) { |
| 2583 result.keyedValues[receiver] = | 2582 result.keyedValues[receiver] = |
| 2584 new Map<HInstruction, HInstruction>.from(values); | 2583 new Map<HInstruction, HInstruction>.from(values); |
| 2585 }); | 2584 }); |
| 2586 | 2585 |
| 2587 result.nonEscapingReceivers.addAll(nonEscapingReceivers); | 2586 result.nonEscapingReceivers.addAll(nonEscapingReceivers); |
| 2588 return result; | 2587 return result; |
| 2589 } | 2588 } |
| 2590 } | 2589 } |
| OLD | NEW |