| Index: runtime/vm/intermediate_language.h
|
| diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
|
| index 0ad33b9360707ec51415dd88719e5aad11b9d250..2285325310dcff82bb501c9e546584a7f26ea715 100644
|
| --- a/runtime/vm/intermediate_language.h
|
| +++ b/runtime/vm/intermediate_language.h
|
| @@ -23,6 +23,7 @@ class ControlInstruction;
|
| class Definition;
|
| class Environment;
|
| class FlowGraph;
|
| +class FlowGraphBuilder;
|
| class FlowGraphCompiler;
|
| class FlowGraphVisitor;
|
| class Instruction;
|
| @@ -868,7 +869,7 @@ FOR_EACH_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
|
| private:
|
| friend class Definition; // Needed for InsertBefore, InsertAfter.
|
|
|
| - // Classes that set deopt_id_.
|
| + // Classes that set or read deopt_id_.
|
| friend class UnboxIntegerInstr;
|
| friend class UnboxDoubleInstr;
|
| friend class UnboxFloat32x4Instr;
|
| @@ -921,6 +922,7 @@ FOR_EACH_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
|
| friend class SmiToDoubleInstr;
|
| friend class DoubleToIntegerInstr;
|
| friend class BranchSimplifier;
|
| + friend class BlockEntryInstr;
|
|
|
| virtual void RawSetInputAt(intptr_t i, Value* value) = 0;
|
|
|
| @@ -1143,6 +1145,13 @@ class BlockEntryInstr : public Instruction {
|
| intptr_t variable_count,
|
| intptr_t fixed_parameter_count);
|
|
|
| + // Perform a depth first search to prune code not reachable from an OSR
|
| + // entry point.
|
| + bool PruneUnreachable(FlowGraphBuilder* builder,
|
| + GraphEntryInstr* graph_entry,
|
| + intptr_t osr_id,
|
| + BitVector* block_marks);
|
| +
|
| virtual intptr_t InputCount() const { return 0; }
|
| virtual Value* InputAt(intptr_t i) const {
|
| UNREACHABLE();
|
| @@ -1281,7 +1290,8 @@ class BackwardInstructionIterator : public ValueObject {
|
| class GraphEntryInstr : public BlockEntryInstr {
|
| public:
|
| GraphEntryInstr(const ParsedFunction& parsed_function,
|
| - TargetEntryInstr* normal_entry);
|
| + TargetEntryInstr* normal_entry,
|
| + intptr_t osr_id);
|
|
|
| DECLARE_INSTRUCTION(GraphEntry)
|
|
|
| @@ -1302,6 +1312,8 @@ class GraphEntryInstr : public BlockEntryInstr {
|
| }
|
| ConstantInstr* constant_null();
|
|
|
| + bool IsCompiledForOsr() const { return osr_id_ != Isolate::kNoDeoptId; }
|
| +
|
| intptr_t spill_slot_count() const { return spill_slot_count_; }
|
| void set_spill_slot_count(intptr_t count) {
|
| ASSERT(count >= 0);
|
| @@ -1336,6 +1348,7 @@ class GraphEntryInstr : public BlockEntryInstr {
|
| TargetEntryInstr* normal_entry_;
|
| GrowableArray<CatchBlockEntryInstr*> catch_entries_;
|
| GrowableArray<Definition*> initial_definitions_;
|
| + const intptr_t osr_id_;
|
| intptr_t spill_slot_count_;
|
| intptr_t fixed_slot_count_; // For try-catch in optimized code.
|
|
|
| @@ -5907,10 +5920,11 @@ class UnarySmiOpInstr : public TemplateDefinition<1> {
|
|
|
| class CheckStackOverflowInstr : public TemplateInstruction<0> {
|
| public:
|
| - explicit CheckStackOverflowInstr(intptr_t token_pos)
|
| - : token_pos_(token_pos) {}
|
| + CheckStackOverflowInstr(intptr_t token_pos, bool in_loop)
|
| + : token_pos_(token_pos), in_loop_(in_loop) {}
|
|
|
| intptr_t token_pos() const { return token_pos_; }
|
| + bool in_loop() const { return in_loop_; }
|
|
|
| DECLARE_INSTRUCTION(CheckStackOverflow)
|
|
|
| @@ -5922,8 +5936,11 @@ class CheckStackOverflowInstr : public TemplateInstruction<0> {
|
|
|
| virtual bool MayThrow() const { return false; }
|
|
|
| + virtual void PrintOperandsTo(BufferFormatter* f) const;
|
| +
|
| private:
|
| const intptr_t token_pos_;
|
| + const bool in_loop_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(CheckStackOverflowInstr);
|
| };
|
|
|