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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart

Issue 74953005: Fix https://code.google.com/p/dart/issues/detail?id=15132, by not doing load elimination on typed a… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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 part of ssa; 5 part of ssa;
6 6
7 abstract class OptimizationPhase { 7 abstract class OptimizationPhase {
8 String get name; 8 String get name;
9 void visitGraph(HGraph graph); 9 void visitGraph(HGraph graph);
10 } 10 }
(...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 if (existing != null) { 1642 if (existing != null) {
1643 instruction.block.rewriteWithBetterUser(instruction, existing); 1643 instruction.block.rewriteWithBetterUser(instruction, existing);
1644 instruction.block.remove(instruction); 1644 instruction.block.remove(instruction);
1645 } else { 1645 } else {
1646 memorySet.registerKeyedValue(receiver, instruction.index, instruction); 1646 memorySet.registerKeyedValue(receiver, instruction.index, instruction);
1647 } 1647 }
1648 } 1648 }
1649 1649
1650 void visitIndexAssign(HIndexAssign instruction) { 1650 void visitIndexAssign(HIndexAssign instruction) {
1651 HInstruction receiver = instruction.receiver.nonCheck(); 1651 HInstruction receiver = instruction.receiver.nonCheck();
1652 JavaScriptBackend backend = compiler.backend;
1653 // Typed arrays may narrow incoming values.
1654 if (backend.couldBeTypedArray(receiver.instructionType)) return;
1652 memorySet.registerKeyedValueUpdate( 1655 memorySet.registerKeyedValueUpdate(
1653 receiver, instruction.index, instruction.value); 1656 receiver, instruction.index, instruction.value);
1654 } 1657 }
1655 } 1658 }
1656 1659
1657 /** 1660 /**
1658 * Holds values of memory places. 1661 * Holds values of memory places.
1659 */ 1662 */
1660 class MemorySet { 1663 class MemorySet {
1661 final Compiler compiler; 1664 final Compiler compiler;
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1880 1883
1881 keyedValues.forEach((receiver, values) { 1884 keyedValues.forEach((receiver, values) {
1882 result.keyedValues[receiver] = 1885 result.keyedValues[receiver] =
1883 new Map<HInstruction, HInstruction>.from(values); 1886 new Map<HInstruction, HInstruction>.from(values);
1884 }); 1887 });
1885 1888
1886 result.nonEscapingReceivers.addAll(nonEscapingReceivers); 1889 result.nonEscapingReceivers.addAll(nonEscapingReceivers);
1887 return result; 1890 return result;
1888 } 1891 }
1889 } 1892 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/js_backend/backend.dart ('k') | tests/lib/typed_data/typed_data_load_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698