It is common to represent a function as a String, and previously that
required re-validating the UTF-8 in a Vec<u8>. The fmt::Write trait
writes UTF-8 directly into a String, so no extra checking is required.
This also means we can implement Display for Function which gives it a
to_string() method. This makes the function_to_string() method
redundant, so delete it.
The functions in the write module are no longer generally useful, so
make the module private. The Display trait on Function is all we need.
It's not super fast to clone a function, but it is faster than
re-parsing the test case file it came from.
Some tests want to mutate the function, and there may be other tests in
the same script that need the original function.
It's not super fast to clone a function, but it is faster than
re-parsing the test case file it came from.
Some tests want to mutate the function, and there may be other tests in
the same script that need the original function.
Use (Function, Details) in place of the aggregrate DetailedFunction.
It turns out that some tests want to clone and manipulate the function
while the details never change.
Use (Function, Details) in place of the aggregrate DetailedFunction.
It turns out that some tests want to clone and manipulate the function
while the details never change.
This code looks overly complicated because it is anticipating running
jobs in a thread pool.
The test files are loaded and parsed, but not actually executed yet.
Errors are reported back to the test runner.
This code looks overly complicated because it is anticipating running
jobs in a thread pool.
The test files are loaded and parsed, but not actually executed yet.
Errors are reported back to the test runner.
This command accepts files and directories containing test cases to run.
Recursively searches for test files in any directory it is passed.
Actually running tests is not yet implemented.
This command accepts files and directories containing test cases to run.
Recursively searches for test files in any directory it is passed.
Actually running tests is not yet implemented.
The result from parsing a function is now a DetailedFunction which
includes all comments that can be associated with an entity.
Comments before the first function are ignored, everything else is
associated with the preceeding entity.
The parse_functions() function still returns plain functions.
The result from parsing a function is now a DetailedFunction which
includes all comments that can be associated with an entity.
Comments before the first function are ignored, everything else is
associated with the preceeding entity.
The parse_functions() function still returns plain functions.
Export a single function: parse_functions() which results a vector of
functions parsed from the source string.
Hide the parser and lexer modules. They are not useful to external
clients.
Export a single function: parse_functions() which results a vector of
functions parsed from the source string.
Hide the parser and lexer modules. They are not useful to external
clients.
The -c flag to 'cton-util filecheck' will now print out a description of how
the directives are matching the input.
This explanation is also printed when a match fails.
The -c flag to 'cton-util filecheck' will now print out a description of how
the directives are matching the input.
This explanation is also printed when a match fails.
Use the new ISA predicate numbering to emit ISA predicate instructions in the
encoding tables.
Properly decode the ISA predicate number in RISC-V and add tests for RV32M iwth
and without 'supports_m' enabled.
Use the new ISA predicate numbering to emit ISA predicate instructions in the
encoding tables.
Properly decode the ISA predicate number in RISC-V and add tests for RV32M iwth
and without 'supports_m' enabled.
Move all the byte-sized settings to the front of the byte-vector, and add a
mechanism for assigning numbers to predicates that have no name as well as
predicates from the parent settings group.
This way, all the boolean predicates that are used by a target ISA appear as a
contiguous bit-vector that is a suffix of the settings byte-vector. This
bit-vector can then be indexed linearly when resolving ISA predicates on
encodings.
Add a numbered_predicate() method to the generated Flags structs that can read
a predicate by number dynamically.
Move all the byte-sized settings to the front of the byte-vector, and add a
mechanism for assigning numbers to predicates that have no name as well as
predicates from the parent settings group.
This way, all the boolean predicates that are used by a target ISA appear as a
contiguous bit-vector that is a suffix of the settings byte-vector. This
bit-vector can then be indexed linearly when resolving ISA predicates on
encodings.
Add a numbered_predicate() method to the generated Flags structs that can read
a predicate by number dynamically.