• Ng Zhi An's avatar
    [wasm] Speed up some tests in grow-memory · efb1b5e4
    Ng Zhi An authored
    Rework testMemoryGrowPreservesDataMemOp tests so that they only test the
    first and last 5 offsets within the page, instead of every offset.
    
    Slight logic change: instead of storing the value C - offset (where C is
    a constant that is different for 32 and 16 memops), we store just the
    value offset. This allows us to combine the logic for all 3 memops (32,
    16, and 8). But we need to add a modulo so that in the 8 bit case, we
    don't store a value that exceeds the maximum (the other cases will never
    hit a case that exceeds the max).
    
    Bug: v8:7783
    Change-Id: Ibfdc77555ba2ca26391eba303050a03538f6012d
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2117633Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
    Commit-Queue: Zhi An Ng <zhin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#66879}
    efb1b5e4
grow-memory.js 12.8 KB