| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 interface HVisitor<R> { | 5 interface HVisitor<R> { |
| 6 R visitAdd(HAdd node); | 6 R visitAdd(HAdd node); |
| 7 R visitBailoutTarget(HBailoutTarget node); | 7 R visitBailoutTarget(HBailoutTarget node); |
| 8 R visitBitAnd(HBitAnd node); | 8 R visitBitAnd(HBitAnd node); |
| 9 R visitBitNot(HBitNot node); | 9 R visitBitNot(HBitNot node); |
| 10 R visitBitOr(HBitOr node); | 10 R visitBitOr(HBitOr node); |
| (...skipping 1925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1936 class HThrow extends HControlFlow { | 1936 class HThrow extends HControlFlow { |
| 1937 final bool isRethrow; | 1937 final bool isRethrow; |
| 1938 HThrow(value, [this.isRethrow = false]) : super(<HInstruction>[value]); | 1938 HThrow(value, [this.isRethrow = false]) : super(<HInstruction>[value]); |
| 1939 toString() => 'throw'; | 1939 toString() => 'throw'; |
| 1940 accept(HVisitor visitor) => visitor.visitThrow(this); | 1940 accept(HVisitor visitor) => visitor.visitThrow(this); |
| 1941 } | 1941 } |
| 1942 | 1942 |
| 1943 class HStatic extends HInstruction { | 1943 class HStatic extends HInstruction { |
| 1944 Element element; | 1944 Element element; |
| 1945 HStatic(this.element) : super(<HInstruction>[]) { | 1945 HStatic(this.element) : super(<HInstruction>[]) { |
| 1946 tryGenerateAtUseSite(); | 1946 if (!element.isAssignable()) { |
| 1947 tryGenerateAtUseSite(); |
| 1948 } |
| 1947 } | 1949 } |
| 1950 |
| 1948 void prepareGvn() { | 1951 void prepareGvn() { |
| 1949 assert(!hasSideEffects()); | 1952 assert(!hasSideEffects()); |
| 1950 if (!element.isAssignable()) { | 1953 if (!element.isAssignable()) { |
| 1951 setUseGvn(); | 1954 setUseGvn(); |
| 1952 } | 1955 } |
| 1953 } | 1956 } |
| 1954 toString() => 'static ${element.name}'; | 1957 toString() => 'static ${element.name}'; |
| 1955 accept(HVisitor visitor) => visitor.visitStatic(this); | 1958 accept(HVisitor visitor) => visitor.visitStatic(this); |
| 1956 | 1959 |
| 1957 int gvnHashCode() => super.gvnHashCode() ^ element.hashCode(); | 1960 int gvnHashCode() => super.gvnHashCode() ^ element.hashCode(); |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2117 class HIfBlockInformation { | 2120 class HIfBlockInformation { |
| 2118 final HIf branch; | 2121 final HIf branch; |
| 2119 final SubGraph thenGraph; | 2122 final SubGraph thenGraph; |
| 2120 final SubGraph elseGraph; | 2123 final SubGraph elseGraph; |
| 2121 final HBasicBlock joinBlock; | 2124 final HBasicBlock joinBlock; |
| 2122 HIfBlockInformation(this.branch, | 2125 HIfBlockInformation(this.branch, |
| 2123 this.thenGraph, | 2126 this.thenGraph, |
| 2124 this.elseGraph, | 2127 this.elseGraph, |
| 2125 this.joinBlock); | 2128 this.joinBlock); |
| 2126 } | 2129 } |
| OLD | NEW |