Index: runtime/vm/flow_graph_optimizer.h |
=================================================================== |
--- runtime/vm/flow_graph_optimizer.h (revision 36573) |
+++ runtime/vm/flow_graph_optimizer.h (working copy) |
@@ -71,6 +71,7 @@ |
private: |
// Attempt to build ICData for call using propagated class-ids. |
bool TryCreateICData(InstanceCallInstr* call); |
+ const ICData& TrySpecializeICData(const ICData& ic_data, intptr_t cid); |
void SpecializePolymorphicInstanceCall(PolymorphicInstanceCallInstr* call); |
@@ -126,6 +127,8 @@ |
bool TryReplaceInstanceCallWithInline(InstanceCallInstr* call); |
+ LoadFieldInstr* BuildLoadStringLength(Definition* str); |
+ |
Definition* PrepareInlineStringIndexOp(Instruction* call, |
intptr_t cid, |
Definition* str, |
@@ -243,6 +246,8 @@ |
Representation rep, intptr_t cid); |
bool TryStringLengthOneEquality(InstanceCallInstr* call, Token::Kind op_kind); |
+ Isolate* isolate() const { return flow_graph_->isolate(); } |
+ |
FlowGraph* flow_graph_; |
DISALLOW_COPY_AND_ASSIGN(FlowGraphOptimizer); |
@@ -358,6 +363,8 @@ |
FOR_EACH_INSTRUCTION(DECLARE_VISIT) |
#undef DECLARE_VISIT |
+ Isolate* isolate() const { return graph_->isolate(); } |
+ |
FlowGraph* graph_; |
// Sentinels for unknown constant and non-constant values. |
@@ -389,7 +396,8 @@ |
// Replace a target entry instruction with a join entry instruction. Does |
// not update the original target's predecessors to point to the new block |
// and does not replace the target in already computed block order lists. |
- static JoinEntryInstr* ToJoinEntry(TargetEntryInstr* target); |
+ static JoinEntryInstr* ToJoinEntry(Isolate* isolate, |
+ TargetEntryInstr* target); |
private: |
// Match an instance of the pattern to rewrite. See the implementation |
@@ -398,7 +406,8 @@ |
// Duplicate a branch while replacing its comparison's left and right |
// inputs. |
- static BranchInstr* CloneBranch(BranchInstr* branch, |
+ static BranchInstr* CloneBranch(Isolate* isolate, |
+ BranchInstr* branch, |
Value* new_left, |
Value* new_right); |
}; |
@@ -432,6 +441,8 @@ |
const Class& cls, |
const ZoneGrowableArray<const Object*>& fields); |
+ Isolate* isolate() const { return flow_graph_->isolate(); } |
+ |
FlowGraph* flow_graph_; |
GrowableArray<MaterializeObjectInstr*> materializations_; |