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

Side by Side Diff: pkg/compiler/lib/src/ssa/nodes.dart

Issue 2431103003: Don't gvn HForeignCode without source text (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import '../closure.dart'; 5 import '../closure.dart';
6 import '../common.dart'; 6 import '../common.dart';
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 '../dart_types.dart'; 10 import '../dart_types.dart';
(...skipping 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 } 1933 }
1934 1934
1935 bool onlyThrowsNSM() => throwBehavior.isOnlyNullNSMGuard; 1935 bool onlyThrowsNSM() => throwBehavior.isOnlyNullNSMGuard;
1936 1936
1937 bool get isAllocation => 1937 bool get isAllocation =>
1938 nativeBehavior != null && nativeBehavior.isAllocation && !canBeNull(); 1938 nativeBehavior != null && nativeBehavior.isAllocation && !canBeNull();
1939 1939
1940 int typeCode() => HInstruction.FOREIGN_CODE_TYPECODE; 1940 int typeCode() => HInstruction.FOREIGN_CODE_TYPECODE;
1941 bool typeEquals(other) => other is HForeignCode; 1941 bool typeEquals(other) => other is HForeignCode;
1942 bool dataEquals(HForeignCode other) { 1942 bool dataEquals(HForeignCode other) {
1943 return codeTemplate.source == other.codeTemplate.source; 1943 return codeTemplate.source != null &&
1944 codeTemplate.source == other.codeTemplate.source;
1944 } 1945 }
1945 1946
1946 String toString() => 'HForeignCode("${codeTemplate.source}", $inputs)'; 1947 String toString() => 'HForeignCode("${codeTemplate.source}")';
1947 } 1948 }
1948 1949
1949 abstract class HInvokeBinary extends HInstruction { 1950 abstract class HInvokeBinary extends HInstruction {
1950 final Selector selector; 1951 final Selector selector;
1951 HInvokeBinary( 1952 HInvokeBinary(
1952 HInstruction left, HInstruction right, this.selector, TypeMask type) 1953 HInstruction left, HInstruction right, this.selector, TypeMask type)
1953 : super(<HInstruction>[left, right], type) { 1954 : super(<HInstruction>[left, right], type) {
1954 sideEffects.clearAllSideEffects(); 1955 sideEffects.clearAllSideEffects();
1955 sideEffects.clearAllDependencies(); 1956 sideEffects.clearAllDependencies();
1956 setUseGvn(); 1957 setUseGvn();
(...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after
3470 class HDynamicType extends HRuntimeType { 3471 class HDynamicType extends HRuntimeType {
3471 HDynamicType(DynamicType dartType, TypeMask instructionType) 3472 HDynamicType(DynamicType dartType, TypeMask instructionType)
3472 : super(const <HInstruction>[], dartType, instructionType); 3473 : super(const <HInstruction>[], dartType, instructionType);
3473 3474
3474 accept(HVisitor visitor) => visitor.visitDynamicType(this); 3475 accept(HVisitor visitor) => visitor.visitDynamicType(this);
3475 3476
3476 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; 3477 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE;
3477 3478
3478 bool typeEquals(HInstruction other) => other is HDynamicType; 3479 bool typeEquals(HInstruction other) => other is HDynamicType;
3479 } 3480 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698