Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::kernel::BreakableBlock Class Reference

#include <kernel_to_il.h>

Public Member Functions

 BreakableBlock (FlowGraphBuilder *builder)
 
 ~BreakableBlock ()
 
bool HadJumper ()
 
JoinEntryInstrdestination ()
 
JoinEntryInstrBreakDestination (intptr_t label_index, TryFinallyBlock **outer_finally, intptr_t *context_depth)
 

Detailed Description

Definition at line 833 of file kernel_to_il.h.

Constructor & Destructor Documentation

◆ BreakableBlock()

dart::kernel::BreakableBlock::BreakableBlock ( FlowGraphBuilder builder)
inlineexplicit

Definition at line 835 of file kernel_to_il.h.

836 : builder_(builder),
837 outer_(builder->breakable_block_),
838 destination_(nullptr),
839 outer_finally_(builder->try_finally_block_),
840 context_depth_(builder->context_depth_),
841 try_index_(builder->CurrentTryIndex()) {
842 if (builder_->breakable_block_ == nullptr) {
843 index_ = 0;
844 } else {
845 index_ = builder_->breakable_block_->index_ + 1;
846 }
847 builder_->breakable_block_ = this;
848 }

◆ ~BreakableBlock()

dart::kernel::BreakableBlock::~BreakableBlock ( )
inline

Definition at line 849 of file kernel_to_il.h.

849{ builder_->breakable_block_ = outer_; }

Member Function Documentation

◆ BreakDestination()

JoinEntryInstr * dart::kernel::BreakableBlock::BreakDestination ( intptr_t  label_index,
TryFinallyBlock **  outer_finally,
intptr_t *  context_depth 
)
inline

Definition at line 855 of file kernel_to_il.h.

857 {
858 // Verify consistency of program state.
859 ASSERT(builder_->breakable_block_ == this);
860 // Find corresponding destination.
861 BreakableBlock* block = this;
862 while (block->index_ != label_index) {
863 block = block->outer_;
864 ASSERT(block != nullptr);
865 }
866 *outer_finally = block->outer_finally_;
867 *context_depth = block->context_depth_;
868 return block->EnsureDestination();
869 }
BreakableBlock(FlowGraphBuilder *builder)
Definition: kernel_to_il.h:835
#define ASSERT(E)

◆ destination()

JoinEntryInstr * dart::kernel::BreakableBlock::destination ( )
inline

Definition at line 853 of file kernel_to_il.h.

853{ return destination_; }

◆ HadJumper()

bool dart::kernel::BreakableBlock::HadJumper ( )
inline

Definition at line 851 of file kernel_to_il.h.

851{ return destination_ != nullptr; }

The documentation for this class was generated from the following file: