| Index: pkg/compiler/lib/src/ssa/nodes.dart
|
| diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart
|
| index 64e12387c5807762a746cc6b90d910d7876e28bf..1b06943251b20d45cd1608838019d5e6c55dcd0b 100644
|
| --- a/pkg/compiler/lib/src/ssa/nodes.dart
|
| +++ b/pkg/compiler/lib/src/ssa/nodes.dart
|
| @@ -873,6 +873,8 @@ abstract class HInstruction implements Spannable {
|
| static const int TYPE_INFO_READ_VARIABLE_TYPECODE = 39;
|
| static const int TYPE_INFO_EXPRESSION_TYPECODE = 40;
|
|
|
| + static const int FOREIGN_CODE_TYPECODE = 41;
|
| +
|
| HInstruction(this.inputs, this.instructionType)
|
| : id = idCounter++,
|
| usedBy = <HInstruction>[] {
|
| @@ -1901,6 +1903,9 @@ class HForeignCode extends HForeign {
|
| assert(this.throwBehavior != null);
|
|
|
| if (effects != null) sideEffects.add(effects);
|
| + if (nativeBehavior != null && nativeBehavior.useGvn) {
|
| + setUseGvn();
|
| + }
|
| }
|
|
|
| HForeignCode.statement(js.Template codeTemplate, List<HInstruction> inputs,
|
| @@ -1927,7 +1932,13 @@ class HForeignCode extends HForeign {
|
| bool get isAllocation =>
|
| nativeBehavior != null && nativeBehavior.isAllocation && !canBeNull();
|
|
|
| - String toString() => 'HForeignCode("${codeTemplate.source}",$inputs)';
|
| + int typeCode() => HInstruction.FOREIGN_CODE_TYPECODE;
|
| + bool typeEquals(other) => other is HForeignCode;
|
| + bool dataEquals(HForeignCode other) {
|
| + return codeTemplate.source == other.codeTemplate.source;
|
| + }
|
| +
|
| + String toString() => 'HForeignCode("${codeTemplate.source}", $inputs)';
|
| }
|
|
|
| abstract class HInvokeBinary extends HInstruction {
|
|
|