diff options
Diffstat (limited to 'runtime/js')
-rw-r--r-- | runtime/js/12_io.js | 8 | ||||
-rw-r--r-- | runtime/js/30_fs.js | 6 | ||||
-rw-r--r-- | runtime/js/99_main.js | 4 |
3 files changed, 10 insertions, 8 deletions
diff --git a/runtime/js/12_io.js b/runtime/js/12_io.js index b384e1528..f6b2d6b87 100644 --- a/runtime/js/12_io.js +++ b/runtime/js/12_io.js @@ -12,7 +12,6 @@ Uint8Array, ArrayPrototypePush, MathMin, - SafeArrayIterator, TypedArrayPrototypeSubarray, TypedArrayPrototypeSet, } = window.__bootstrap.primordials; @@ -157,14 +156,15 @@ function concatBuffers(buffers) { let totalLen = 0; - for (const buf of new SafeArrayIterator(buffers)) { - totalLen += buf.byteLength; + for (let i = 0; i < buffers.length; ++i) { + totalLen += buffers[i].byteLength; } const contents = new Uint8Array(totalLen); let n = 0; - for (const buf of new SafeArrayIterator(buffers)) { + for (let i = 0; i < buffers.length; ++i) { + const buf = buffers[i]; TypedArrayPrototypeSet(contents, buf, n); n += buf.byteLength; } diff --git a/runtime/js/30_fs.js b/runtime/js/30_fs.js index 897c89a13..770cef1a8 100644 --- a/runtime/js/30_fs.js +++ b/runtime/js/30_fs.js @@ -9,7 +9,6 @@ DatePrototype, MathTrunc, ObjectPrototypeIsPrototypeOf, - SafeArrayIterator, SymbolAsyncIterator, SymbolIterator, Function, @@ -212,7 +211,10 @@ let offset = 0; let str = 'const unix = Deno.build.os === "darwin" || Deno.build.os === "linux"; return {'; - for (let [name, type] of new SafeArrayIterator(ObjectEntries(types))) { + const typeEntries = ObjectEntries(types); + for (let i = 0; i < typeEntries.length; ++i) { + let [name, type] = typeEntries[i]; + const optional = type.startsWith("?"); if (optional) type = type.slice(1); diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index 2e92d5b5d..873f371ca 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -33,7 +33,6 @@ delete Intl.v8BreakIterator; SymbolFor, SymbolIterator, PromisePrototypeThen, - SafeArrayIterator, SafeWeakMap, TypeError, WeakMapPrototypeDelete, @@ -206,7 +205,8 @@ delete Intl.v8BreakIterator; ); loadedMainWorkerScript = true; - for (const { url, script } of new SafeArrayIterator(scripts)) { + for (let i = 0; i < scripts.length; ++i) { + const { url, script } = scripts[i]; const err = core.evalContext(script, url)[1]; if (err !== null) { throw err.thrown; |