You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
goto label @ timeof(label) should probably be allowed (does not parse currently)
broken if decompilation
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_compile tests can be written
write expr_compile tests
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 difficulty label 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 &"
possibly want intrinsics for --x and ++x. (EoSD opcodes 18, 19)
call syntax :NotLikeAlice:
allow high-level Signatures 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 because ARG_{A,B,R,S} may be modified by code that uses RAND_RANGE
PCB RAND variables behave differently for int and float so _f($RAND) compiling into %RAND is not cool
zero mentions variables only readable as a single type is similar
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 Sub prefix. This goes in hand with the decision not to validate raw sub indices during compilation.
break
add to AST, probably by making ast::StmtGoto an enum
compilation
nested loops are dangerous!!
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 F and U difficulty 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 script and give them an SclScript enum
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."
Original issue contents
.....yeah. I guess I've been putting ECL off for long enough, huh?
The text was updated successfully, but these errors were encountered:
Olde ECL Tracking issue
cmp
/jmp
offsetof
andtimeof
compilationoffsetof
andtimeof
decompilationgoto label @ timeof(label)
should probably be allowed (does not parse currently)if
decompilationexpr_compile
tests can be writtenexpr_compile
testsdifficulty
label in a difficulty switch tends to end up outside of a decompiled blockcargo test --test=integration_suite -- --ignored
)$REG[-10009] = 240 / 6;
(10 & ($I2 + 3))
should produce an error with two spans, "$I2 is not const" and "const required because no instruction exists for&
"--x
and++x
. (EoSD opcodes 18, 19)allow high-levelSignature
s to have params that expect const argsARG_
in PCB. Important becauseARG_{A,B,R,S}
may be modified by code that usesRAND_RANGE
RAND
variables behave differently for int and float so_f($RAND)
compiling into%RAND
is not coolif (--X > 0) goto label;
Sub
prefix. This goes in hand with the decision not to validate raw sub indices during compilation.break
ast::StmtGoto
an enumT(_)
offsetof(label)
in a time argument or vice versa. I've made this mistake numerous times myself...--no-diff-switches
conditional call syntax. Or not. Not is definitely an option.F
andU
difficulty flags by looking at things that depend on them{"-F"}
evaluating to having no ENHL flags seems like a bad footgun...script
and give them an SclScriptenum
Bench results (OLD = 57e0528, NEW = d780f5d), 23.1GB free on SSD
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."
Original issue contents
.....yeah. I guess I've been putting ECL off for long enough, huh?
The text was updated successfully, but these errors were encountered: