Index: runtime/vm/intermediate_language.h |
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h |
index 7ee32da5ebee6dbcae21f98ca4f9df6fd311b470..f5cb877e7eae6ba3bdb44dc4654fa06e16aa24d9 100644 |
--- a/runtime/vm/intermediate_language.h |
+++ b/runtime/vm/intermediate_language.h |
@@ -158,6 +158,13 @@ class CompileType : public ValueObject { |
return (cid_ == kIllegalCid) && (type_ == NULL); |
} |
+ bool IsInt() { |
+ return !is_nullable() && |
+ ((ToCid() == kSmiCid) || |
+ (ToCid() == kMintCid) || |
+ ((type_ != NULL) && (type_->Equals(Type::Handle(Type::IntType()))))); |
+ } |
+ |
void PrintTo(BufferFormatter* f) const; |
const char* ToCString() const; |
@@ -4679,6 +4686,8 @@ class UnboxUint32Instr : public UnboxInteger32Instr { |
&& (value()->Type()->ToCid() != kMintCid); |
} |
+ virtual void InferRange(RangeAnalysis* analysis, Range* range); |
+ |
DECLARE_INSTRUCTION_NO_BACKEND(UnboxUint32) |
private: |
@@ -7524,6 +7533,11 @@ class UnboxedIntConverterInstr : public TemplateDefinition<1, NoThrow> { |
virtual void PrintOperandsTo(BufferFormatter* f) const; |
+ virtual CompileType ComputeType() const { |
+ // TODO(vegorov) use range information to improve type. |
+ return CompileType::Int(); |
+ } |
+ |
DECLARE_INSTRUCTION(UnboxedIntConverter); |
private: |