Commit Graph

2575 Commits

Author SHA1 Message Date
dependabot-preview[bot] ee2222a425 build(deps): bump indexmap from 1.4.0 to 1.5.0
Bumps [indexmap](https://github.com/bluss/indexmap) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Commits](https://github.com/bluss/indexmap/compare/1.4.0...1.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-17 20:51:05 -07:00
dependabot-preview[bot] 62f751c6ee build(deps-dev): bump @wdio/local-runner from 6.3.0 to 6.3.3 in /web
Bumps [@wdio/local-runner](https://github.com/webdriverio/webdriverio) from 6.3.0 to 6.3.3.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v6.3.0...v6.3.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-17 20:50:20 -07:00
dependabot-preview[bot] cbe3176d5e build(deps-dev): bump @wdio/cli from 6.3.0 to 6.3.3 in /web
Bumps [@wdio/cli](https://github.com/webdriverio/webdriverio) from 6.3.0 to 6.3.3.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v6.3.0...v6.3.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-17 20:50:11 -07:00
dependabot-preview[bot] 76ef74809b build(deps-dev): bump @wdio/sync from 6.3.0 to 6.3.3 in /web
Bumps [@wdio/sync](https://github.com/webdriverio/webdriverio) from 6.3.0 to 6.3.3.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v6.3.0...v6.3.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-17 20:49:47 -07:00
dependabot-preview[bot] c1a8d9c22c build(deps): bump wasm-bindgen-test from 0.3.14 to 0.3.15
Bumps [wasm-bindgen-test](https://github.com/rustwasm/wasm-bindgen) from 0.3.14 to 0.3.15.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-17 20:49:26 -07:00
Mike Welsh 8ecae5a87f avm1: duplicateMovieClip copies clip events
Clip events should be copied from the source clip to the newly
created clip. Fixes objects remaining onscreen in #815.
2020-07-17 20:49:05 -07:00
Mike Welsh 8c1ec01d75 tests: Test clip events copying in duplicateMovieClip
duplicateMovieClip should also copy any clip events on the source
clip to the newly created movie clip.
2020-07-17 20:49:05 -07:00
Mike Welsh 9d3bb5b10c docs: Add CONTRIBUTING blurb and code of conduct 2020-07-17 20:44:40 -07:00
Mike Welsh 356546397a docs: Update sponsors; move sponsor logos to ruffle.rs 2020-07-17 20:34:44 -07:00
dependabot-preview[bot] 294ea0fd52 build(deps-dev): bump @wdio/cli from 6.2.0 to 6.3.0 in /web
Bumps [@wdio/cli](https://github.com/webdriverio/webdriverio) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v6.2.0...v6.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-17 01:54:50 +00:00
dependabot-preview[bot] 8cbfe2062c build(deps-dev): bump @wdio/sync from 6.2.0 to 6.3.0 in /web
Bumps [@wdio/sync](https://github.com/webdriverio/webdriverio) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v6.2.0...v6.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-17 01:25:24 +00:00
dependabot-preview[bot] ff46d53043 build(deps-dev): bump @wdio/local-runner from 6.2.0 to 6.3.0 in /web
Bumps [@wdio/local-runner](https://github.com/webdriverio/webdriverio) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v6.2.0...v6.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-17 00:33:41 +00:00
dependabot-preview[bot] d2b723fcb3 build(deps-dev): bump @wdio/spec-reporter from 6.1.23 to 6.3.0 in /web
Bumps [@wdio/spec-reporter](https://github.com/webdriverio/webdriverio) from 6.1.23 to 6.3.0.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v6.1.23...v6.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-17 00:33:02 +00:00
dependabot-preview[bot] c1cf5a4251 build(deps-dev): bump @wdio/mocha-framework from 6.2.0 to 6.3.0 in /web
Bumps [@wdio/mocha-framework](https://github.com/webdriverio/webdriverio) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/compare/v6.2.0...v6.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-17 00:32:51 +00:00
dependabot-preview[bot] f6ed3a2011 build(deps): [security] bump lodash from 4.17.15 to 4.17.19 in /web
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. **This update includes a security fix.**
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-16 16:42:20 -07:00
dependabot-preview[bot] 182c9ed869 build(deps): bump web-sys from 0.3.41 to 0.3.42
Bumps [web-sys](https://github.com/rustwasm/wasm-bindgen) from 0.3.41 to 0.3.42.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-16 16:40:47 -07:00
dependabot-preview[bot] 195a53c15e build(deps): bump wasm-bindgen-futures from 0.4.14 to 0.4.15
Bumps [wasm-bindgen-futures](https://github.com/rustwasm/wasm-bindgen) from 0.4.14 to 0.4.15.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-16 16:40:36 -07:00
dependabot-preview[bot] 7dd26bf771 build(deps): bump js-sys from 0.3.41 to 0.3.42
Bumps [js-sys](https://github.com/rustwasm/wasm-bindgen) from 0.3.41 to 0.3.42.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-15 11:52:53 -07:00
dependabot-preview[bot] b1f704b415 build(deps): bump wasm-bindgen from 0.2.64 to 0.2.65
Bumps [wasm-bindgen](https://github.com/rustwasm/wasm-bindgen) from 0.2.64 to 0.2.65.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/compare/0.2.64...0.2.65)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-15 11:51:09 -07:00
Mike Welsh 7c52a1bcc4 avm1: Accept path strings in ActionCall (fix #832) 2020-07-14 23:34:21 -07:00
Mike Welsh b43fdca4ad avm1: resolve_text_field_variable -> resolve_variable_path 2020-07-14 23:34:21 -07:00
Mike Welsh f9b1c586d1 tests: Add test for paths in ActionCall 2020-07-14 23:34:21 -07:00
David Wendt e354c53075 Remove any remaining uses of `abc_ref`.
Holding a `Ref` on a garbage-collected object inherently extends any borrow locks on that object. Since ABC files are references already, taking a `Ref` to them only helps to skip the refcount update. This is less useful than expected: in most situations, using `abc_ref` causes double-borrow panics. The few methods that can use it are going to be fragile in the face of future refactors, so I'm nipping the problem in the bud now.
2020-07-14 20:14:23 -04:00
David Wendt f4c5075086 Run all string constant retrieval through the `TranslationUnit`, preventing us from making multiple copies of the same string.
For good measure, most of the other methods in `value` for retrieving pool primitives now also use `TranslationUnit` instead of `AbcFile`. This is the result of a handful of cascading changes throughout the project, and itself caused a few more.
2020-07-14 20:05:25 -04:00
JustinCB 4f755eafff web: Add tests for new behaviour 2020-07-14 09:12:36 -07:00
JustinCB 8495e89a8b web: Match case-insensitively in embeds 2020-07-14 09:12:36 -07:00
JustinCB 64c7d6e393 web: Polyfill if data attribute or movie param is a swf filename 2020-07-14 09:12:36 -07:00
JustinCB ffba4c5a97 web: Match MIME type & clsid case-insensitively 2020-07-14 09:12:36 -07:00
David Wendt 70e9e7e9e9 Add support for cached/interned pool strings in the `TranslationUnit`. 2020-07-13 23:42:07 -04:00
David Wendt e1b9b823fc Remove `abc_string` and replace it with `abc_string_copy`. All code that pulls strings from the ABC file now uses `AvmString`s. 2020-07-13 23:41:46 -04:00
David Wendt 61a3ff8ae6 Replace `String` or `&str` references with `AvmString` everywhere in the AVM2 runtime. 2020-07-13 22:21:18 -04:00
David Wendt 2021cec9d3 Impl `Copy`, `Eq`, `PartialOrd`, `Ord`, and `Hash` for `AvmString`. 2020-07-13 22:09:34 -04:00
David Wendt 508fcd6e9e `pool_string` should return a `Ref<str>` just like `value::abc_string`. 2020-07-13 17:45:12 -04:00
David Wendt a406bdada2 Don't attempt to log debugging information if we're not in a debug build. 2020-07-13 17:45:12 -04:00
David Wendt ae26615bb4 `coerce_string` may return a static string, which we shouldn't clone. 2020-07-13 17:45:12 -04:00
David Wendt f0c633fe81 Allow borrowing string values from an ABC file instead of cloning everything. 2020-07-13 17:45:11 -04:00
David Wendt 64e5b46259 Add tests for `instanceof` and `is` operators. 2020-07-13 17:45:10 -04:00
David Wendt 39a4566f20 Instances should be listed as their prototypes (empty as they are) 2020-07-13 17:45:10 -04:00
David Wendt c917b3d411 Implement `istype`, `istypelate`, and `instanceof`. 2020-07-13 17:45:10 -04:00
David Wendt a0cb052795 Add `is_instance_of` trait method to `TObject` 2020-07-13 17:45:09 -04:00
David Wendt 3fae8b3832 Read the interface list when instantiating classes, resolve them, and stick them in the prototype for later use. 2020-07-13 17:45:09 -04:00
David Wendt cce68dbc21 Add trait methods for getting and setting the interfaces list. 2020-07-13 17:45:08 -04:00
David Wendt 563a515189 Add a test for loading interfaces into the AVM2.
This test will fail if the AVM2 implementation does not support bodyless methods or bare classes properly.
2020-07-13 17:45:07 -04:00
David Wendt 8f2d3315f3 Allow the construction of classes with no base class.
This is primarily used for interfaces, in case you can't guess by the previous commit.
2020-07-13 17:45:07 -04:00
David Wendt 5d89d4ed85 Allow methods to not hold a body.
Interface methods are specifically not allowed to be called: as a result, they don't get a method body. Existing code assumed a 1:1 relationship between methods and bodies, which causes spurious errors.
2020-07-13 17:45:07 -04:00
David Wendt 090fe56bd3 Wrap `BytecodeMethod` (and the bytecode half of `Executable`) in a `Gc`.
This is inspired by Dinnerbone's similar PR on the AVM1 side, where the Action half of that VM's `Executable` was reduced from 128 bytes to 16 by shoving it in a `Gc`. This won't be as dramatic but should still save some memory.

In fact, it should save a *lot* of memory in bytecode execution, where thanks to the previous commit's rebase, we now need to clone the current method once *for each instruction executed*. That is terrible, but should stop now.
2020-07-13 17:45:06 -04:00
David Wendt 97e005622b Invert the role of `Avm2` and it's `Activation`, similar to what was done with `Avm1` and it's `Activation`.
This also results in a far reduced role for `ReturnValue`, since I also took the liberty of removing most of it's use. Furthermore, I also made it apply equally to native and AVM2 code, which ensures all native implementations of methods don't double-borrow.

In AVM1, `ReturnValue` was actually removed entirely, because it's not needed. I attempted to do the same, but the fact that we're currently embedding `ScriptObjectData` in native objects means that we need it for virtual properties. Otherwise, virtual property implementations will see locked objects, which is bad.
2020-07-13 17:45:06 -04:00
David Wendt 5b5bf0719e Remove `Avm2Function` as it is no longer used. 2020-07-13 17:45:05 -04:00
David Wendt 098b034de0 Refactor method-related structs into a separate method module.
This also renames `NativeFunction` and `Avm2MethodEntry` to `NativeMethod` and `BytecodeMethod`, respectively.
2020-07-13 17:45:05 -04:00
David Wendt b6e05519cd Remove `Avm2ClassEntry`. It is no longer used. 2020-07-13 17:45:05 -04:00