mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:39:49 +00:00
Don't gvn HForeignCode without source text
There are a few synthetic templates that are generated from trees instead of source text. I don't think any are marked for GVN, but this is a hazard so best fix it. TBR=sigmund@google.com BUG= Review URL: https://codereview.chromium.org/2431103003 .
This commit is contained in:
parent
b3f66b03a1
commit
3b5c154138
|
@ -1940,10 +1940,11 @@ class HForeignCode extends HForeign {
|
|||
int typeCode() => HInstruction.FOREIGN_CODE_TYPECODE;
|
||||
bool typeEquals(other) => other is HForeignCode;
|
||||
bool dataEquals(HForeignCode other) {
|
||||
return codeTemplate.source == other.codeTemplate.source;
|
||||
return codeTemplate.source != null &&
|
||||
codeTemplate.source == other.codeTemplate.source;
|
||||
}
|
||||
|
||||
String toString() => 'HForeignCode("${codeTemplate.source}", $inputs)';
|
||||
String toString() => 'HForeignCode("${codeTemplate.source}")';
|
||||
}
|
||||
|
||||
abstract class HInvokeBinary extends HInstruction {
|
||||
|
|
Loading…
Reference in a new issue