JPEXS Free Flash Decompiler Issue Tracker

If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler

NEW : We have got a new blog where we post some interesting SWF internals info.

List of issuesList of issues

#2081 error on compile with object literal
Author: user 3plus4i
Date created:
Type: question
Visibility: Everybody
Assigned to:
State: opened Help

> What steps will reproduce the problem? I can't say for sure what actually causes the error, but what I tried to do was assigning an object literal inside other curly brackets. When I try to save I get the error in the attached image. > What is the expected output? What do you see instead? Not sure what to write here. An object declaration that should work. Unless I mad another mistake, but the brackets do match up and the highlighting in the editor also recognizes them correctly. > What version of the product are you using? Is it "nightly build"? Which operating system do you have? 18.5.0 Linux > Please provide any additional information below. If the problem is related to a SWF file, attach it here, otherwise we can't help you. I'll also add the class initializer in which the error occurred
admin
I think this is correct version: this.dungeons[i] = {entered: 0, failed: 0};
State: new→opened
Type: bug→question
user
Huh, I'll try that. Using the constructor worked as well, but I've learned that a literal is executed faster. Not that it would matter in this specific case.
user
Yeah, it works. Why does the compiler replace the for loop with a while loop though, isn't that significantly slower? I only did some shallow research on efficient coding though.
admin
the for loop is just while loop with some init / precontinue parts, the p-code is equivalent, it cannot be distinguished while decompiling. It is not slower. FFDec decompiles loops as fors only when there is continue/break logic that it can't be any other variant.
user
I see, so I don't need to worry about that part. I actually tested the code now to see whether it runs as well, and the for loop doesn't seem to be executed at all. I used the constructor with the number of elements, can I not iterate over an array while it's elements are empty? Trying to research that now.
admin
I am not sure I understand. Could you provide a sample code of what you trying to do again? Also, I don't want to be a teacher of ActionScript, I guess some basic knowledge of AS should be required to use FFDec. I am only interested if I can fix some bugs in FFDec...
user
Makes sense. I should find a community for such questions and talking.