LibJS: Add a note about inaccuracies to UnifySameBlocks

This commit is contained in:
Hendiadyoin1 2022-10-30 12:28:57 +01:00 committed by Andreas Kling
commit c9e7d452c5
Notes: sideshowbarker 2024-07-17 04:55:57 +09:00

View file

@ -29,6 +29,8 @@ void UnifySameBlocks::perform(PassPipelineExecutable& executable)
continue;
auto candidate_bytes = candidate_block->instruction_stream();
// FIXME: NewBigInt's value is not correctly reflected by its encoding in memory,
// this will yield false negatives for blocks containing that
if (memcmp(candidate_bytes.data(), block_bytes.data(), candidate_block->size()) == 0)
equal_blocks.set(&*candidate_block, &block);
}