Commit Graph

5 Commits

Author SHA1 Message Date
TÖRÖK Attila f0ed5c7211 chore: Upgrade gc-arena to 0.5.0 2024-01-06 09:45:35 +01:00
TÖRÖK Attila 217585daa8 chore: Delegate `[lints]` in `Cargo.toml` of all packages to the workspace 2024-01-05 11:28:19 +01:00
Aaron Hill 84f788c2d2
avm2: Use RawTable to implement 'public index' iteration (#12470)
* avm2: Use RawTable to implement 'public index' iteration

This makes our implementation more closely aligned with avmplus.
In particular, it's now possible to delete keys from an object
while iterating without disturbing the iteration order (as long
as those keys were already produced by the iterator).

This is based on @Bale001's work on RawTable-based iteration

A few tests had their output changed (they depend on the exact
object iteration order, and don't neccessarily match Flash Player
exactly).

* Use Cell to store index fields

* Remove outdated comment
2023-10-28 20:44:01 +00:00
Moulins 87437c1d6b avm2: use `RefLock` instead of `GcCell` in avm2's scope chain
Also bumps gc-arena to be able to use `Write<Option<_>>::as_write`
2023-08-26 11:00:40 +02:00
moulins f5b4fbce77
Upgrade to new `gc-arena` API (#11182)
* core: add temporary, ruffle-internal copy of `gc-arena` crate

This will allow bumping the upstream `gc-arena` version while
reexporting our own version of the old `GcCell` API, so that
Ruffle's code can be gradually migrated.

Once the migration is done, this crate should be removed.

* core: bump `gc-arena` to kyren/gc-arena#56

Add back the removed `GcCell` to our internal facade crate

* core: bump `gc-arena` to current master

This bump renames `Gc::allocate` to `Gc::new`

* core: rename `GcCell::allocate` to `GcCell::new`, to match `Gc`

* core: bump gc-arena to (slighly after) v0.3.1

Add typedefs for old `*Context` names in the gc-arena facade crate

* core: replace uses of `CollectionContext<'_>` by `&Collection`

* core: Add `gc()` convenience method for `*Context` and `Activation` types

This allows shortening most instances of `[activation.]context.gc_context`
to `activation.gc()` or `context.gc()` (but not all instances, because of
borrowck) Note that this doesn't actually do these shortenings to avoid
major code churn.
2023-07-09 17:04:25 -04:00