Commit Graph

1306 Commits

Author SHA1 Message Date
David Wendt 984e701142 Swap out `has_property`'s stub impl. 2020-07-13 17:43:19 -04:00
David Wendt e5142e85e9 Replace `get_property` and `set_property` with slightly-less-stub impls. 2020-07-13 17:43:17 -04:00
David Wendt d56db06447 Implement `resolve_multiname`, sort of. 2020-07-13 17:43:16 -04:00
David Wendt 78a1c9a7e3 Implement `pushscope`, `popscope`, and `pushwith`. 2020-07-13 17:43:16 -04:00
David Wendt 5e6fc79f42 Implement `getproperty`, `setproperty` 2020-07-13 17:43:15 -04:00
David Wendt 60c16b0a60 Implement `findproperty`, `findpropstrict`, and `getlex`; which are necessary for interacting with global scope. 2020-07-13 17:43:15 -04:00
David Wendt 3c8035f871 clippy pls 2020-07-13 17:43:14 -04:00
David Wendt 12223d524a Add support methods in `Scope` to support opcodes that traverse the scope chain. 2020-07-13 17:43:14 -04:00
David Wendt 0ff1ba7120 Multiname resolution is another object method. 2020-07-13 17:43:14 -04:00
David Wendt 376d1a8ca6 Add scope support 2020-07-13 17:43:13 -04:00
David Wendt 3b476cba9e Implement `pushnamespace` since that's a value type now 2020-07-13 17:43:13 -04:00
David Wendt 1a6acb9440 Implement late binding and runtime qualifications for names. 2020-07-13 17:43:12 -04:00
David Wendt 2f3a3aff6f Add exact type assertion methods for strings and namespace values. 2020-07-13 17:43:11 -04:00
David Wendt 6d8dc6e63d Pull ABC constant pool methods out of Avm2 and into Value.
The old methods still exist and do the same thing, but the Value methods
accept arbitrary AbcFile references.
2020-07-13 17:42:51 -04:00
David Wendt c65d93d063 Implement multinames, sans runtime namespace support. 2020-07-13 17:42:50 -04:00
David Wendt 6bd94d6bc9 `from_abc_namespace` should accept a namespace index and retrieve it from the file's constant pool itself. 2020-07-13 17:42:50 -04:00
David Wendt 43f1080fab Implement namespaces as a value type 2020-07-13 17:42:49 -04:00
David Wendt 52ac7a6583 Implement call/return for bare functions 2020-07-13 17:42:49 -04:00
David Wendt 115f0393aa Add `call` method to the object trait. Only functions are callable in AVM2, all others error out. 2020-07-13 17:42:48 -04:00
David Wendt d1aeae8e02 Add support for local registers in the interpreter. 2020-07-13 17:42:47 -04:00
David Wendt 4d000e1ce0 Implement `pushxyz` opcodes for all value types that we currently support. 2020-07-13 17:42:46 -04:00
David Wendt 5600ac477c Always execute any AVM2 code that may have been queued as a result of loading ABC files. 2020-07-13 17:42:45 -04:00
David Wendt 7f60fab1e5 Add the bare minimum necessary to get opcodes out of an ABC and into an interpreter loop.
Surprisingly enough, the "bare minimum" includes a stack, object model, and values already.
2020-07-13 17:42:45 -04:00
David Wendt e80c887261 Add a very basic object model to the AVM2 interpreter. 2020-07-13 17:42:44 -04:00
David Wendt b7f257e7c8 Add a path to get from the movie clip to the Avm2. 2020-07-13 17:42:43 -04:00
David Wendt a852a6939a Add an extremely trivial implementation for the AVM2 interpreter state. 2020-07-13 17:42:31 -04:00
Nathan Adams fba8ccda81 avm1: Rename Avm1String to AvmString 2020-07-13 10:12:54 -07:00
Nathan Adams d8f043fa1a avm1: Value::coerce_to_string returns an Avm1String, as it can avoid a clone-and-reallocate 2020-07-13 10:12:54 -07:00
Nathan Adams f0ef68cb16 avm1: Reenabled paused string-value tests during string refactor 2020-07-13 10:12:54 -07:00
Nathan Adams c60b2cf4fc avm1: Implement From<&'static str> for Value 2020-07-13 10:12:54 -07:00
Nathan Adams e03e3f6c4e avm1: Allow Avm1String to contain &'static str 2020-07-13 10:12:54 -07:00
Nathan Adams ad733f2f21 avm1: Add Avm1String which wraps Gc<String> 2020-07-13 10:12:54 -07:00
Nathan Adams 016b9db3c5 avm1: Change Value::String(String) to Value::String(Gc<String>) 2020-07-13 10:12:54 -07:00
CUB3D 0591c0fe4b core: Add functions to prototypes 2020-07-12 15:25:58 -07:00
CUB3D ab022b66e9 chore: Format and cleanup clippy lints 2020-07-12 15:25:58 -07:00
CUB3D 83cca044ad core: Add tests for ContextMenu and ContextMenuItem 2020-07-12 15:25:58 -07:00
CUB3D 46cd8eb507 core: Add ContextMenuItem 2020-07-12 15:25:58 -07:00
CUB3D 04ca652f98 core: ContextMenu fully implemented 2020-07-12 15:25:58 -07:00
CUB3D 73a98c7f78 core: Implement copy() for ContextMenu 2020-07-12 15:25:58 -07:00
CUB3D f3aa6f7f01 core: Add stub of ContextMenuItem 2020-07-12 15:25:58 -07:00
CUB3D c8fefc56b5 core: Add stubs for context menu 2020-07-12 15:25:58 -07:00
dependabot-preview[bot] aaf42d1948 build(deps): bump syn from 1.0.33 to 1.0.34
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.33 to 1.0.34.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.33...1.0.34)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-12 15:01:43 -07:00
Nathan Adams 180891c58e avm1: Add impl_custom_object!() macro to simplify custom object types 2020-07-10 16:48:05 -07:00
Nathan Adams eb94cc54b2 chore: Move avm1 objects to their own module, we have plenty of them now 2020-07-10 16:48:05 -07:00
Mike Welsh 3322c2d916 avm1: Implement updateAfterEvent 2020-07-10 14:38:48 -07:00
Mike Welsh 8715589f50 tests: Add setInterval test 2020-07-10 14:38:48 -07:00
Mike Welsh 98e7da7d93 avm1: Implement setInterval 2020-07-10 14:38:48 -07:00
Mike Welsh a1ff80bb18 avm1: Object.watch is case insensitive on SWFv6 2020-07-10 12:02:26 -07:00
Nathan Adams 8a0430d744 avm1: Implement Object.watch & Object.unwatch (#268) 2020-07-10 12:02:26 -07:00
Nathan Adams ecbab536b5 avm1: Respect ScriptLimits for recursion depth, and use that in infinite_recursion_function 2020-07-08 14:47:38 -07:00