Lines Matching full:delegate
96 // For each BLOCK|LOOP|TRY, the corresponding END_(BLOCK|LOOP|TRY) or DELEGATE
99 // For each END_(BLOCK|LOOP|TRY) or DELEGATE, the corresponding
120 // Before running rewriteDepthImmediates function, 'delegate' has a BB as its
122 // used for the operand when 'delegate' needs to rethrow to the caller. This
225 // When 'End' is not an 'end_try' but 'delegate, EHPad is nullptr.
712 // We started from an EH pad, so the end marker cannot be a delegate in removeUnnecessaryInstrs()
713 assert(EndTry->getOpcode() != WebAssembly::DELEGATE); in removeUnnecessaryInstrs()
759 if (EndTry->getOpcode() == WebAssembly::DELEGATE) in removeUnnecessaryInstrs()
844 // Wrap the given range of instruction with try-delegate. RangeBegin and
876 // Create a BB to insert the 'delegate' instruction. in addTryDelegate()
878 // If the destination of 'delegate' is not the caller, adds the destination to in addTryDelegate()
886 // delegate BB after the current BB. in addTryDelegate()
892 // put the 'delegate' BB in between. We normally create a split BB and make in addTryDelegate()
911 // BB into two and insert the delegate BB in between. in addTryDelegate()
921 // delegate in addTryDelegate()
941 // delegate in addTryDelegate()
960 // Add 'delegate' instruction in the delegate BB created above. in addTryDelegate()
961 MachineInstr *Delegate = BuildMI(DelegateBB, RangeEnd->getDebugLoc(), in addTryDelegate() local
962 TII.get(WebAssembly::DELEGATE)) in addTryDelegate()
964 registerTryScope(Try, Delegate, nullptr); in addTryDelegate()
971 // We use the 'delegate' instruction to fix the unwind mismatches. 'delegate' in fixCallUnwindMismatches()
973 // only 'catch' but all block-like structures including another 'delegate', in fixCallUnwindMismatches()
975 // 'catch', it will delegate the exception to that catch. It is being in fixCallUnwindMismatches()
976 // discussed how to define the semantics when 'delegate''s target is a non-try in fixCallUnwindMismatches()
979 // such code. The example below illustrates where the 'delegate' instruction in fixCallUnwindMismatches()
980 // in the middle will delegate the exception to, depending on the value of N. in fixCallUnwindMismatches()
987 // delegate N ;; Where will this delegate to? in fixCallUnwindMismatches()
991 // delegate ;; N == 2 in fixCallUnwindMismatches()
1026 // call with an inner try-delegate that rethrows the exception to the right in fixCallUnwindMismatches()
1034 // delegate 1 (bb3) ;; (new) in fixCallUnwindMismatches()
1066 // case 'delegate's immediate argument is the number of block depths + 1, in fixCallUnwindMismatches()
1072 // delegate 1 (caller) ;; (new) in fixCallUnwindMismatches()
1077 // Before rewriteDepthImmediates, delegate's argument is a BB. In case of the in fixCallUnwindMismatches()
1082 // can be wrapped together in one nested try-delegate scope. (In 1, this in fixCallUnwindMismatches()
1233 // are going to wrap the invoke with try-delegate, making the 'delegate' in fixCallUnwindMismatches()
1278 // try-delegate, so we wrap the whole try-catch-end with a try-delegate and in fixCatchUnwindMismatches()
1287 // delegate 1 (caller) ;; (new) in fixCatchUnwindMismatches()
1303 else if (MI.getOpcode() == WebAssembly::DELEGATE) in fixCatchUnwindMismatches()
1364 // Adding a try-delegate wrapping an existing try-catch-end can make existing in fixCatchUnwindMismatches()
1381 // this with a try-delegate. Then this becomes: in fixCatchUnwindMismatches()
1396 // delegate ;; (new instruction) in fixCatchUnwindMismatches()
1403 // 'end_try' and 'end_block' and the BB is split to insert a 'delegate', we in fixCatchUnwindMismatches()
1405 // 'end_try' BB but the new 'end_block' BB. There can be multiple 'delegate's in fixCatchUnwindMismatches()
1451 case WebAssembly::DELEGATE: in recalculateScopeTops()
1508 case WebAssembly::DELEGATE: in fixEndsAtEndOfFunction()
1581 // Delegate's destination is either a catch or a another delegate BB. When the in getDelegateDepth()
1582 // destination is another delegate, we can compute the argument in the same in getDelegateDepth()
1583 // way as branches, because the target delegate BB only contains the single in getDelegateDepth()
1584 // delegate instruction. in getDelegateDepth()
1585 if (!MBB->isEHPad()) // Target is a delegate BB in getDelegateDepth()
1588 // When the delegate's destination is a catch BB, we need to use its in getDelegateDepth()
1600 // fine, but delegate has to exactly target the correct try. in getDelegateDepth()
1608 assert(Depth < Stack.size() && "Delegate destination should be in scope"); in getDelegateDepth()
1665 if (MI.getOpcode() == WebAssembly::DELEGATE) in rewriteDepthImmediates()
1679 if (MI.getOpcode() == WebAssembly::DELEGATE) in rewriteDepthImmediates()