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 CodegenRegistry, CodegenWorkItem; | 5 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
6 import '../common/names.dart' show Selectors; | 6 import '../common/names.dart' show Selectors; |
7 import '../common/tasks.dart' show CompilerTask; | 7 import '../common/tasks.dart' show CompilerTask; |
8 import '../compiler.dart' show Compiler; | 8 import '../compiler.dart' show Compiler; |
9 import '../constants/constant_system.dart'; | 9 import '../constants/constant_system.dart'; |
10 import '../constants/values.dart'; | 10 import '../constants/values.dart'; |
(...skipping 2299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2310 void visitFieldSet(HFieldSet instruction) { | 2310 void visitFieldSet(HFieldSet instruction) { |
2311 HInstruction receiver = instruction.getDartReceiver(closedWorld).nonCheck(); | 2311 HInstruction receiver = instruction.getDartReceiver(closedWorld).nonCheck(); |
2312 memorySet.registerFieldValueUpdate( | 2312 memorySet.registerFieldValueUpdate( |
2313 instruction.element, receiver, instruction.inputs.last); | 2313 instruction.element, receiver, instruction.inputs.last); |
2314 } | 2314 } |
2315 | 2315 |
2316 void visitCreate(HCreate instruction) { | 2316 void visitCreate(HCreate instruction) { |
2317 memorySet.registerAllocation(instruction); | 2317 memorySet.registerAllocation(instruction); |
2318 if (shouldTrackInitialValues(instruction)) { | 2318 if (shouldTrackInitialValues(instruction)) { |
2319 int argumentIndex = 0; | 2319 int argumentIndex = 0; |
2320 compiler.codegenWorld.forEachInstanceField(instruction.element, | 2320 compiler.codegenWorldBuilder.forEachInstanceField(instruction.element, |
2321 (_, FieldEntity member) { | 2321 (_, FieldEntity member) { |
2322 if (compiler.elementHasCompileTimeError(member as Entity)) return; | 2322 if (compiler.elementHasCompileTimeError(member as Entity)) return; |
2323 memorySet.registerFieldValue( | 2323 memorySet.registerFieldValue( |
2324 member, instruction, instruction.inputs[argumentIndex++]); | 2324 member, instruction, instruction.inputs[argumentIndex++]); |
2325 }); | 2325 }); |
2326 } | 2326 } |
2327 // In case this instruction has as input non-escaping objects, we | 2327 // In case this instruction has as input non-escaping objects, we |
2328 // need to mark these objects as escaping. | 2328 // need to mark these objects as escaping. |
2329 memorySet.killAffectedBy(instruction); | 2329 memorySet.killAffectedBy(instruction); |
2330 } | 2330 } |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2754 | 2754 |
2755 keyedValues.forEach((receiver, values) { | 2755 keyedValues.forEach((receiver, values) { |
2756 result.keyedValues[receiver] = | 2756 result.keyedValues[receiver] = |
2757 new Map<HInstruction, HInstruction>.from(values); | 2757 new Map<HInstruction, HInstruction>.from(values); |
2758 }); | 2758 }); |
2759 | 2759 |
2760 result.nonEscapingReceivers.addAll(nonEscapingReceivers); | 2760 result.nonEscapingReceivers.addAll(nonEscapingReceivers); |
2761 return result; | 2761 return result; |
2762 } | 2762 } |
2763 } | 2763 } |
OLD | NEW |