Commit Graph

7298 Commits

Author SHA1 Message Date
Moulins 0b3395d21f core: simplify callstack handling in Player
Grab the AVM2 callstack handle before constructing the GC root,
so that we can set it directly instead of modify the GC root once
constructed. This means we can remove an extra GcCell.

Also switch the callstack object from GcCell to GcRefLock.
2024-08-10 22:53:27 +02:00
Adrian Wielgosik 0097aea381 avm2: Make primitive coercions way cheaper 2024-08-10 17:24:31 +02:00
Tom Schuster f202088bd8 avm2: Box E4XNamespace in E4XNodeData 2024-08-10 15:28:28 +02:00
Nathan Adams 637b1ccf4e avm2: Save an alloc when calling Regexp effective_replacement with no replacement patterns 2024-08-10 01:53:01 +02:00
Nathan Adams 0023062c82 avm2: Short circuit the regexp replacement logic if it's a simple (no pattern) string 2024-08-10 01:53:01 +02:00
Nathan Adams ef42bba20c avm2: Don't realloc the same string in Regexp.replace_with_fn, if no match was found 2024-08-10 01:53:01 +02:00
Lord-McSweeney 863e621bbb avm2: Make ScriptObjectData.vtable non-Optional 2024-08-07 14:57:17 -07:00
Lord-McSweeney fa4df53831 avm2: Change the alignment assertion to use `ScriptObjectData` instead of `RefLock<ScriptObjectData>` 2024-08-07 11:58:05 -07:00
Lord-McSweeney 732775d08a avm2: Use interior mutability in `ScriptObjectData` 2024-08-07 11:58:05 -07:00
Lord-McSweeney 117df6e3c2 avm2: Resolve review notes in `enum_trait_object` macro 2024-08-06 19:25:03 -07:00
Lord-McSweeney 53347ed088 core: Remove unnecessary defined `#[no_dynamic]` `proc_macro_attribute` 2024-08-06 19:25:03 -07:00
Lord-McSweeney c98c173c6b chore: Run `cargo fix` 2024-08-06 19:25:03 -07:00
Lord-McSweeney 806da319c0 avm2: Ensure alignment between *ObjectData and ScriptObjectData is the same 2024-08-06 19:25:03 -07:00
Lord-McSweeney 9c399da94a avm2: Add a `#[no_dynamic]` attribute to specify functions in `enum_trait_object` that don't need dynamic dispatch 2024-08-06 19:25:03 -07:00
Lord-McSweeney e58a82289a avm2: Remove some dynamic-dispatch TObject logic (both on Object variants and defined on TObject)
This results in better codegen for `Object::get_slot` and `set_slot`
2024-08-06 19:25:03 -07:00
michiel2005 6350f5cb87 avm1: made the context menu work for all avm1 objects 2024-08-06 22:11:17 +02:00
TÖRÖK Attila 124310986f render,desktop: Switch to `wgpu` `v22.1.0` and latest `egui` without `winit` 0.30
I opted to enable dithering in egui, because why not.
2024-08-06 15:00:38 +02:00
dependabot[bot] e618c6862b build(deps): bump the cargo-minor group with 9 updates
Bumps the cargo-minor group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.11` | `4.5.13` |
| [bytemuck](https://github.com/Lokathor/bytemuck) | `1.16.1` | `1.16.3` |
| [flate2](https://github.com/rust-lang/flate2-rs) | `1.0.30` | `1.0.31` |
| [indexmap](https://github.com/indexmap-rs/indexmap) | `2.2.6` | `2.3.0` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.121` | `1.0.122` |
| [regex](https://github.com/rust-lang/regex) | `1.10.5` | `1.10.6` |
| [zip](https://github.com/zip-rs/zip2) | `2.1.5` | `2.1.6` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.10.1` | `3.11.0` |
| [lru](https://github.com/jeromefroe/lru-rs) | `0.12.3` | `0.12.4` |


Updates `clap` from 4.5.11 to 4.5.13
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.11...v4.5.13)

Updates `bytemuck` from 1.16.1 to 1.16.3
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.16.1...v1.16.3)

Updates `flate2` from 1.0.30 to 1.0.31
- [Release notes](https://github.com/rust-lang/flate2-rs/releases)
- [Commits](https://github.com/rust-lang/flate2-rs/commits)

Updates `indexmap` from 2.2.6 to 2.3.0
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md)
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.2.6...2.3.0)

Updates `serde_json` from 1.0.121 to 1.0.122
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.121...v1.0.122)

Updates `regex` from 1.10.5 to 1.10.6
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.5...1.10.6)

Updates `zip` from 2.1.5 to 2.1.6
- [Release notes](https://github.com/zip-rs/zip2/releases)
- [Changelog](https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zip-rs/zip2/compare/v2.1.5...v2.1.6)

Updates `tempfile` from 3.10.1 to 3.11.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.10.1...v3.11.0)

Updates `lru` from 0.12.3 to 0.12.4
- [Changelog](https://github.com/jeromefroe/lru-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jeromefroe/lru-rs/compare/0.12.3...0.12.4)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: flate2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: indexmap
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo-minor
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: zip
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo-minor
- dependency-name: lru
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 17:49:09 +02:00
Crowdin Bot 3b482b176e chore: Update translations from Crowdin 2024-08-05 13:37:33 +02:00
Kamil Jarosz 85c7370577 text: Fix laying out empty text boxes
This patch fixes how empty text boxes are laid out.
The empty boxes are now added during line fixup, and not after,
which ensures they are subjected to alignment and other adjustments.
2024-08-02 17:56:45 +02:00
Kamil Jarosz 8722642ed7 text: Reset max font size on newline
Before this patch, max font size (which claimed to be the highest font
size observed within the current line) was calculated for each span,
regardless of newlines.
2024-08-02 17:56:45 +02:00
Kamil Jarosz fcbeb92406 text: Assume there's at least one layout box
That condition related to drawing a cursor when there are no boxes is
outdated, as currently it's guaranteed that there's at least one box.

FormatSpans.normalize() ensures that there's at least one span, and
LayoutContext.fixup_line() ensures that each line has at least one box.
2024-08-02 17:56:45 +02:00
Kamil Jarosz 2de9fb83b4 text: Ignore non-text boxes when calculating line bounds 2024-08-02 17:07:02 +02:00
Lord-McSweeney 6c233ed859 avm2: Annotate all object *Data structs with `#[repr(C)]`
This ensures that the ScriptObjectData common to every *Data is always at the same offset, which results in better codegen for TObject methods
2024-08-01 09:09:29 -07:00
Lord-McSweeney c54de07382 avm2: Resolve review comments and use `activation.gc()` in some places 2024-08-01 09:09:29 -07:00
Lord-McSweeney 8f6736da74 avm2: Store a `DisplayObject` instead of `Option<DisplayObject>` in `StageObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney 3ae53a6ef2 avm2: Use `Gc` instead of `GcCell` in `ScriptObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney c80bd7a55e avm2: Use `Gc` instead of `GcCell` in `FunctionObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney 336e10a535 avm2: Use `Gc` instead of `GcCell` in `XmlListObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney 2ff8238bf0 avm2: Remove now-unnecessary `Mutation` argument in some LoaderInfo methods 2024-08-01 09:09:29 -07:00
Lord-McSweeney 49188bd5d7 avm2: Use `Gc` instead of `GcCell` in `LoaderInfoObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney fa759a06a4 avm2: Use `Gc` instead of `GcCell` in `EventObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney 5ea9b5d80b avm2: Use `Gc` instead of `GcCell` in `SoundChannelObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney 458264a76a avm2: Use `Gc` instead of `GcCell` in `SoundObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney 4773591c42 avm2: Use `Gc` instead of `GcCell` in `ClassObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney 42e0380e2e avm2: Use `Gc` instead of `GcCell` in `DispatchObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney c551a365a3 avm2: Use `Gc` instead of `GcCell` in `PrimitiveObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney 64261c8f06 avm2: Use `Gc` instead of `GcCell` in `RegExpObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney 562be06fb1 avm2: Use `Gc` instead of `GcCell` in `VectorObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney b1acb17806 avm2: Use `Gc` instead of `GcCell` in `ArrayObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney 7e82b3f425 avm2: Use `Gc` instead of `GcCell` in `XmlObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney a9ac849e56 avm2: Use `Gc` instead of `GcCell` in `NamespaceObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney ee4c08cc31 avm2: Use `Gc` instead of `GcCell` in `StageObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney 3d80fc16c4 avm2: Use `Gc` instead of `GcCell` in `QNameObject` and `ErrorObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney bc5328892a avm2: Use `Gc` instead of `GcCell` in `BitmapDataObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney 27d25a9442 avm2: Remove Mutation parameter from `TObject::as_bytearray_mut` 2024-08-01 09:09:29 -07:00
Lord-McSweeney 313c384d41 avm2: Use `Gc` instead of `GcCell` in `ByteArrayObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney a5d2b613ac avm2: Use `Gc` instead of `GcCell` in `DomainObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney 19bf1d7dcb avm2: Use `Gc` instead of `GcCell` in `DictionaryObject` 2024-08-01 09:09:29 -07:00
Lord-McSweeney e4499c2ed2 avm2: Use `Gc` instead of `GcCell` in `ProxyObject` 2024-08-01 09:09:29 -07:00