-
-
Notifications
You must be signed in to change notification settings - Fork 816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: Add a (known failing) Dictionary weak key test #18132
tests: Add a (known failing) Dictionary weak key test #18132
Conversation
ff7be1e
to
070d36e
Compare
How much do we care about the AS source not being easily accessible without proprietary tools? Not much, given that ffdec (JPEXS Free Flash Decompiler) exists...? |
The AS in the SWF decompiles to this in JPEXS: package test_fla
{
import adobe.utils.*;
import flash.accessibility.*;
import flash.desktop.*;
import flash.display.*;
import flash.errors.*;
import flash.events.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.globalization.*;
import flash.media.*;
import flash.net.*;
import flash.net.drm.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.sensors.*;
import flash.system.*;
import flash.text.*;
import flash.text.engine.*;
import flash.text.ime.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip
{
public var d:*;
public var count:*;
public var value:*;
public var i:*;
public var o:*;
public function MainTimeline()
{
super();
addFrameScript(0,this.frame1,1,this.frame2,2,this.frame3,3,this.frame4);
}
internal function frame1() : *
{
this.d = new Dictionary(true);
this.obj1 = {};
this.obj2 = {};
this.obj3 = {};
this.obj4 = {};
this.obj5 = {};
this.d[this.obj1] = 0;
this.d[this.obj2] = 1;
this.d[this.obj3] = 2;
this.d[this.obj4] = 3;
this.d[this.obj5] = 4;
this.counter = 0;
this.d = this.d;
}
internal function frame2() : *
{
this.count = 0;
for each(this.value in this.d)
{
++this.count;
}
trace(this.count);
if(this.counter)
{
return;
}
this.obj1 = null;
this.obj3 = null;
this.obj5 = null;
}
internal function frame3() : *
{
if(this.counter >= 20)
{
this.counter = 0;
gotoAndStop(2);
return;
}
for(this.i = 0; this.i <= 300; ++this.i)
{
this.o = new Object();
}
++this.counter;
}
internal function frame4() : *
{
gotoAndPlay(3);
}
}
} I guess it's straightforward enough... |
I tried rebasing the implementation before I commented on that issue but had the same issues as you probably did. I don't know how Ruffle (or Rust, for that matter) works well enough to implement it from scratch. |
Nice to have, not critical if the (actual-)source isn't available. Sometimes it's not due to the swf being crafted by hand (usually via ffdec) |
070d36e
to
20fc3bd
Compare
I salvaged this from #10069.
Seems like the other half of that didn't ever land. I tried to rebase the implementation too, but things look so much different now, that I haven't managed to do it.