emscripten/tests/optimizer/test-js-optimizer-asm-outli...

31 строка
721 B
JavaScript

function _memset(ptr, value, num) {
ptr = ptr | 0;
value = value | 0;
num = num | 0;
var stop = 0, value4 = 0, stop4 = 0, unaligned = 0;
stop = ptr + num | 0;
if ((num | 0) >= 20) {
value = value & 255;
unaligned = ptr & 3;
value4 = value | value << 8 | value << 16 | value << 24;
stop4 = stop & ~3;
if (unaligned) {
unaligned = ptr + 4 - unaligned | 0;
while ((ptr | 0) < (unaligned | 0)) {
HEAP8[ptr] = value;
ptr = ptr + 1 | 0;
}
}
while ((ptr | 0) < (stop4 | 0)) {
HEAP32[ptr >> 2] = value4;
ptr = ptr + 4 | 0;
}
}
while ((ptr | 0) < (stop | 0)) {
HEAP8[ptr] = value;
ptr = ptr + 1 | 0;
}
}
// EMSCRIPTEN_GENERATED_FUNCTIONS
// EXTRA_INFO: { "sizeToOutline": 100 }