vscode-as3mxml icon indicating copy to clipboard operation
vscode-as3mxml copied to clipboard

AVM2 special operations not detected

Open hydroper opened this issue 2 years ago • 1 comments

Errors such as:

Definition avm2.intrinsics.memory.li32 could not be found.

occur using the avm2.intrinsics package. But the project compiles fine with asconfigc; any idea?

Here's my asconfigc.json:

{
    "config": "air",
    "type": "app",
    "files": [
        "src/org/agera/crypto/worker/CryptoWorker.as"
    ],
    "application": "app.xml",
    "compilerOptions": {
        "debug": true,
        "omit-trace-statements": false,
        "source-path": ["src"],
        "library-path": ["libs"],
        "output": "build/org.agera.crypto.worker.swf"
    }
}

hydroper avatar Jan 05 '24 14:01 hydroper

as3mxml-vscode's cod intelligence doesn't necessarily use the same compiler that gets called by asconfigc, so that's why you see it succeed with asconfigc, but see an error in VSCode. It appears that vscode-as3mxml doesn't know how to find the avm2.intrinsics package. I would have assumed that it's defined in playerglobal.swc (or another .swc) in the SDK, but perhaps not. Maybe Adobe's ASC 2.0 compiler hard-codes these functions. If that's the case, then the Royale compiler used by vscode-as3mxml would need to be modified to support them.

Regardless, it is safe to ignore the error for now, since asconfigc compiles successfully.

joshtynjala avatar Jan 05 '24 16:01 joshtynjala