File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 490490 mutating func predictNext_unreachable( operandPc: Pc , sp: Sp ) -> [ Pc ] { [ ] }
491491 mutating func predictNext_endOfExecution( operandPc: Pc , sp: Sp ) -> [ Pc ] { [ ] }
492492 mutating func predictNext_breakpoint( operandPc: Pc , sp: Sp ) -> [ Pc ] { [ ] }
493+
494+ // Exception-handling instructions — destination depends on which handler
495+ // catches at runtime, so static prediction is not possible.
496+ mutating func predictNext_throwTag( operandPc: Pc , sp: Sp ) -> [ Pc ] { [ ] }
497+ mutating func predictNext_throwRef( operandPc: Pc , sp: Sp ) -> [ Pc ] { [ ] }
498+
499+ // `catchHandlers` registers exception handlers and falls through to the
500+ // immediately-following instruction.
501+ mutating func predictNext_catchHandlers( operandPc: Pc , sp: Sp ) -> [ Pc ] {
502+ var pc = operandPc
503+ _ = Instruction . CatchHandlersOperand. load ( from: & pc)
504+ return [ pc]
505+ }
493506 }
494507
495508#endif
Original file line number Diff line number Diff line change @@ -532,7 +532,7 @@ extension Parser: BinaryInstructionDecoder {
532532 return BrTable ( labelIndices: labelIndices, defaultIndex: labelIndex)
533533 }
534534 @inlinable mutating func visitThrow( ) throws ( WasmParserError) -> UInt32 { try parseUnsigned ( ) }
535- @inlinable mutating func visitThrowRef( ) throws ( WasmParserError) { /* no immediates */ }
535+ @inlinable mutating func visitThrowRef( ) throws ( WasmParserError) { /* no immediates */ }
536536 @inlinable mutating func visitTryTable( ) throws ( WasmParserError) -> ( blockType: BlockType , tryCatch: TryCatch ) {
537537 let blockType = try parseResultType ( )
538538 let catches : [ CatchClause ] = try parseVector { ( ) throws ( WasmParserError) in
You can’t perform that action at this time.
0 commit comments