Age | Commit message (Collapse) | Author |
|
Ref #23490, #23277
* remove `--js-float16array` flag (This flag has already added to
deno_core)
* add some `Float16Array` support
|
|
|
|
Enabled prefer-primordials lint for ext/cron and ext/kv.
|
|
Deno v1.39 introduces `vm.runInNewContext`. This may cause problems when
using `Object.prototype.isPrototypeOf` to check built-in types.
```js
import vm from "node:vm";
const err = new Error();
const crossErr = vm.runInNewContext(`new Error()`);
console.assert( !(crossErr instanceof Error) );
console.assert( Object.getPrototypeOf(err) !== Object.getPrototypeOf(crossErr) );
```
This PR changes to check using internal slots solves them.
---
current:
```
> import vm from "node:vm";
undefined
> vm.runInNewContext(`new Error("message")`)
Error {}
> vm.runInNewContext(`new Date("2018-12-10T02:26:59.002Z")`)
Date {}
```
this PR:
```
> import vm from "node:vm";
undefined
> vm.runInNewContext(`new Error("message")`)
Error: message
at <anonymous>:1:1
> vm.runInNewContext(`new Date("2018-12-10T02:26:59.002Z")`)
2018-12-10T02:26:59.002Z
```
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
|
|
This commit refactors how we access "core", "internals" and
"primordials" objects coming from `deno_core`, in our internal JavaScript code.
Instead of capturing them from "globalThis.__bootstrap" namespace, we
import them from recently added "ext:core/mod.js" file.
|
|
Fixes #18802
This PR adds `util.toUSVString` to node:util:
```js
import util from "node:util";
util.toUSVString("string\ud801"); // => "string\ufffd"
```
|
|
Fixes a WPT in `URL` and `ReadableStream`.
Some unrelated WPT expectation changes due to WPT update.
|
|
|
|
|
|
Further improves preact SSR and express benches by about 2k RPS.
Ref https://github.com/denoland/deno/issues/19451
|
|
Towards https://github.com/denoland/deno/issues/19330
Shows about 1% improvement in the HTTP benchmark.
|
|
|
|
`ObjectPrototypeHasOwnProperty` (#18952)
ES2022 `Object.hasOwn` can be used in snapshot, so I migrate to use it.
|
|
|
|
Creating these options bags is more costly than passing arguments
one-by-one. Especially since `prefix` and `context` are passed to all functions.
|
|
|
|
This should produce a little less garbage and using an object here
wasn't really required.
---------
Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
|
|
Closes #17709
|
|
|
|
|
|
This PR refactors all internal js files (except core) to be written as
ES modules.
`__bootstrap`has been mostly replaced with static imports in form in
`internal:[path to file from repo root]`.
To specify if files are ESM, an `esm` method has been added to
`Extension`, similar to the `js` method.
A new ModuleLoader called `InternalModuleLoader` has been added to
enable the loading of internal specifiers, which is used in all
situations except when a snapshot is only loaded, and not a new one is
created from it.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
subclasses (#17431)
|
|
Updated third_party dlint to v0.37.0 for GitHub Actions. This PR
includes following changes:
* fix(prefer-primordials): Stop using array pattern assignments
* fix(prefer-primordials): Stop using global intrinsics except for
`SharedArrayBuffer`
* feat(guard-for-in): Apply new guard-for-in rule
|
|
|
|
|
|
Yearly tradition of creating extra noise in git.
|
|
In the for-in loops, there were a few places where we forgot to check if
objects owned some properties, so I added them.
|
|
Introduces `SafeSetIterator` and `SafeMapIterator` to primordials
|
|
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
|
|
|
|
|
|
(#13497)" (#13511)
This reverts commit 884143218fad0e18f7553aaf079d52de703f7601.
|
|
|
|
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
|
|
The Web IDL conversion to `BufferSource` and similar types shouldn't
check whether the buffer is detached.
In the case of `TextDecoder`, our implementation would still throw after
the Web IDL conversions because we're creating a new `Uint8Array` from
the buffer source's buffer, which throws if it's detached. This change
also fixes this bug.
|
|
In a tweak commit of #12286 I accidentally eliminated the else branch ... running the slow & the fast path providing a worst of both worlds path
|
|
Cuts self-time by ~6x, 172ns/iter => 22ns/iter benched on 1M Response builds / HeadersInit calls
|
|
On a benchmark constructing Responses with headers this shaves off 25%
|
|
|
|
|
|
Co-authored-by: Luca Casonato <hello@lcas.dev>
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
|
|
|
|
|