David Wendt
62be772649
chore: Compliance with current clippy beta/nightly
2021-09-02 17:57:58 -06:00
David Wendt
622be142c3
avm2: Specialize generic classes when resolving types whose names have parameter names also in them.
...
Any is, as usual, special-cased. In this case, we treat it as specializing to `Object`, since all vectors should be coercible to `Object`.
2021-09-02 17:57:58 -06:00
David Wendt
c06a3c10d8
avm2: Impl `Vector.filter`
2021-09-02 17:57:58 -06:00
David Wendt
d079c647fa
avm2: Parameter types can be `*`.
2021-09-02 17:57:58 -06:00
David Wendt
f00234ce26
avm2: Consider specializations of generic classes to be of the same type as other specializations of the same class when their parameters are also of the same type.
...
For example, instances of `Vector.<Class>` are considered to be of type `Vector.<Interface>` in the same way that instances of `Class` are considered to be of type `Interface`. This assumes `Class` implements `Interface`.
This does *not* apply to the builtin coercions for numeric and string types, which do not extend to generic parameters. For example, `Vector.<uint>` is *not* coercible to `Vector.<int>`, even though it's contents *are*.
2021-09-02 17:57:58 -06:00
David Wendt
4d962f154e
avm2: Don't run initializers on vectors as they overwrite the existing vector storage.
2021-09-02 17:57:58 -06:00
David Wendt
fcc7c9e7ee
avm2: Propagate the specialized class parameter into the vector storage so that coercions happen correctly.
2021-09-02 17:57:58 -06:00
Adrian Wielgosik
2560bdc804
chore: Drop unnecessary mut
2021-09-02 17:57:58 -06:00
Adrian Wielgosik
846b53dc1b
avm2: Impl `Vector.forEach`
2021-09-02 17:57:58 -06:00
Adrian Wielgosik
8a77494b2f
avm2: Impl `Vector.some`
2021-09-02 17:57:58 -06:00
Adrian Wielgosik
519feb9af7
avm2: `Array.every/some` should early return
2021-09-02 17:57:58 -06:00
Adrian Wielgosik
07f979b582
avm2: `Vector.every` should early return
2021-09-02 17:57:58 -06:00
David Wendt
97e6f55110
avm2: Impl `Vector.every`
2021-09-02 17:57:58 -06:00
David Wendt
aa0946c64c
avm2: Impl `Vector.fixed`
2021-09-02 17:57:58 -06:00
David Wendt
01904acad3
tests: Add `Vector.<T>.join` tests
2021-09-02 17:57:58 -06:00
David Wendt
f255c7d577
tests: Add tests for multi-dimensional vector coercion typechecks & concatenation
2021-09-02 17:57:58 -06:00
David Wendt
841ed4b5e4
avm2: Setting to an out-of-bounds index on a growable `Vector` should grow it
2021-09-02 17:57:58 -06:00
David Wendt
238959d7f8
avm2: Impl `Vector.join` and `toString`
2021-09-02 17:57:58 -06:00
David Wendt
1ce7e4e642
avm2: `Vector` is a final class (no matter what the docs say)
2021-09-02 17:57:58 -06:00
David Wendt
ecf514969b
tests: Add a test for concatenating to lists of ES4 interfaces.
2021-09-02 17:57:58 -06:00
David Wendt
8740098e5d
tests: Recompile the `vector_es4class_concat` test
2021-09-02 17:57:58 -06:00
David Wendt
70b60d6bb4
tests: Recompile the concat test
2021-09-02 17:57:58 -06:00
David Wendt
dba9b18540
avm2: Impl `Vector.concat`
2021-09-02 17:57:58 -06:00
David Wendt
96afc5a6c2
avm2: Cache all `Vector` applications on the `Vector` class object.
...
This matches Flash Player behavior: notably, multiple applications of the same types see the same class and prototype, but different applications actually create new objects that don't share properties.
2021-09-02 17:57:58 -06:00
David Wendt
9a1b864988
tests: Add tests for `Vector.concat`
2021-09-02 17:57:58 -06:00
David Wendt
176f05a16b
tests: Recompile a handful of miscompiled tests
2021-09-02 17:57:58 -06:00
David Wendt
888fcc85ca
avm2: Impl `Vector.length`
2021-09-02 17:57:58 -06:00
David Wendt
9d08a7c299
avm2: Impl `Vector`'s instance initializer
2021-09-02 17:57:58 -06:00
David Wendt
49d79b8e73
avm2: Vector indices are stored in a package namespace
2021-09-02 17:57:58 -06:00
David Wendt
3d3b80f8af
avm2: ES3 class instances should be treated as instances of the ES4 class `Object`.
2021-09-02 17:57:58 -06:00
David Wendt
6b377bed64
avm2: Impl `apply` for ES4 classes to allow type parameterization
2021-09-02 17:57:58 -06:00
David Wendt
65a23d5833
avm2: Move applytype next to other operations that create classes
2021-09-02 17:57:58 -06:00
David Wendt
074c093504
avm2: Implement op `ApplyType`
2021-09-02 17:57:58 -06:00
David Wendt
4b021fe92c
avm2: `Vector` lives in a separate package from other globals
2021-09-02 17:57:58 -06:00
David Wendt
1711400f07
tests: Actually enable all the vector tests I've been running
2021-09-02 17:57:58 -06:00
David Wendt
74cb32dd46
avm2: Allow constructing static `TypeName`s (for naming `Vector` classes)
2021-09-02 17:57:58 -06:00
David Wendt
f6ea1b2bff
tests: Add a test for the `delete` operator
2021-09-02 17:57:58 -06:00
David Wendt
f3cf82ad5a
tests: Add test for sticking ES3 classes in a `Vector.<Object>`
2021-09-02 17:57:58 -06:00
David Wendt
7e71ecac16
avm2: Add stub impl of `Vector`
2021-09-02 17:57:58 -06:00
David Wendt
6f49e62b96
avm2: First pass on implementing vector storage
2021-09-02 17:57:58 -06:00
David Wendt
e65958cc22
tests: Add another test for subclass and superclass storage
2021-09-02 17:57:58 -06:00
David Wendt
f4dfc4d778
avm2: First pass at type-aware vector storage
2021-09-02 17:57:58 -06:00
David Wendt
2af5192893
tests: Add tests for vector holes and set coercion
2021-09-02 17:57:58 -06:00
David Wendt
9a3c4e6adb
tests: Here's a very basic test for int access
2021-09-02 17:57:58 -06:00
David Wendt
686872812d
avm2: Add a `TObject` method for applying arguments to a generic type.
2021-09-02 17:57:58 -06:00
David Wendt
fe8373739d
avm2: Add the ability to fork a `Class` to one that holds it's type arguments.
2021-09-02 17:57:58 -06:00
David Wendt
9dafddc1ae
swf: Decode and encode the `applytype` op.
2021-09-02 17:57:58 -06:00
David Wendt
86616b748f
avm2: Allow parsing generic typenames into a multiname
2021-09-02 17:57:58 -06:00
David Wendt
47e3b2229a
swf: Add support for the `TypeName` multiname type.
2021-09-02 17:57:58 -06:00
dependabot[bot]
8b665b590d
chore: Bump typescript from 4.3.4 to 4.4.2 in /web
...
Bumps [typescript](https://github.com/Microsoft/TypeScript ) from 4.3.4 to 4.4.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases )
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.3.4...v4.4.2 )
---
updated-dependencies:
- dependency-name: typescript
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2021-09-02 17:03:19 +03:00