This change fixes an issue with method declarations where the SyncLevel
term is a ByteConstExpr, but if a Type3 opcode was used, it would not
be evaluated properly.
This is an interim fix for this single case, specifically to allow the
ASLTS test to run properly.
However, it does not address the general case where parse tree transforms
are applied before the constant folding is performed. In this case, the
SyncLevel is merged with the NumArgs and SerializedFlag to generate a
raw data byte before the constant folding is performed. After this
parse tree transform, no constant folding can be performed on the
Method() parameters.
Two solutions:
1) The general case could possibly be solved by performing parse tree
transforms only after the constant folding has been completed
2) Continue to special-case each of these issues in the various
ASL operators that have similar issues.
An error can occur if the parse node that contains the namepath to be optimized
does not have a parent node that is a named object. This change fixes the
problem.
Problem detected by ASLTS test suite.
Via realloc(), automatically increase the internal line buffer sizes
as necessary to support very long source code lines.
The current version of the preprocessor requires a buffer long enough
to contain full source code lines. This change increases the line
buffer(s) if the input lines go beyond the current buffer size.
This eliminates errors that occurred when a source code line was
longer than the buffer.
Limit the source line output for error messages (256).
For these long lines, do not attempt to have the error message
point to the offending text. Emit the error column number
instead.
This change fixes a problem where the constant folding code was not
invoked for arguments that compile to fixed-length constants (either
Byte, Word, DWord, or QWord.) ACPICA BZ 970.
For include files, merge the prefix pathname with the file pathname.
Convert backslashes in all pathnames to forward slashes, for
readability.
Include file pathname changes affect both #include and Include()
type operators.
Handle an EOF at the end of a valid line by inserting a newline
and then returning the EOF during the next call to GetNextLine.
Prevents the line from being ignored due to EOF condition.
In shared code for DTC/Preprocessor, just skip over any escape
sequences found within double-quoted string literals.
DTC may later implement full support for escape sequences.
If early errors happen during the parsing stage, a parse tree
may not be created. An "internal" error was emitted. Add a check
for actual errors so that the internal error is only emitted
if no other errors were generated during the parse.
Move main compiler support for #line from the parser to the lexer.
This simplifies the implementation, and allows #line to appear
within any ASL statement (the entire line where #line appears
is simply removed from the input after the new line number is set.)
Fixes a problem where resource tags that refer to descriptors within
the scope of a StartDependent or StartDependendentNoPri descriptor
had an incorrect offset. The length of the StartDependent descriptor
must be taken into account when calculating the tag offset.
Reported by Petr Vandrovec. ACPICA BZ 949.