File tree Expand file tree Collapse file tree
nova_vm/src/engine/bytecode Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -704,17 +704,15 @@ pub(crate) struct Instr<'a> {
704704
705705impl < ' a > Instr < ' a > {
706706 pub ( super ) fn consume_instruction ( instructions : & ' a [ u8 ] , ip : & mut usize ) -> Option < Self > {
707- let Some ( kind_at) = instructions. get ( * ip) else {
708- return None ;
709- } ;
707+ let kind_at = instructions. get ( * ip) ?;
710708 let Ok ( kind) = Instruction :: try_from ( * kind_at) else {
711709 panic_invalid_instruction ( )
712710 } ;
713711 // SAFETY: we checked above the kind is Ok.
714712 let ptr = NonNull :: from_ref ( kind_at) . cast :: < Instruction > ( ) ;
715713
716714 let byte_count = match kind. argument_count ( ) {
717- value @ ( 0 | 1 | 2 ) => ( value * 2 ) as usize ,
715+ value @ ( 0 ..= 2 ) => ( value * 2 ) as usize ,
718716 _ => panic_invalid_instruction ( ) ,
719717 } ;
720718 * ip += byte_count + 1 ;
Original file line number Diff line number Diff line change 70267026 "staging/sm/syntax/yield-as-identifier.js": "FAIL",
70277027 "staging/source-phase-imports/import-source-source-text-module.js": "FAIL",
70287028 "staging/top-level-await/tla-hang-entry.js": "FAIL"
7029- }
7029+ }
Original file line number Diff line number Diff line change 88 "unresolved" : 37
99 },
1010 "total" : 50733
11- }
11+ }
You can’t perform that action at this time.
0 commit comments