| Index: runtime/vm/intermediate_language.h
|
| diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
|
| index ccb0b2def5266170f6e7ddce541763bb2937540c..5402e9a23069c7b738c389cfdef8cdd3788ef049 100644
|
| --- a/runtime/vm/intermediate_language.h
|
| +++ b/runtime/vm/intermediate_language.h
|
| @@ -1607,7 +1607,7 @@ class RangeBoundary : public ValueObject {
|
| static RangeBoundary Max(RangeBoundary a, RangeBoundary b);
|
|
|
| bool Overflowed() const {
|
| - return !Smi::IsValid(value());
|
| + return IsConstant() && !Smi::IsValid(value());
|
| }
|
|
|
| RangeBoundary Clamp() const {
|
| @@ -2367,7 +2367,8 @@ class StaticCallInstr : public TemplateDefinition<0> {
|
| function_(function),
|
| argument_names_(argument_names),
|
| arguments_(arguments),
|
| - result_cid_(kDynamicCid) {
|
| + result_cid_(kDynamicCid),
|
| + is_known_constructor_(false) {
|
| ASSERT(function.IsZoneHandle());
|
| ASSERT(argument_names.IsZoneHandle());
|
| }
|
| @@ -2394,6 +2395,11 @@ class StaticCallInstr : public TemplateDefinition<0> {
|
| virtual intptr_t ResultCid() const { return result_cid_; }
|
| void set_result_cid(intptr_t value) { result_cid_ = value; }
|
|
|
| + bool is_known_constructor() const { return is_known_constructor_; }
|
| + void set_is_known_constructor(bool is_known_constructor) {
|
| + is_known_constructor_ = is_known_constructor;
|
| + }
|
| +
|
| private:
|
| const intptr_t token_pos_;
|
| const Function& function_;
|
| @@ -2401,6 +2407,10 @@ class StaticCallInstr : public TemplateDefinition<0> {
|
| ZoneGrowableArray<PushArgumentInstr*>* arguments_;
|
| intptr_t result_cid_; // For some library functions we know the result.
|
|
|
| + // Some library constructors have known semantics.
|
| + bool is_known_constructor_;
|
| +
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(StaticCallInstr);
|
| };
|
|
|
| @@ -3956,7 +3966,7 @@ class CheckArrayBoundInstr : public TemplateInstruction<2> {
|
|
|
| intptr_t array_type() const { return array_type_; }
|
|
|
| - bool IsRedundant();
|
| + bool IsRedundant(RangeBoundary length);
|
|
|
| private:
|
| intptr_t array_type_;
|
|
|