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

Unified Diff: runtime/vm/intermediate_language.h

Issue 14682020: Optimize functions containing try-catch. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed Srdjan's comments Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 22436)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -826,6 +826,8 @@
void InheritDeoptTargetAfter(Instruction* other);
+ virtual bool MayThrow() const = 0;
Kevin Millikin (Google) 2013/05/08 11:42:00 There's an extra space after const for some reason
Florian Schneider 2013/05/08 17:10:55 Done.
+
protected:
// Fetch deopt id without checking if this computation can deoptimize.
intptr_t GetDeoptId() const {
@@ -1016,6 +1018,8 @@
virtual void PrintTo(BufferFormatter* f) const;
+ virtual bool MayThrow() const { return false; }
+
private:
GrowableArray<MoveOperands*> moves_; // Elements cannot be null.
@@ -1121,6 +1125,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
virtual EffectSet Dependencies() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
intptr_t try_index() const { return try_index_; }
BitVector* loop_info() const { return loop_info_; }
@@ -1247,6 +1253,8 @@
void AddCatchEntry(CatchBlockEntryInstr* entry) { catch_entries_.Add(entry); }
+ CatchBlockEntryInstr* GetCatchEntry(intptr_t index);
+
virtual void PrepareEntry(FlowGraphCompiler* compiler);
GrowableArray<Definition*>* initial_definitions() {
@@ -1260,12 +1268,24 @@
spill_slot_count_ = count;
}
+ // Number of stack slots reserved for compiling try-catch. For functions
+ // without try-catch, this is 0. Otherwise, it is the number of local
+ // variables.
+ intptr_t fixed_slot_count() const { return fixed_slot_count_; }
+ void set_fixed_slot_count(intptr_t count) {
+ ASSERT(count >= 0);
+ fixed_slot_count_ = count;
+ }
TargetEntryInstr* normal_entry() const { return normal_entry_; }
const ParsedFunction& parsed_function() const {
return parsed_function_;
}
+ const GrowableArray<CatchBlockEntryInstr*>& catch_entries() const {
+ return catch_entries_;
+ }
+
virtual void PrintTo(BufferFormatter* f) const;
private:
@@ -1277,6 +1297,7 @@
GrowableArray<CatchBlockEntryInstr*> catch_entries_;
GrowableArray<Definition*> initial_definitions_;
intptr_t spill_slot_count_;
+ intptr_t fixed_slot_count_; // For try-catch in optimized code.
DISALLOW_COPY_AND_ASSIGN(GraphEntryInstr);
};
@@ -1416,6 +1437,9 @@
intptr_t catch_try_index() const {
return catch_try_index_;
}
+ GrowableArray<Definition*>* initial_definitions() {
+ return &initial_definitions_;
+ }
virtual void PrepareEntry(FlowGraphCompiler* compiler);
@@ -1433,6 +1457,7 @@
BlockEntryInstr* predecessor_;
const Array& catch_handler_types_;
const intptr_t catch_try_index_;
+ GrowableArray<Definition*> initial_definitions_;
DISALLOW_COPY_AND_ASSIGN(CatchBlockEntryInstr);
};
@@ -1661,6 +1686,8 @@
reaching_defs_ = reaching_defs;
}
+ virtual bool MayThrow() const { return false; }
+
private:
// Direct access to inputs_ in order to resize it due to unreachable
// predecessors.
@@ -1681,7 +1708,7 @@
class ParameterInstr : public Definition {
public:
- ParameterInstr(intptr_t index, GraphEntryInstr* block)
+ ParameterInstr(intptr_t index, BlockEntryInstr* block)
: index_(index), block_(block) { }
DECLARE_INSTRUCTION(Parameter)
@@ -1713,11 +1740,13 @@
virtual CompileType ComputeType() const;
+ virtual bool MayThrow() const { return false; }
+
private:
virtual void RawSetInputAt(intptr_t i, Value* value) { UNREACHABLE(); }
const intptr_t index_;
- GraphEntryInstr* block_;
+ BlockEntryInstr* block_;
DISALLOW_COPY_AND_ASSIGN(ParameterInstr);
};
@@ -1762,6 +1791,8 @@
virtual void PrintOperandsTo(BufferFormatter* f) const;
+ virtual bool MayThrow() const { return false; }
+
private:
virtual void RawSetInputAt(intptr_t i, Value* value) {
ASSERT(i == 0);
@@ -1804,6 +1835,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const intptr_t token_pos_;
@@ -1825,6 +1858,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return true; }
+
private:
const intptr_t token_pos_;
@@ -1846,6 +1881,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return true; }
+
private:
const intptr_t token_pos_;
@@ -1895,6 +1932,8 @@
virtual void PrintTo(BufferFormatter* f) const;
+ virtual bool MayThrow() const { return false; }
+
private:
JoinEntryInstr* successor_;
@@ -1989,6 +2028,8 @@
virtual void InheritDeoptTarget(Instruction* other);
+ virtual bool MayThrow() const;
+
private:
virtual void RawSetInputAt(intptr_t i, Value* value);
@@ -2019,6 +2060,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(StoreContextInstr);
};
@@ -2072,6 +2115,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(RedefinitionInstr);
};
@@ -2263,6 +2308,8 @@
return false;
}
+ virtual bool MayThrow() const { return false; }
+
virtual void PrintOperandsTo(BufferFormatter* f) const;
Value* value() const { return inputs_[0]; }
@@ -2321,6 +2368,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const;
+ virtual bool MayThrow() const { return false; }
+
private:
const Object& value_;
@@ -2372,6 +2421,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const;
+ virtual bool MayThrow() const { return true; }
+
private:
const intptr_t token_pos_;
AbstractType& dst_type_;
@@ -2405,6 +2456,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return true; }
+
private:
const intptr_t token_pos_;
@@ -2439,6 +2492,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return true; }
+
private:
const ArgumentDefinitionTestNode& ast_node_;
@@ -2461,6 +2516,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(CurrentContextInstr);
};
@@ -2489,6 +2546,8 @@
virtual EffectSet Effects() const { return EffectSet::All(); }
+ virtual bool MayThrow() const { return true; }
+
private:
const ClosureCallNode& ast_node_;
ZoneGrowableArray<PushArgumentInstr*>* arguments_;
@@ -2551,6 +2610,8 @@
virtual EffectSet Effects() const { return EffectSet::All(); }
+ virtual bool MayThrow() const { return true; }
+
protected:
friend class FlowGraphOptimizer;
void set_ic_data(ICData* value) { ic_data_ = value; }
@@ -2600,6 +2661,8 @@
virtual void PrintOperandsTo(BufferFormatter* f) const;
+ virtual bool MayThrow() const { return true; }
+
private:
InstanceCallInstr* instance_call_;
const ICData& ic_data_;
@@ -2691,6 +2754,11 @@
}
+inline bool BranchInstr::MayThrow() const {
+ return comparison()->MayThrow();
+}
+
+
class StrictCompareInstr : public ComparisonInstr {
public:
StrictCompareInstr(Token::Kind kind, Value* left, Value* right);
@@ -2721,6 +2789,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const;
+ virtual bool MayThrow() const { return false; }
+
private:
// True if the comparison must check for double, Mint or Bigint and
// use value comparison instead.
@@ -2766,6 +2836,10 @@
|| (receiver_class_id() == kSmiCid);
}
+ bool is_checked_strict_equal() const {
+ return HasICData() && ic_data()->AllTargetsHaveSameOwner(kInstanceCid);
+ }
+
virtual void PrintOperandsTo(BufferFormatter* f) const;
virtual bool CanDeoptimize() const {
@@ -2792,6 +2866,10 @@
return IsInlinedNumericComparison() ? EffectSet::None() : EffectSet::All();
}
+ virtual bool MayThrow() const {
+ return !IsInlinedNumericComparison() && !is_checked_strict_equal();
+ }
+
private:
const ICData* ic_data_;
const intptr_t token_pos_;
@@ -2866,6 +2944,8 @@
return IsInlinedNumericComparison() ? EffectSet::None() : EffectSet::All();
}
+ virtual bool MayThrow() const { return !IsInlinedNumericComparison(); }
+
private:
const ICData* ic_data_;
const intptr_t token_pos_;
@@ -2926,6 +3006,8 @@
(if_false_ == other_if_then_else->if_false_);
}
+ virtual bool MayThrow() const { return false; }
+
private:
const Token::Kind kind_;
const intptr_t if_true_;
@@ -2977,6 +3059,8 @@
is_known_list_constructor_ = value;
}
+ virtual bool MayThrow() const { return true; }
+
private:
const intptr_t token_pos_;
const Function& function_;
@@ -3013,6 +3097,11 @@
void mark_last() { is_last_ = true; }
bool is_last() const { return is_last_; }
+ virtual bool MayThrow() const {
+ UNREACHABLE();
+ return false;
+ }
+
private:
const LocalVariable& local_;
bool is_last_;
@@ -3049,6 +3138,11 @@
return EffectSet::None();
}
+ virtual bool MayThrow() const {
+ UNREACHABLE();
+ return false;
+ }
+
private:
const LocalVariable& local_;
bool is_dead_;
@@ -3083,6 +3177,11 @@
virtual EffectSet Effects() const { return EffectSet::All(); }
+ virtual bool MayThrow() const {
+ UNREACHABLE();
+ return true;
+ }
+
private:
const NativeBodyNode& ast_node_;
@@ -3129,6 +3228,8 @@
// are marked as having no side-effects.
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
bool CanValueBeSmi() const {
const intptr_t cid = value()->Type()->ToNullableCid();
@@ -3173,6 +3274,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const;
+ virtual bool MayThrow() const { return false; }
+
private:
const Field& field_;
@@ -3198,6 +3301,7 @@
virtual EffectSet Dependencies() const;
virtual bool AttributesEqual(Instruction* other) const;
+ virtual bool MayThrow() const { return false; }
private:
const Field& field_;
@@ -3228,6 +3332,8 @@
// are marked as having no side-effects.
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
bool CanValueBeSmi() const {
const intptr_t cid = value()->Type()->ToNullableCid();
@@ -3287,6 +3393,8 @@
virtual EffectSet Dependencies() const;
virtual bool AttributesEqual(Instruction* other) const;
+ virtual bool MayThrow() const { return false; }
+
private:
const intptr_t index_scale_;
const intptr_t class_id_;
@@ -3319,6 +3427,8 @@
return other->AsStringFromCharCode()->cid_ == cid_;
}
+ virtual bool MayThrow() const { return false; }
+
private:
const intptr_t cid_;
@@ -3373,6 +3483,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const StoreBarrierType emit_store_barrier_;
const intptr_t index_scale_;
@@ -3398,6 +3510,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(BooleanNegateInstr);
};
@@ -3439,6 +3553,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return true; }
+
private:
const intptr_t token_pos_;
Value* value_;
@@ -3480,6 +3596,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
// If the result of the allocation is not stored into any field, passed
// as an argument or used in a phi then it can't alias with any other
// SSA value.
@@ -3523,6 +3641,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const ConstructorCallNode& ast_node_;
@@ -3560,6 +3680,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const intptr_t token_pos_;
const intptr_t num_elements_;
@@ -3595,6 +3717,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const Function& function_;
ZoneGrowableArray<PushArgumentInstr*>* arguments_;
@@ -3629,6 +3753,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
private:
intptr_t offset_;
@@ -3659,6 +3785,8 @@
}
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(LoadClassIdInstr);
};
@@ -3723,6 +3851,8 @@
virtual EffectSet Dependencies() const;
virtual bool AttributesEqual(Instruction* other) const;
+ virtual bool MayThrow() const { return false; }
+
private:
const intptr_t offset_in_bytes_;
const AbstractType& type_;
@@ -3764,6 +3894,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const intptr_t offset_in_bytes_;
const AbstractType& type_;
@@ -3800,6 +3932,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return true; }
+
private:
const intptr_t token_pos_;
const AbstractTypeArguments& type_arguments_;
@@ -3837,6 +3971,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const intptr_t token_pos_;
const AbstractTypeArguments& type_arguments_;
@@ -3869,6 +4005,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const ConstructorCallNode& ast_node_;
const Class& instantiator_class_;
@@ -3896,6 +4034,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const intptr_t token_pos_;
const intptr_t num_context_variables_;
@@ -3920,6 +4060,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(ChainContextInstr);
};
@@ -3942,6 +4084,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const intptr_t token_pos_;
@@ -3968,6 +4112,8 @@
virtual EffectSet Effects() const { return EffectSet::All(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const LocalVariable& exception_var_;
const LocalVariable& stacktrace_var_;
@@ -4002,6 +4148,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(CheckEitherNonSmiInstr);
};
@@ -4030,6 +4178,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
Definition* Canonicalize(FlowGraphOptimizer* optimizer);
private:
@@ -4060,6 +4210,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(BoxFloat32x4Instr);
};
@@ -4088,6 +4240,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(BoxUint32x4Instr);
};
@@ -4116,6 +4270,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(BoxIntegerInstr);
};
@@ -4147,6 +4303,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
Definition* Canonicalize(FlowGraphOptimizer* optimizer);
private:
@@ -4179,6 +4337,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(UnboxFloat32x4Instr);
};
@@ -4209,6 +4369,8 @@
DECLARE_INSTRUCTION(UnboxUint32x4)
virtual CompileType ComputeType() const;
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(UnboxUint32x4Instr);
};
@@ -4241,6 +4403,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(UnboxIntegerInstr);
};
@@ -4280,6 +4444,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(MathSqrtInstr);
};
@@ -4333,6 +4499,8 @@
return op_kind() == other->AsBinaryDoubleOp()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const Token::Kind op_kind_;
@@ -4386,6 +4554,8 @@
return op_kind() == other->AsBinaryFloat32x4Op()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const Token::Kind op_kind_;
@@ -4441,6 +4611,8 @@
return op_kind() == other->AsFloat32x4Shuffle()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const MethodRecognizer::Kind op_kind_;
@@ -4491,6 +4663,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(Float32x4ConstructorInstr);
};
@@ -4532,6 +4706,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(Float32x4SplatInstr);
};
@@ -4572,6 +4748,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(Float32x4ZeroInstr);
};
@@ -4621,6 +4799,8 @@
return op_kind() == other->AsFloat32x4Comparison()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const MethodRecognizer::Kind op_kind_;
@@ -4672,6 +4852,8 @@
return op_kind() == other->AsFloat32x4MinMax()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const MethodRecognizer::Kind op_kind_;
@@ -4726,6 +4908,8 @@
return op_kind() == other->AsFloat32x4Scale()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const MethodRecognizer::Kind op_kind_;
@@ -4774,6 +4958,8 @@
return op_kind() == other->AsFloat32x4Sqrt()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const MethodRecognizer::Kind op_kind_;
@@ -4822,6 +5008,8 @@
return op_kind() == other->AsFloat32x4ZeroArg()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const MethodRecognizer::Kind op_kind_;
@@ -4870,6 +5058,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(Float32x4ClampInstr);
};
@@ -4922,6 +5112,8 @@
return op_kind() == other->AsFloat32x4With()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const MethodRecognizer::Kind op_kind_;
@@ -4965,6 +5157,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(Float32x4ToUint32x4Instr);
};
@@ -5024,6 +5218,8 @@
return op_kind() == other->AsBinaryMintOp()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const Token::Kind op_kind_;
InstanceCallInstr* instance_call_;
@@ -5080,6 +5276,8 @@
return op_kind() == other->AsShiftMintOp()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const Token::Kind op_kind_;
@@ -5131,6 +5329,8 @@
return op_kind() == other->AsUnaryMintOp()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const Token::Kind op_kind_;
@@ -5189,6 +5389,8 @@
// a power of two.
bool RightIsPowerOfTwoConstant() const;
+ virtual bool MayThrow() const { return false; }
+
private:
const Token::Kind op_kind_;
InstanceCallInstr* instance_call_;
@@ -5228,6 +5430,8 @@
return other->AsUnarySmiOp()->op_kind() == op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const Token::Kind op_kind_;
@@ -5250,6 +5454,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const intptr_t token_pos_;
@@ -5281,6 +5487,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(SmiToDoubleInstr);
};
@@ -5306,6 +5514,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return true; }
+
private:
InstanceCallInstr* instance_call_;
@@ -5338,6 +5548,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(DoubleToSmiInstr);
};
@@ -5380,6 +5592,8 @@
return other->AsDoubleToDouble()->recognized_kind() == recognized_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const MethodRecognizer::Kind recognized_kind_;
@@ -5441,6 +5655,8 @@
return other_invoke->recognized_kind() == recognized_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
virtual void RawSetInputAt(intptr_t i, Value* value) {
(*inputs_)[i] = value;
@@ -5485,6 +5701,8 @@
virtual EffectSet Dependencies() const;
virtual bool AttributesEqual(Instruction* other) const;
+ virtual bool MayThrow() const { return false; }
+
private:
const ICData& unary_checks_;
@@ -5517,6 +5735,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(CheckSmiInstr);
};
@@ -5557,6 +5777,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const;
+ virtual bool MayThrow() const { return false; }
+
private:
intptr_t array_type_;

Powered by Google App Engine
This is Rietveld 408576698