0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
Commit graph

19 commits

Author SHA1 Message Date
Kenta Moriuchi
55833cf799
fix(core): introduce SafeRegExp to primordials (#17592) 2023-03-01 08:14:16 +09:00
Leo Kettmeir
49af1ab18d
refactor: remove prefix from include_js_files & use extension name (#17683) 2023-02-07 21:09:50 +00:00
Leo Kettmeir
b4aa153097
refactor: Use ES modules for internal runtime code (#17648)
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>
2023-02-07 20:22:46 +01:00
Kenta Moriuchi
6da958d7ec
chore: update dlint to v0.37.0 for GitHub Actions (#17295)
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
2023-01-16 17:17:18 +01:00
Kenta Moriuchi
1dc3609ff2
fix(core): Add Generator and AsyncGenerator to promordials (#17241) 2023-01-15 04:26:05 +00:00
Kenta Moriuchi
ff89ff4abb
perf(ext,runtime): remove using SafeArrayIterator from for-of (#17255) 2023-01-06 21:45:23 +09:00
David Sherret
10e4b2e140
chore: update copyright year to 2023 (#17247)
Yearly tradition of creating extra noise in git.
2023-01-02 21:00:42 +00:00
Kenta Moriuchi
948f85216a
chore: Update dlint (#17031)
Introduces `SafeSetIterator` and `SafeMapIterator` to primordials
2022-12-20 03:37:50 +01:00
Aapo Alasuutari
2164f6b1eb
perf(ops): Monomorphic sync op calls (#15337)
Welcome to better optimised op calls! Currently opSync is called with parameters of every type and count. This most definitely makes the call megamorphic. Additionally, it seems that spread params leads to V8 not being able to optimise the calls quite as well (apparently Fast Calls cannot be used with spread params).

Monomorphising op calls should lead to some improved performance. Now that unwrapping of sync ops results is done on Rust side, this is pretty simple:

```
opSync("op_foo", param1, param2);
// -> turns to
ops.op_foo(param1, param2);
```

This means sync op calls are now just directly calling the native binding function. When V8 Fast API Calls are enabled, this will enable those to be called on the optimised path.

Monomorphising async ops likely requires using callbacks and is left as an exercise to the reader.
2022-08-11 15:56:56 +02:00
Divy Srivastava
7044bf523b
perf(web): optimize Blob.text and Blob.arrayBuffer (#13981) 2022-03-16 19:16:52 +05:30
Divy Srivastava
697b60a335
perf(web): use DOMString for BlobParts (#13979) 2022-03-16 12:58:38 +05:30
Bartek Iwańczuk
8176a4d166
refactor: primordials for instanceof (#13527) 2022-02-01 18:06:11 +01:00
Bartek Iwańczuk
f248e6f177
Revert "refactor: update runtime code for primordial checks for "instanceof" (#13497)" (#13511)
This reverts commit 884143218f.
2022-01-27 16:27:22 +01:00
Bartek Iwańczuk
884143218f
refactor: update runtime code for primordial checks for "instanceof" (#13497) 2022-01-27 13:36:36 +01:00
Ryan Dahl
1fb5858009
chore: update copyright to 2022 (#13306)
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2022-01-07 22:09:52 -05:00
李瑞丰
46245b830a
fix(ext/webidl): correctly apply [SymbolToStringTag] to interfaces (#11851)
Co-authored-by: Luca Casonato <hello@lcas.dev>
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2021-09-25 02:07:22 +09:00
Andreu Botella
1563088f06
fix: a Request whose URL is a revoked blob URL should still fetch (#11947)
In the spec, a URL record has an associated "blob URL entry", which for
`blob:` URLs is populated during parsing to contain a reference to the
`Blob` object that backs that object URL. It is this blob URL entry that
the `fetch` API uses to resolve an object URL.

Therefore, since the `Request` constructor parses URL inputs, it will
have an associated blob URL entry which will be used when fetching, even
if the object URL has been revoked since the construction of the
`Request` object. (The `Request` constructor takes the URL as a string
and parses it, so the object URL must be live at the time it is called.)

This PR adds a new `blobFromObjectUrl` JS function (backed by a new
`op_blob_from_object_url` op) that, if the URL is a valid object URL,
returns a new `Blob` object whose parts are references to the same Rust
`BlobPart`s used by the original `Blob` object. It uses this function to
add a new `blobUrlEntry` field to inner requests, which will be `null`
or such a `Blob`, and then uses `Blob.prototype.stream()` as the
response's body. As a result of this, the `blob:` URL resolution from
`op_fetch` is now useless, and has been removed.
2021-09-08 11:29:21 +02:00
Luca Casonato
eae9d5b647
fix: Blob#slice arguments should be optional (#11665) 2021-08-12 19:16:23 +02:00
Ryan Dahl
a0285e2eb8
Rename extensions/ directory to ext/ (#11643) 2021-08-11 12:27:05 +02:00
Renamed from extensions/web/09_file.js (Browse further)