Home | History | Annotate | Download | only in wasm

Lines Matching refs:Control

48 // as well as the current effect and control dependency in the TF graph.
49 // It maintains a control state that tracks whether the environment
50 // is reachable, has reached a control end, or has been merged.
55 TFNode* control;
63 control = nullptr;
102 // An entry on the control stack (i.e. if, block, loop).
103 struct Control {
110 int32_t previous_catch; // The previous Control (on the stack) with a catch.
113 // Values merged into the end of this control construct.
122 static Control Block(const byte* pc, size_t stack_depth, SsaEnv* end_env,
128 static Control If(const byte* pc, size_t stack_depth, SsaEnv* end_env,
134 static Control Loop(const byte* pc, size_t stack_depth, SsaEnv* end_env,
140 static Control Try(const byte* pc, size_t stack_depth, SsaEnv* end_env,
340 ZoneVector<Control>& control) {
341 if (operand.depth < control.size()) {
342 operand.target = &control[control.size() - operand.depth - 1];
551 // Generate a better error message whether the unterminated control
554 error(pc_, control_.back().pc, "unterminated control structure");
607 ZoneVector<Control> control_; // stack of blocks, loops, and ifs.
642 ssa_env->control = start;
700 Control* c = &control_.back();
745 // TODO(titzer): Throw should end control, but currently we build a
773 Control* c = &control_.back();
824 false_env->control = if_false;
826 true_env->control = if_true;
838 Control* c = &control_.back();
860 Control* c = &control_.back();
899 // If at the last (implicit) control, check we are at end.
928 ssa_env_->control = merge;
950 BUILD(BranchNoHint, cond.node, &tenv->control, &fenv->control);
982 ssa_env_->control = (i == operand.table_count)
988 Control* c = &control_[control_.size() - target - 1];
1018 // br_table ends the control flow like br.
1275 Control* c = &control_[i];
1349 void SetBlockType(Control* c, BlockTypeOperand& operand) {
1385 Control::Block(pc_, stack_.size(), end_env, current_catch_));
1390 Control::Loop(pc_, stack_.size(), end_env, current_catch_));
1395 Control::If(pc_, stack_.size(), end_env, false_env, current_catch_));
1399 control_.emplace_back(Control::Try(pc_, stack_.size(), end_env, zone_,
1539 void PushEndValues(Control* c) {
1577 // Popping past the current control start in reachable code.
1596 Control* c = &control_[control_.size() - depth - 1];
1615 void FallThruTo(Control* c) {
1629 inline Value& GetMergeValueFromStack(Control* c, size_t i) {
1633 void TypeCheckFallThru(Control* c) {
1657 void MergeValuesInto(Control* c) {
1676 first ? val.node : CreateOrMergeIntoPhi(old.type, target->control,
1704 if (env && env->control) {
1705 PrintF(", control = ");
1706 compiler::WasmGraphBuilder::PrintDebugName(env->control);
1713 builder_->set_control_ptr(&env->control);
1736 success_env->control = if_success;
1739 exception_env->control = if_exception;
1749 CreateOrMergeIntoPhi(kWasmI32, try_info->catch_env->control,
1764 to->control = from->control;
1771 // Merge control.
1772 TFNode* controls[] = {to->control, from->control};
1774 to->control = merge;
1793 TFNode* merge = to->control;
1795 builder_->AppendToMerge(merge, from->control);
1853 env->control = builder_->Loop(env->control);
1854 env->effect = builder_->EffectPhi(1, &env->effect, env->control);
1855 builder_->Terminate(env->effect, env->control);
1865 env->control);
1869 &(loop_body_env->control));
1877 builder_->Phi(local_type_vec_[i], 1, &env->locals[i], env->control);
1882 &(loop_body_env->control));
1891 result->control = from->control;
1915 result->control = from->control;
1925 result->control = nullptr;