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

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: rebased 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
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 22613)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -827,6 +827,8 @@
void InheritDeoptTargetAfter(Instruction* other);
+ virtual bool MayThrow() const = 0;
+
protected:
// Fetch deopt id without checking if this computation can deoptimize.
intptr_t GetDeoptId() const {
@@ -1017,6 +1019,8 @@
virtual void PrintTo(BufferFormatter* f) const;
+ virtual bool MayThrow() const { return false; }
+
private:
GrowableArray<MoveOperands*> moves_; // Elements cannot be null.
@@ -1122,8 +1126,15 @@
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_; }
+ // True for blocks inside a try { } region.
+ bool InsideTryBlock() const {
+ return try_index_ != CatchClauseNode::kInvalidTryIndex;
+ }
+
BitVector* loop_info() const { return loop_info_; }
void set_loop_info(BitVector* loop_info) {
loop_info_ = loop_info;
@@ -1248,6 +1259,8 @@
void AddCatchEntry(CatchBlockEntryInstr* entry) { catch_entries_.Add(entry); }
+ CatchBlockEntryInstr* GetCatchEntry(intptr_t index);
+
virtual void PrepareEntry(FlowGraphCompiler* compiler);
GrowableArray<Definition*>* initial_definitions() {
@@ -1261,12 +1274,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:
@@ -1278,6 +1303,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);
};
@@ -1417,6 +1443,9 @@
intptr_t catch_try_index() const {
return catch_try_index_;
}
+ GrowableArray<Definition*>* initial_definitions() {
+ return &initial_definitions_;
+ }
virtual void PrepareEntry(FlowGraphCompiler* compiler);
@@ -1434,6 +1463,7 @@
BlockEntryInstr* predecessor_;
const Array& catch_handler_types_;
const intptr_t catch_try_index_;
+ GrowableArray<Definition*> initial_definitions_;
DISALLOW_COPY_AND_ASSIGN(CatchBlockEntryInstr);
};
@@ -1662,6 +1692,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.
@@ -1682,7 +1714,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)
@@ -1714,11 +1746,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);
};
@@ -1763,6 +1797,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);
@@ -1805,6 +1841,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const intptr_t token_pos_;
@@ -1826,6 +1864,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return true; }
+
private:
const intptr_t token_pos_;
@@ -1847,6 +1887,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return true; }
+
private:
const intptr_t token_pos_;
@@ -1896,6 +1938,8 @@
virtual void PrintTo(BufferFormatter* f) const;
+ virtual bool MayThrow() const { return false; }
+
private:
JoinEntryInstr* successor_;
@@ -1990,6 +2034,8 @@
virtual void InheritDeoptTarget(Instruction* other);
+ virtual bool MayThrow() const;
+
private:
virtual void RawSetInputAt(intptr_t i, Value* value);
@@ -2020,6 +2066,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(StoreContextInstr);
};
@@ -2073,6 +2121,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);
};
@@ -2264,6 +2314,8 @@
return false;
}
+ virtual bool MayThrow() const { return false; }
+
virtual void PrintOperandsTo(BufferFormatter* f) const;
Value* value() const { return inputs_[0]; }
@@ -2322,6 +2374,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const;
+ virtual bool MayThrow() const { return false; }
+
private:
const Object& value_;
@@ -2373,6 +2427,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_;
@@ -2406,6 +2462,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_;
@@ -2440,6 +2498,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return true; }
+
private:
const ArgumentDefinitionTestNode& ast_node_;
@@ -2462,6 +2522,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);
};
@@ -2490,6 +2552,8 @@
virtual EffectSet Effects() const { return EffectSet::All(); }
+ virtual bool MayThrow() const { return true; }
+
private:
const ClosureCallNode& ast_node_;
ZoneGrowableArray<PushArgumentInstr*>* arguments_;
@@ -2552,6 +2616,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; }
@@ -2601,6 +2667,8 @@
virtual void PrintOperandsTo(BufferFormatter* f) const;
+ virtual bool MayThrow() const { return true; }
+
private:
InstanceCallInstr* instance_call_;
const ICData& ic_data_;
@@ -2692,6 +2760,11 @@
}
+inline bool BranchInstr::MayThrow() const {
+ return comparison()->MayThrow();
+}
+
+
class StrictCompareInstr : public ComparisonInstr {
public:
StrictCompareInstr(Token::Kind kind, Value* left, Value* right);
@@ -2722,6 +2795,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.
@@ -2767,6 +2842,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 {
@@ -2793,6 +2872,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_;
@@ -2867,6 +2950,8 @@
return IsInlinedNumericComparison() ? EffectSet::None() : EffectSet::All();
}
+ virtual bool MayThrow() const { return !IsInlinedNumericComparison(); }
+
private:
const ICData* ic_data_;
const intptr_t token_pos_;
@@ -2927,6 +3012,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_;
@@ -2978,6 +3065,8 @@
is_known_list_constructor_ = value;
}
+ virtual bool MayThrow() const { return true; }
+
private:
const intptr_t token_pos_;
const Function& function_;
@@ -3014,6 +3103,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_;
@@ -3050,6 +3144,11 @@
return EffectSet::None();
}
+ virtual bool MayThrow() const {
+ UNREACHABLE();
+ return false;
+ }
+
private:
const LocalVariable& local_;
bool is_dead_;
@@ -3084,6 +3183,11 @@
virtual EffectSet Effects() const { return EffectSet::All(); }
+ virtual bool MayThrow() const {
+ UNREACHABLE();
+ return true;
+ }
+
private:
const NativeBodyNode& ast_node_;
@@ -3130,6 +3234,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();
@@ -3174,6 +3280,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const;
+ virtual bool MayThrow() const { return false; }
+
private:
const Field& field_;
@@ -3199,6 +3307,7 @@
virtual EffectSet Dependencies() const;
virtual bool AttributesEqual(Instruction* other) const;
+ virtual bool MayThrow() const { return false; }
private:
const Field& field_;
@@ -3229,6 +3338,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();
@@ -3288,6 +3399,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_;
@@ -3320,6 +3433,8 @@
return other->AsStringFromCharCode()->cid_ == cid_;
}
+ virtual bool MayThrow() const { return false; }
+
private:
const intptr_t cid_;
@@ -3374,6 +3489,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_;
@@ -3399,6 +3516,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(BooleanNegateInstr);
};
@@ -3440,6 +3559,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return true; }
+
private:
const intptr_t token_pos_;
Value* value_;
@@ -3481,6 +3602,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.
@@ -3549,6 +3672,8 @@
Location* locations() { return locations_; }
void set_locations(Location* locations) { locations_ = locations; }
+ virtual bool MayThrow() const { return false; }
+
private:
virtual void RawSetInputAt(intptr_t i, Value* value) {
(*values_)[i] = value;
@@ -3584,6 +3709,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const ConstructorCallNode& ast_node_;
@@ -3621,6 +3748,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_;
@@ -3656,6 +3785,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const Function& function_;
ZoneGrowableArray<PushArgumentInstr*>* arguments_;
@@ -3690,6 +3821,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_;
@@ -3720,6 +3853,8 @@
}
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(LoadClassIdInstr);
};
@@ -3784,6 +3919,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_;
@@ -3825,6 +3962,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const intptr_t offset_in_bytes_;
const AbstractType& type_;
@@ -3861,6 +4000,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return true; }
+
private:
const intptr_t token_pos_;
const AbstractTypeArguments& type_arguments_;
@@ -3898,6 +4039,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const intptr_t token_pos_;
const AbstractTypeArguments& type_arguments_;
@@ -3930,6 +4073,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const ConstructorCallNode& ast_node_;
const Class& instantiator_class_;
@@ -3957,6 +4102,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_;
@@ -3981,6 +4128,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(ChainContextInstr);
};
@@ -4003,6 +4152,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const intptr_t token_pos_;
@@ -4029,6 +4180,8 @@
virtual EffectSet Effects() const { return EffectSet::All(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const LocalVariable& exception_var_;
const LocalVariable& stacktrace_var_;
@@ -4063,6 +4216,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);
};
@@ -4091,6 +4246,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
Definition* Canonicalize(FlowGraph* flow_graph);
private:
@@ -4121,6 +4278,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);
};
@@ -4149,6 +4308,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);
};
@@ -4177,6 +4338,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);
};
@@ -4208,6 +4371,8 @@
virtual EffectSet Dependencies() const { return EffectSet::None(); }
virtual bool AttributesEqual(Instruction* other) const { return true; }
+ virtual bool MayThrow() const { return false; }
+
Definition* Canonicalize(FlowGraph* flow_graph);
private:
@@ -4240,6 +4405,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);
};
@@ -4270,6 +4437,8 @@
DECLARE_INSTRUCTION(UnboxUint32x4)
virtual CompileType ComputeType() const;
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(UnboxUint32x4Instr);
};
@@ -4302,6 +4471,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);
};
@@ -4341,6 +4512,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);
};
@@ -4394,6 +4567,8 @@
return op_kind() == other->AsBinaryDoubleOp()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const Token::Kind op_kind_;
@@ -4447,6 +4622,8 @@
return op_kind() == other->AsBinaryFloat32x4Op()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const Token::Kind op_kind_;
@@ -4502,6 +4679,8 @@
return op_kind() == other->AsFloat32x4Shuffle()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const MethodRecognizer::Kind op_kind_;
@@ -4552,6 +4731,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);
};
@@ -4593,6 +4774,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);
};
@@ -4633,6 +4816,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);
};
@@ -4682,6 +4867,8 @@
return op_kind() == other->AsFloat32x4Comparison()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const MethodRecognizer::Kind op_kind_;
@@ -4733,6 +4920,8 @@
return op_kind() == other->AsFloat32x4MinMax()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const MethodRecognizer::Kind op_kind_;
@@ -4787,6 +4976,8 @@
return op_kind() == other->AsFloat32x4Scale()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const MethodRecognizer::Kind op_kind_;
@@ -4835,6 +5026,8 @@
return op_kind() == other->AsFloat32x4Sqrt()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const MethodRecognizer::Kind op_kind_;
@@ -4883,6 +5076,8 @@
return op_kind() == other->AsFloat32x4ZeroArg()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const MethodRecognizer::Kind op_kind_;
@@ -4931,6 +5126,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);
};
@@ -4983,6 +5180,8 @@
return op_kind() == other->AsFloat32x4With()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const MethodRecognizer::Kind op_kind_;
@@ -5026,6 +5225,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);
};
@@ -5085,6 +5286,8 @@
return op_kind() == other->AsBinaryMintOp()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const Token::Kind op_kind_;
InstanceCallInstr* instance_call_;
@@ -5141,6 +5344,8 @@
return op_kind() == other->AsShiftMintOp()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const Token::Kind op_kind_;
@@ -5192,6 +5397,8 @@
return op_kind() == other->AsUnaryMintOp()->op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const Token::Kind op_kind_;
@@ -5250,6 +5457,8 @@
// a power of two.
bool RightIsPowerOfTwoConstant() const;
+ virtual bool MayThrow() const { return false; }
+
private:
const Token::Kind op_kind_;
InstanceCallInstr* instance_call_;
@@ -5289,6 +5498,8 @@
return other->AsUnarySmiOp()->op_kind() == op_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const Token::Kind op_kind_;
@@ -5311,6 +5522,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
const intptr_t token_pos_;
@@ -5342,6 +5555,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);
};
@@ -5367,6 +5582,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return true; }
+
private:
InstanceCallInstr* instance_call_;
@@ -5399,6 +5616,8 @@
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual bool MayThrow() const { return false; }
+
private:
DISALLOW_COPY_AND_ASSIGN(DoubleToSmiInstr);
};
@@ -5441,6 +5660,8 @@
return other->AsDoubleToDouble()->recognized_kind() == recognized_kind();
}
+ virtual bool MayThrow() const { return false; }
+
private:
const MethodRecognizer::Kind recognized_kind_;
@@ -5502,6 +5723,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;
@@ -5546,6 +5769,8 @@
virtual EffectSet Dependencies() const;
virtual bool AttributesEqual(Instruction* other) const;
+ virtual bool MayThrow() const { return false; }
+
private:
const ICData& unary_checks_;
@@ -5578,6 +5803,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);
};
@@ -5618,6 +5845,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_;
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698