-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Olde ECL Tracking issue
- Timeline arg0 comp and decomp
- EoSD args
- split
cmp/jmp- split intrinsic decompilation and compilation
-
offsetofandtimeofcompilation -
offsetofandtimeofdecompilation -
goto label @ timeof(label)should probably be allowed (does not parse currently)
- broken
ifdecompilation - add rest of intrinsics for EoSD
- test register allocation in EoSD
- compile AssignOp syntax
- decompile AssignOp syntax?
- find nicer difficulty flag syntax
- difficulty switches
- compile simple
- compile complex
- decide on semantics in abstract tree. Most importantly, are mismatched lengths allowed within an expression?
- support difficulty in AST VM so that
expr_compiletests can be written - write
expr_compiletests - decompile
- maybe find out what the four upper bits do in IN where it does funny things for familiars, idfk
- from dai: bits 5 and 6 in the difficulty mask in IN are for focused/unfocused respectively. It's how Keine's attacks change depending whether you're focusing or unfocused
- Look into behavior of unused flags:
- ALL games use 0xFF for most instructions
- EOSD, PCB use just 0x01 for easy, 0x02 for normal (unused flags get cleared)
- IN onwards use 0xF1 for easy, 0xF2 for normal (unused flags stay active)
- in TD, two more bits become "used" for extra and overdrive
- fix the way that the first
difficultylabel in a difficulty switch tends to end up outside of a decompiled block - Bring back warning on blob len not divisible by 4 but be lenient to decompiled EoSD somehow, idfk
- Fix the error when printing a null span from a core mapfile (
cargo test --test=integration_suite -- --ignored) - fix lack of round-tripping
$REG[-10009] = 240 / 6;- idea for capabilities: something like
(10 & ($I2 + 3))should produce an error with two spans, "$I2 is not const" and "const required because no instruction exists for&"
- idea for capabilities: something like
- possibly want intrinsics for
--xand++x. (EoSD opcodes 18, 19) - call syntax :NotLikeAlice:
-
allow high-levelSignatures to have params that expect const args - warn on footgunny usage of I0 and F0 inside a function body with a named parameter in EoSD
- similar for
ARG_in PCB. Important becauseARG_{A,B,R,S}may be modified by code that usesRAND_RANGE
-
- PCB
RANDvariables behave differently for int and float so_f($RAND)compiling into%RANDis not cool - EoSD doesn't cast. Add warnings on cast operators. There isn't much you can do about mismatched sigils though...? (they DO happen)
- th07
- calls
- th08
- th09
- th095
- benchmark!!!!! especially with all that intrinsic stuff
- see below, intrinsic stuff needs work
- loops are apparently semantically equivalent to
if (--X > 0) goto label;- this has some serious implications for roundtrippability...
- helpful error messages will be needed when using the wrong syntax for the current language
- Finish local stash with tests. There's an unfortunate bit where a trick used to simplify alias analysis ends up ruining the suggestions.
- if you decompile a sub number that's out of range it shouldn't add the
Subprefix. This goes in hand with the decision not to validate raw sub indices during compilation. -
break- add to AST, probably by making
ast::StmtGotoan enum - compilation
- nested loops are dangerous!!
- add to AST, probably by making
- IN has no timeline arg0 and EoSD timelines have no difficulty
- IN timeline signatures shouldn't error when there's no
T(_) - IN Difficulty switches don't decompile due to contiguous flags check; instead, the default-enabled flags should be checked to match and they should be present on the pulled-out instruction
- warn when using
offsetof(label)in a time argument or vice versa. I've made this mistake numerous times myself... -
--no-diff-switches - IN core signatures
-
conditional call syntax. Or not. Not is definitely an option. - Double check names of
FandUdifficulty flags by looking at things that depend on them -
{"-F"}evaluating to having no ENHL flags seems like a bad footgun... - importing ANM files
- might want syntax for different sub types
Weird idea, but could it possibly make sense to split up the current concept of a "function"? It seems like a lot of the potential ECL sub jank is mutually exclusive depending on how the sub is used:
- Only regular calls and new engine asyncs can have arguments.
- Only regular calls and interrupts can use return without breaking horribly.
- Only regular calls can return values.
- Only callbacks and old engine asyncs can reuse the current context in a different sub.
- Only subs used with enemy_create can inherit register values from a parent enemy.
Because of how little overlap there is between the different types of sub, it seems like a good idea to error/warn if the types are mismatched in certain ways.
- change timelines to use
scriptand give them an SclScriptenum
Bench results (OLD = 57e0528, NEW = d780f5d), 23.1GB free on SSD
./update-dumps.py --anm --game 095:18 --noverify
OLD 1 OLD 2 NEW 1 NEW 2
anm-compile 72.209 72.112 73.333 73.357
anm-decompile 127.906 128.097 128.076 128.371
Not the best benchmark because it includes the time of copying uncompressed bitmaps (which often won't be the case for users), but the difference seems "measurable."
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request

