Age | Commit message (Collapse) | Author |
|
extras is no longer required to build.
|
|
|
|
This breaks the build until labels are exported again!
|
|
This is about to be removed, but it may as well work first.
|
|
|
|
|
|
|
|
|
|
|
|
Note that gbz8disasm doesn't work at the moment.
|
|
|
|
Conflicts:
preprocessor.py
Also bump the extras submodule to a version of pokemontools with a
suitable version of the preprocessor. The changes from 'master' for
preprocessor.py have been inserted into pokemontools prior to the
submodule bump.
|
|
Preprocessor performance improvements.
This recliams 0.4 seconds.
|
|
|
|
|
|
Jump out of read_line early if the line is an empty string or a newline.
|
|
Also, don't call make_macro_table 2000 times by only calling it once and
passing the result.
|
|
This moves out from macro_translator the macro/param length sanity check
into a function called check_macro_sanity.
|
|
|
|
|
|
Remove the "macros" global and instead use a function to construct a
list of macros.
|
|
|
|
AssertionError -> PreprocessorException
|
|
A more specific exception means that error handling can actually work in
the future.
|
|
|
|
Use a MacroException instead of an AssertionError.
|
|
These are basic python Exception subclasses that can be used to throw
more specific errors and exceptions from within the preprocessor.
AssertionError is not a good idea.
|
|
|
|
|
|
It wasn't meant to be left in there anyway.
|
|
It's not required.
see #178
|
|
The preprocessor no longer has the concept of skippable_macros and now
always skips any line that starts with "db" or "dw" because neither of
these should be treated as macros.
fixes #178
|
|
This is to fix the preprocessor temporarily. Maybe ItemFragment can be
removed completely.
|
|
Only pokecrystal-specific preprocessor stuff lives in preprocessor.py
now. The other stuff lives in pokemontools.
|
|
|
|
Macros are now passed around as lists and dicts.
|
|
This removes TextEndingCommand from the preprocessor. Instead, there is
a generic concept of a skippable type of macro like "db".
This adds SkippableMacro to the preprocessor.
|
|
Ideally the macro classes will be removed from the preprocessor core
soon, there's no reason they should be infecting these functions.
|
|
It didn't belong in there. All of the references were removed.
|
|
|
|
This updates the preprocessor to just look for a from_asm method on the
class for the parameter it's processing. If there's a from_asm method,
then it uses it to spit out the right asm.
|
|
The preprocessor should ideally have no special cases for macros at all
in the first place. But it does. This one doesn't seem to be necessary.
|
|
|
|
I am surprised this worked. Maybe it's not actually working, and I just
have cached files everywhere.
|
|
|
|
|
|
|
|
|
|
this fixes a lot of previous hacks
first off, rgbds requires that labels from includes be marked as globals.
instead, 3626ddeb stuffed includes into the parent file in the preprocessor.
this meant one huge file got preprocessed every time, adding an additional
ten seconds to compile time.
running the preprocessor once for each file would create too much overhead,
so a list is fed into prequeue.py, which then makes calls to preprocessor.py.
this paves the way for compiling source files separately some day.
next, compiling previously required `make clean` to be executed first.
f3340de6 touched main.asm to force a fresh compile instead. this behavior
has been reverted. now, `make all` will only attempt to recompile if a
source file has changed.
preprocessor.py has some marginal changes. prequeue.py is created to keep
the original functionality of preprocessor.py intact. so many files are
preprocessed on first compile (1951 as of this commit) that the prequeue
call has been hidden.
compile time is reduced to 15-30 seconds on first compile, and 5-10 seconds
subsequently. the majority of this time is spent in rgbasm.
|
|
|