src/virtual-machines/source-1-with-mark-region-gc.js
// Returns the address of the first recyclable block scanning from the first block
Returns the address of the first recyclable block scanning from the first block
Returns the address of the first recyclable block scanning from the first block
function GET_NEXT_RECYCLABLE_BLOCK() {
  RES = NO_BLOCK_FOUND;
  for (let i = 0; i < NUMBER_OF_BLOCKS; i = i + 1) {
    if (HEAP[i * BLOCK_SIZE + BLOCK_STATE_SLOT] === RECYCLABLE) {
      RES = BLOCK_SIZE * i;
      break;
    } else {}
  }
}
function GET_NEXT_RECYCLABLE_BLOCK ( ) { RES = NO_BLOCK_FOUND ; for ( let i = 0 ; i < NUMBER_OF_BLOCKS ; i = i + 1 ) { if ( HEAP [ i * BLOCK_SIZE + BLOCK_STATE_SLOT ] === RECYCLABLE ) { RES = BLOCK_SIZE * i ; break ; } else { } } }
Returns the address of the first recyclable block scanning from the first block
Returns the address of the first recyclable block scanning from the first block
// if no block is recyclable