- The A_Jump family of action functions now return the state to jump
to (NULL if no jump is to be taken) instead of jumping directly.
It is the caller's responsibility to handle the jump. This will
make it possible to use their results in if statements and
do something other than jump.
- DECORATE return statements can now return the result of a function
(but not any random expression--it must be a function call). To
make a jump happen from inside a multi-action block, you must
return the value of an A_Jump function. e.g.:
{ return A_Jump(128, "SomeState"); }
- The VMFunction class now contains its prototype instead of storing
it at a higher level in PFunction. This is so that
FState::CallAction can easily tell if a function returns a state.
- Removed the FxTailable class because with explicit return
statements, it's not useful anymore.
This requires quite a bit more thorough cleanup. I got it to the point where the titlepic appears after restarting, but it still crashes when starting the game so there's more data that needs to be cleaned up...
- Fixed: PType::FindConversion() gave all but the source type a distance of
0, so it only ever returned just one step of a route that requires more
than one step.
- PType::FindConversion() can find a path to convert one type to another.
This is completely generic and can handle any number of conversion
functions.
- I can't believe I completely forgot to let the parser handle true and
false literals.
- Consolidate all the %include blocks in zcc-parse.lemon into a single
one, because Lemon all of a sudden decided it didn't like me having more
than one in the grammar file.
- Added a PBool type to represent boolean values with.
- Added TypeVoid for statements, which produce no type.
- Added TypeError for expressions whose arguments are incompatible.
- Pointers now derive from PBasicType instead of PInt. Since they have their own register sets in the VM, this seems to make more sense than treating them as integers.
- Constants can be strings, but the existing PSymbolConst couldn't handle
them. The old PSymbolConst is now PSymbolConstNumeric, and the new
PSymbolConst is a now a baseclass for it and PSymbolConstString.
- The type systems used by PField and FxExpression are completely
incompatible, but I think I got the differences taken care of as far
as ParseNativeVariable(), ParseUserVariable(), and FxClassMember are
concerned.
- Support for declaring native bool variables has been removed for the time
being. It wasn't used anyway.
- Removed PSymbolVariable.
- For Prototypes, Hash is passed the address of two TArrays. If we blindly
hash those without checking their contents, then we can forget about
ever finding any matching prototypes in the type table. (Not that I
remember why I wanted them to be unique, but I'm sure I must have had my
reasons.)
become ungodly slow when using mods with complex DECORATE. The GCC debug builds run just
fine, however. Hopefully this is something that can be fixed later with an assembly-optimized
version of the main VM loop, because I don't relish the thought of being stuck with GDB
for debugging.)
- Fixed: The ACS_Named* action specials were erroneously defined as taking strings instead of
names.
- Fixed: Copy-paste error caused FxMultiNameState::Emit to generate code that called
DecoNameToClass instead of DecoFindMultiNameState.
- Updated FxActionSpecialCall::Emit for named script specials.
- Fixed inverted asserts for FxMinusSign::Emit and FxUnaryNotBitwise::Emit.
SVN r3893 (scripting)
me realize I would be better off creating a type-agnostic AST for the entire input instead
of trying to tentatively create types before they're seen.)
SVN r2354 (scripting)
instead of PClass::m_Types (now PClass::AllClasses).
- Removed ClassIndex from PClass. It was only needed by FArchive, and maps take care of the
problem just as well.
- Moved PClass into a larger type system (which is likely to change some/lots once I try and actually use it and have a better feel for what I need from it).
SVN r2281 (scripting)