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

Unified Diff: lib/compiler/implementation/ssa/nodes.dart

Issue 10544174: Revert "Reapply change to GVN all HFieldGet instructions." (Closed) Base URL: https://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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/optimize.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/nodes.dart
diff --git a/lib/compiler/implementation/ssa/nodes.dart b/lib/compiler/implementation/ssa/nodes.dart
index 697964c1cd9a395176aaaa02d80cb16850f8b394..0d6bb70f794abbcb31a2ea8f7c1da901b83f25c2 100644
--- a/lib/compiler/implementation/ssa/nodes.dart
+++ b/lib/compiler/implementation/ssa/nodes.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -740,9 +740,6 @@ class HInstruction implements Hashable {
void setAllSideEffects() { flags |= ((1 << FLAG_CHANGES_COUNT) - 1); }
void clearAllSideEffects() { flags &= ~((1 << FLAG_CHANGES_COUNT) - 1); }
- bool dependsOnSomething() => getFlag(FLAG_DEPENDS_ON_SOMETHING);
- void setDependsOnSomething() { setFlag(FLAG_DEPENDS_ON_SOMETHING); }
-
bool useGvn() => getFlag(FLAG_USE_GVN);
void setUseGvn() { setFlag(FLAG_USE_GVN); }
// Does this node potentially affect control flow.
@@ -1079,9 +1076,6 @@ class HConditionalBranch extends HControlFlow {
class HControlFlow extends HInstruction {
HControlFlow(inputs) : super(inputs);
abstract toString();
- void prepareGvn() {
- clearAllSideEffects();
- }
bool isControlFlow() => true;
bool isStatement() => true;
}
@@ -1267,9 +1261,12 @@ class HFieldGet extends HFieldAccess {
accept(HVisitor visitor) => visitor.visitFieldGet(this);
void prepareGvn() {
- clearAllSideEffects();
- setUseGvn();
- if (!isFinalOrConst) setDependsOnSomething();
+ if (isFinalOrConst) {
+ assert(!hasSideEffects());
+ setUseGvn();
+ } else {
+ clearAllSideEffects();
+ }
}
int typeCode() => 27;
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/optimize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698