diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2023-01-06 21:45:23 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-06 21:45:23 +0900 |
commit | ff89ff4abba39ce158056d390e761495f5a7bc86 (patch) | |
tree | 03a9c71b5bb3889842db06ed41c3999074c4107a /runtime/js/30_fs.js | |
parent | 39cbaa6d34c249afc4b197836da1fa6dd143cbf9 (diff) |
perf(ext,runtime): remove using `SafeArrayIterator` from `for-of` (#17255)
Diffstat (limited to 'runtime/js/30_fs.js')
-rw-r--r-- | runtime/js/30_fs.js | 6 |
1 files changed, 4 insertions, 2 deletions
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); |