0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-12-27 01:29:19 -05:00
Commit graph

35 commits

Author SHA1 Message Date
Bert Belder
48cc6cb791
Sync V8 heap object type hierarchy with C++ (#929) 2022-03-25 03:15:30 +01:00
Ben Noordhuis
5a27cb7655
Upgrade V8 to 9.4.146.2 (#753) 2021-08-15 15:13:08 +02:00
Ben Noordhuis
84f1241b68
Fix bad assumption in static_assert (#668)
v8::Location is the size of two ints, not the size of one size_t.

`2 * sizeof(int) == sizeof(size_t)` on 64 bits architectures but not on
32 bits architectures.

Fixes #667.
2021-04-19 16:43:58 +02:00
Heyang Zhou
be89cfc131
Add code cache API (#635) 2021-03-05 05:26:37 -05:00
Bartek Iwańczuk
8551c62511
Add Module::source_offset_to_location, deprecate old APIs (#624) 2021-02-15 12:08:39 +01:00
Bartek Iwańczuk
ec54f28bfd
feat: Add ModuleRequest (#623) 2021-02-14 19:49:37 +01:00
Bartek Iwańczuk
4ef7ab3fd6
docs: add info about settings --harmony-import-assertions flag (#606) 2021-02-09 23:03:25 +01:00
Bartek Iwańczuk
d6be279a06
Add support for import assertions (#598)
This commit adds support for import assertions.

Major changes include:
- removal of "ResolveCallback" (deprecated in V8) 
in favor of "ModuleResolveCallback"
- removal of "HostImportModuleDynamicallyCallback" (deprecated in V8)
in favor of "HostImportModuleDynamicallyWithImportAssertionsCallback"
2021-02-05 00:22:26 +01:00
Moritz Gunz
efe0e76a75
#[derive(Debug)] all the things (#468)
This commit implements Debug trait for most public structs.
2020-11-18 15:17:25 +01:00
Ben Noordhuis
3fa9fb36ed
Fix runtime assert when hashing module object (#522)
The blanket `std:#️⃣:Hash` impl for instances of `v8::Data` invokes
`v8::internal::Object::GetHash()` but that crashes for `v8::Module`
objects. Use a custom impl that calls `v8::Module::get_identity_hash()`.

Fixes the following runtime assertion:

    # Fatal error in ../../../v8/src/objects/objects-inl.h, line 1043
    # Debug check failed: object.IsJSReceiver().

Refs: https://github.com/denoland/deno/pull/8354#discussion_r522157813
2020-11-15 00:07:52 +01:00
Ben Noordhuis
836557e84f
Add Module::script_id() (#497) 2020-10-15 11:05:38 +02:00
devsnek
6d5686cd7c
Add synthetic module support (#441) 2020-08-25 17:39:18 -04:00
Bert Belder
9684640b48
Implement the 'Hash' trait for local and global handles (#415) 2020-07-08 10:27:34 +02:00
Bert Belder
4e64cefc9c
Remove unnecessary 'DerefMut' impl from 'Local<T>' (#406)
Local handles never need to be mutable. This patch also rounds up the
last few places where we were still asking the user to pass an `&mut T`
to an API method.
2020-06-26 15:05:39 +02:00
Bert Belder
b1a4dfea8b
Remove 'context' param from (almost) all public methods (#406) 2020-06-26 03:00:06 +02:00
Bert Belder
3b6ed67f5e
Rewrite the scope system from scratch (#406) 2020-06-26 01:42:00 +02:00
Bert Belder
8a4dc30445
Rename to_local() to cast_local(), use a closure (#406)
This makes it possible to add a run-time check that verifies that the
specified closure is actually the one that contains the local handle.
2020-06-19 20:18:07 +02:00
Bert Belder
405a874c36
Fix remaining Local::from_raw() misuse, and correct some lifetimes (#388) 2020-05-31 19:00:04 +02:00
Bert Belder
c114c46e15
Fix incorrect function signatures in module.rs (#388)
* `usize` and `int` are not equivalent or interchangeable at any level.
* Removed an unnecessary mutable borrow.
2020-05-31 19:00:01 +02:00
Bert Belder
d1ac68f0c8
Always use raw pointers to send V8 handles between C++ and Rust (#349)
And other pointer usage touch-ups on the C++ side:
- const parameters are passed by & reference.
- mutable parameters are passed by * pointer.
2020-04-14 00:34:32 +02:00
Ben Noordhuis
52b8bbaf82 Fix Module::get_module_namespace() doc comment (#219) 2020-01-17 08:01:19 -05:00
Bert Belder
e6fb4d1a65
Reimplement Module::ResolveCallback ABI fix without global variables (#207) 2020-01-14 21:15:06 +01:00
Bert Belder
bf28a6b2e3
Remove rust-abi wrapper for v8::ResolveCallback (#204)
It will be back, but in a different form.
2020-01-13 06:58:26 +01:00
Bartek Iwańczuk
2d77996467 add v8::Module::get_module_namespace (#177) 2020-01-03 18:12:45 -05:00
Ry Dahl
38057132cc
get_module_requests_length should return usize (#151) 2019-12-30 15:11:50 -05:00
Bert Belder
9a72f62bd6
Add complete V8 type hierarchy (#148) 2019-12-30 19:06:45 +01:00
Ry Dahl
29fa5388f5
Fix some docs (#140) 2019-12-26 21:14:59 -05:00
Bert Belder
934dd16e89
Clean up and remove AsRef/AsMut implementations (#130) 2019-12-25 12:40:14 +01:00
Bert Belder
ae4b48eb22
Get rid of HandleScope closure, add CallbackScope (#119) 2019-12-25 00:31:36 +01:00
Ry Dahl
b97abb17b9
default options for v8::script_compiler::compile_module (#125)
And other clean ups
2019-12-23 20:23:55 -05:00
Ry Dahl
51737506dd
make InstantiateModule work (#124) 2019-12-23 18:09:03 -05:00
Ry Dahl
3ec3b07638
first pass implementation for v8::Module (#120)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2019-12-23 07:12:52 -05:00
Ry Dahl
32fc7e7bef
add v8::Module::instantiate_module (#98)
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2019-12-20 20:54:14 -05:00
Bert Belder
331582561b
Add Local lifetimes back (#95) 2019-12-21 02:11:54 +01:00
Bartek Iwańczuk
beb9272f38 stub out v8::Module (#69) 2019-12-20 08:56:32 -05:00