// Zero-len copy at exact dst boundary succeeds.
bounds.copy(PAGE, 0, 0); // Zero-len copy one past dst boundary traps.
assertErrorMessage(() => bounds.copy(PAGE + 1, 0, 0),
WebAssembly.RuntimeError, /index out of bounds/); // Zero-len copy at exact src boundary succeeds.
bounds.copy(0, PAGE, 0); // Zero-len copy one past src boundary traps.
assertErrorMessage(() => bounds.copy(0, PAGE + 1, 0),
WebAssembly.RuntimeError, /index out of bounds/); // dst offset = 2^32 - 4 wraps around when added to n, must trap.
assertErrorMessage(() => bounds.copy(-4, 0, 4),
WebAssembly.RuntimeError, /index out of bounds/); // src offset = 2^32 - 4 wraps around when added to n, must trap.
assertErrorMessage(() => bounds.copy(0, -4, 4),
WebAssembly.RuntimeError, /index out of bounds/);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.