Commit Graph

5460 Commits

Author SHA1 Message Date
David Wendt b07ad8070c avm2: Make `get_property`, `set_property`, `init_property`, and various other derivative methods take a `Multiname` and run the search inside `Object`.
This also introduces a `call_property` method.
2021-09-23 15:59:06 -06:00
David Wendt 945cb2c4bf avm2: Global class inheritance issues should report which class cannot be found 2021-09-23 15:59:06 -06:00
David Wendt 8f8134e4f4 avm2: Add private instance slots for `FrameLabel`'s properties 2021-09-23 15:59:06 -06:00
David Wendt 5ba2421225 avm2: Add private instance slots for `Scene`'s properties 2021-09-23 15:59:06 -06:00
David Wendt 97924d20ad avm2: Add private instance slots for `Point`'s properties 2021-09-23 15:59:06 -06:00
David Wendt dfc90984dc avm2: Add private instance slots for `Rectangle`'s properties 2021-09-23 15:59:06 -06:00
David Wendt 81da1aad4b avm2: `Video` is not a subclass of `flash.media.DisplayObject` (which doesn't exist) 2021-09-23 15:59:06 -06:00
EmperorBale 1874223224 avm2: Remove ignore_next 2021-09-23 00:01:50 +02:00
EmperorBale 31abe5d9d7 avm2: Specify that date should coerce to string by default 2021-09-23 00:01:50 +02:00
EmperorBale 64eb47a65c avm2: Remove YearType 2021-09-23 00:01:50 +02:00
EmperorBale b4fe77394d tests: Write tests 2021-09-23 00:01:50 +02:00
EmperorBale bd6ca72510 avm2: Implement Date.parse 2021-09-23 00:01:50 +02:00
EmperorBale 10be7ef3bf avm2: Implement toUTCString 2021-09-23 00:01:50 +02:00
EmperorBale 292a9bda4b avm2: Implement toLocaleString, toLocaleTimeString, toDateString, toLocaleDateString 2021-09-23 00:01:50 +02:00
EmperorBale b9fd7f5977 avm2: Implement toString, toTimeString 2021-09-23 00:01:50 +02:00
EmperorBale 931080cd49 avm2: Implement valueOf 2021-09-23 00:01:50 +02:00
EmperorBale aca23b744e chore: Appease clippy 2021-09-23 00:01:50 +02:00
EmperorBale 7f8e01b426 avm2: Implement UTC 2021-09-23 00:01:50 +02:00
EmperorBale 453486265f avm2: Implement timezoneOffset 2021-09-23 00:01:50 +02:00
EmperorBale 0732efc9d9 avm2: Impement day, dayUTC 2021-09-23 00:01:50 +02:00
EmperorBale fe584f7508 chore: Fix typos 2021-09-23 00:01:50 +02:00
EmperorBale 97da4d1b7b avm2: Implement UTC variants 2021-09-23 00:01:50 +02:00
EmperorBale 0dc0bc9694 avm2: Implement month, fullYear 2021-09-23 00:01:50 +02:00
EmperorBale 273ae48654 avm2: Refactor date implementation 2021-09-23 00:01:50 +02:00
EmperorBale 6ab0d89040 avm2: Implement minutes, hours, date 2021-09-23 00:01:50 +02:00
EmperorBale d5621c1ce7 avm2: Implement time, seconds, milliseconds 2021-09-23 00:01:50 +02:00
EmperorBale 32eb9d1579 avm2: Implement Dates instance initializer 2021-09-23 00:01:50 +02:00
EmperorBale db550b035c avm2: Add Date stub 2021-09-23 00:01:50 +02:00
relrelb 3463e50a72 avm1: Avoid `impl Into<Value<'gc>>` parameter in `Avm1::push`
This might create templatized functions leading to unnecessary code bloat.

So instead use just `Value<'gc>` parameters and add `.into()` in callers
where needed.
2021-09-22 23:13:13 +02:00
kmeisthax 42275f43f3 avm2: Properly make all classes an instance of `Class`. (#57)
* avm2: Properly make all classes an instance of `Class`.

Also, does this technically mean that `Class` is a metaclass?

* avm2: Remove `Function::from_method_and_proto` as it will no longer be needed

* avm2: Ensure builtin classes are also instances of `Class`.

This requires tying a veritable gordian knot of classes; everything needs to be allocated up-front, linked together, and then properly initialized later on. This necessitated splitting the whole class construction process up into three steps:

1. Allocation via `from_class_partial`, which does everything that can be done without any other classes
2. Weaving via `link_prototype` and `link_type`, which links all of the allocated parts together correctly. This also includes initializing `SystemClasses` and `SystemPrototypes`.
3. Initialization via `into_finished_class`, which must be done *after* the weave has finished.

Once complete you have core classes that are all instances of `Class`, along with prototypes that have their usual legacy quirks.

Note that this does *not* make prototypes instances of their class. We do need to do that, but doing so breaks ES3 legacy support. This is because we currently only work with bound methods, but need to be able to call unbound methods in `callproperty`.

* tests: Add a test for all core classes' instance-of relationships
2021-09-22 00:29:37 +02:00
Adrian Wielgosik f8c32d3a68 avm2: Fix get_own_class_definition users to use either instance_of or as_. 2021-09-22 00:29:37 +02:00
Adrian Wielgosik 71e41e2c92 chore: cargo fmt 2021-09-22 00:29:37 +02:00
Adrian Wielgosik 22482ed080 avm2: Remove unwrap in get_own_class_definition 2021-09-22 00:29:37 +02:00
Adrian Wielgosik 7736818069 avm2: Rename as_class -> get_own_class_definition 2021-09-22 00:29:37 +02:00
Adrian Wielgosik 26e60fa8ea avm2: Rename as_class_object_really -> as_class_object 2021-09-22 00:29:37 +02:00
Adrian Wielgosik 008162c514 avm2: Replace all uses of as_class_object by instance_of 2021-09-22 00:29:37 +02:00
Adrian Wielgosik 4b7f8b3dbd avm2: inner_class_definition is not an Option 2021-09-22 00:29:37 +02:00
Adrian Wielgosik 3e1764aa1e avm2: Reimplement as_class_object() in terms of other methods 2021-09-22 00:29:37 +02:00
Adrian Wielgosik e02feb919a avm2: Reimplement as_class() in terms of other methods 2021-09-22 00:29:37 +02:00
Adrian Wielgosik 4380978b2a avm2: Move instance_allocator() to ClassObject 2021-09-22 00:29:37 +02:00
Adrian Wielgosik 1d22009c6b avm2: Drop seemingly-unused set_class_object() 2021-09-22 00:29:37 +02:00
Adrian Wielgosik f3ab6c9da3 avm2: Move as_class_params() to ClassObject 2021-09-22 00:29:37 +02:00
Adrian Wielgosik 0679fd1a9e amv2: Move superclass_object() to ClassObject 2021-09-22 00:29:37 +02:00
Adrian Wielgosik 2dfa875712 avm2: Move interfaces to ClassObject 2021-09-22 00:29:37 +02:00
Chris Midgley 7f09e751a1
dev: have required builds 'run' (#5332)
* dev: have required builds 'run'

* dev: remove unnecessary fields

* dev: do less in the no-op step
2021-09-21 21:01:51 +02:00
Chris Midgley 898d8df9a8 fix: firefox_unsigned, not firefox-unsigned 2021-09-21 20:57:40 +02:00
Chris Midgley dd58bbf17b fix: correct working directory for firefox signing 2021-09-21 20:10:20 +02:00
Chris Midgley 5ee34ef1ed chore: remove extraneous brackets in if 2021-09-21 20:10:20 +02:00
Chris Midgley 29111db9f3 dev: correct names of steps 2021-09-21 20:10:20 +02:00
Chris Midgley f276712c2c dev: allow for failure of firefox signing in build nightly 2021-09-21 20:10:20 +02:00