@@ -55,13 +55,21 @@ vm_oop_t Start() {
5555 & & LABEL_BC_JUMP_ON_TRUE_POP ,
5656 & & LABEL_BC_JUMP_ON_FALSE_TOP_NIL ,
5757 & & LABEL_BC_JUMP_ON_TRUE_TOP_NIL ,
58+ & & LABEL_BC_JUMP_ON_NOT_NIL_POP ,
59+ & & LABEL_BC_JUMP_ON_NIL_POP ,
60+ & & LABEL_BC_JUMP_ON_NOT_NIL_TOP_TOP ,
61+ & & LABEL_BC_JUMP_ON_NIL_TOP_TOP ,
5862 & & LABEL_BC_JUMP_IF_GREATER ,
5963 & & LABEL_BC_JUMP_BACKWARD ,
6064 & & LABEL_BC_JUMP2 ,
6165 & & LABEL_BC_JUMP2_ON_FALSE_POP ,
6266 & & LABEL_BC_JUMP2_ON_TRUE_POP ,
6367 & & LABEL_BC_JUMP2_ON_FALSE_TOP_NIL ,
6468 & & LABEL_BC_JUMP2_ON_TRUE_TOP_NIL ,
69+ & & LABEL_BC_JUMP2_ON_NOT_NIL_POP ,
70+ & & LABEL_BC_JUMP2_ON_NIL_POP ,
71+ & & LABEL_BC_JUMP2_ON_NOT_NIL_TOP_TOP ,
72+ & & LABEL_BC_JUMP2_ON_NIL_TOP_TOP ,
6573 & & LABEL_BC_JUMP2_IF_GREATER ,
6674 & & LABEL_BC_JUMP2_BACKWARD };
6775
@@ -373,6 +381,56 @@ LABEL_BC_JUMP_ON_TRUE_TOP_NIL: {
373381}
374382 DISPATCH_NOGC ();
375383
384+ LABEL_BC_JUMP_ON_NOT_NIL_POP : {
385+ vm_oop_t val = GetFrame ()-> Top ();
386+ if (val != load_ptr (nilObject )) {
387+ uint8_t const offset = currentBytecodes [bytecodeIndexGlobal + 1 ];
388+ bytecodeIndexGlobal += offset ;
389+ } else {
390+ bytecodeIndexGlobal += 3 ;
391+ }
392+ GetFrame ()-> PopVoid ();
393+ }
394+ DISPATCH_NOGC ();
395+
396+ LABEL_BC_JUMP_ON_NIL_POP : {
397+ vm_oop_t val = GetFrame ()-> Top ();
398+ if (val == load_ptr (nilObject )) {
399+ uint8_t const offset = currentBytecodes [bytecodeIndexGlobal + 1 ];
400+ bytecodeIndexGlobal += offset ;
401+ } else {
402+ bytecodeIndexGlobal += 3 ;
403+ }
404+ GetFrame ()-> PopVoid ();
405+ }
406+ DISPATCH_NOGC ();
407+
408+ LABEL_BC_JUMP_ON_NOT_NIL_TOP_TOP : {
409+ vm_oop_t val = GetFrame ()-> Top ();
410+ if (val != load_ptr (nilObject )) {
411+ uint8_t const offset = currentBytecodes [bytecodeIndexGlobal + 1 ];
412+ bytecodeIndexGlobal += offset ;
413+ // GetFrame()->SetTop(val);
414+ } else {
415+ GetFrame ()-> PopVoid ();
416+ bytecodeIndexGlobal += 3 ;
417+ }
418+ }
419+ DISPATCH_NOGC ();
420+
421+ LABEL_BC_JUMP_ON_NIL_TOP_TOP : {
422+ vm_oop_t val = GetFrame ()-> Top ();
423+ if (val == load_ptr (nilObject )) {
424+ uint8_t const offset = currentBytecodes [bytecodeIndexGlobal + 1 ];
425+ bytecodeIndexGlobal += offset ;
426+ // GetFrame()->SetTop(val);
427+ } else {
428+ GetFrame ()-> PopVoid ();
429+ bytecodeIndexGlobal += 3 ;
430+ }
431+ }
432+ DISPATCH_NOGC ();
433+
376434LABEL_BC_JUMP_IF_GREATER : {
377435 if (checkIsGreater ()) {
378436 bytecodeIndexGlobal += currentBytecodes [bytecodeIndexGlobal + 1 ];
@@ -456,6 +514,64 @@ LABEL_BC_JUMP2_ON_TRUE_TOP_NIL: {
456514}
457515 DISPATCH_NOGC ();
458516
517+ LABEL_BC_JUMP2_ON_NOT_NIL_POP : {
518+ vm_oop_t val = GetFrame ()-> Top ();
519+ if (val != load_ptr (nilObject )) {
520+ uint16_t const offset =
521+ ComputeOffset (currentBytecodes [bytecodeIndexGlobal + 1 ],
522+ currentBytecodes [bytecodeIndexGlobal + 2 ]);
523+ bytecodeIndexGlobal += offset ;
524+ } else {
525+ bytecodeIndexGlobal += 3 ;
526+ }
527+ GetFrame ()-> PopVoid ();
528+ }
529+ DISPATCH_NOGC ();
530+
531+ LABEL_BC_JUMP2_ON_NIL_POP : {
532+ vm_oop_t val = GetFrame ()-> Top ();
533+ if (val == load_ptr (nilObject )) {
534+ uint16_t const offset =
535+ ComputeOffset (currentBytecodes [bytecodeIndexGlobal + 1 ],
536+ currentBytecodes [bytecodeIndexGlobal + 2 ]);
537+ bytecodeIndexGlobal += offset ;
538+ } else {
539+ bytecodeIndexGlobal += 3 ;
540+ }
541+ GetFrame ()-> PopVoid ();
542+ }
543+ DISPATCH_NOGC ();
544+
545+ LABEL_BC_JUMP2_ON_NOT_NIL_TOP_TOP : {
546+ vm_oop_t val = GetFrame ()-> Top ();
547+ if (val != load_ptr (nilObject )) {
548+ uint16_t const offset =
549+ ComputeOffset (currentBytecodes [bytecodeIndexGlobal + 1 ],
550+ currentBytecodes [bytecodeIndexGlobal + 2 ]);
551+ bytecodeIndexGlobal += offset ;
552+ // GetFrame()->SetTop(val);
553+ } else {
554+ GetFrame ()-> PopVoid ();
555+ bytecodeIndexGlobal += 3 ;
556+ }
557+ }
558+ DISPATCH_NOGC ();
559+
560+ LABEL_BC_JUMP2_ON_NIL_TOP_TOP : {
561+ vm_oop_t val = GetFrame ()-> Top ();
562+ if (val == load_ptr (nilObject )) {
563+ uint16_t const offset =
564+ ComputeOffset (currentBytecodes [bytecodeIndexGlobal + 1 ],
565+ currentBytecodes [bytecodeIndexGlobal + 2 ]);
566+ bytecodeIndexGlobal += offset ;
567+ // GetFrame()->SetTop(val);
568+ } else {
569+ GetFrame ()-> PopVoid ();
570+ bytecodeIndexGlobal += 3 ;
571+ }
572+ }
573+ DISPATCH_NOGC ();
574+
459575LABEL_BC_JUMP2_IF_GREATER : {
460576 if (checkIsGreater ()) {
461577 bytecodeIndexGlobal +=
0 commit comments