Commit graph

10 commits

Author SHA1 Message Date
ReinUsesLisp
22cc6f6c1b cmake: Always treat warnings as errors
Enable cast warnings in gcc and clang and always treat warnings as
errors.

GetWordCount now returns std::size_t for simplicity and the word count
is asserted and casted in WordCount (now called CalculateTotalWords.

Silence warnings.
2019-11-27 05:25:35 -03:00
ReinUsesLisp
b4eeadfd9b operand: Use pure virtual functions 2019-11-01 06:07:53 -03:00
ReinUsesLisp
d24685ebd3 Revert "operand: Implement operand hashing and use hashed set for declarations"
This reverts commit 1e665afa36.
2019-09-09 16:48:05 -03:00
ReinUsesLisp
60a856d266 Relicense to The BSD 3-clause license 2019-07-14 18:50:44 -03:00
ReinUsesLisp
1e665afa36 operand: Implement operand hashing and use hashed set for declarations
Instead of manually searching each element in the declarations vector,
use an unordered_set to emplace new declarations avoiding repetition.
2019-06-08 05:23:15 -03:00
Lioncash
6fd44e494c Pass std::string by value where applicable.
By taking the std::string by value in the constructor, this allows for
certain situations where copies can be elided entirely (when moving an
instance into the constructor)

e.g.

std::string var = ...

...

... = LiteralString(std::move(var)) // Or whatever other initialization
                                    // is done.

No copy will be done in this case, the move transfers it into the
constructor, and then the move within the initializer list transfers it
into the member variable.

tl;dr: This allows the calling code to potentially construct less
std::string instances by allowing moving into the parameters themselves.
2019-03-14 04:30:39 -03:00
Lioncash
11b7743c29 src: Amend missing override specifiers 2019-03-14 02:25:57 -04:00
ReinUsesLisp
73595f4588 Change clang-format settings 2019-03-11 03:26:21 -03:00
ReinUsesLisp
f5944d61a6 Upgrade from LGPLv2.1 to LGPLv3 2018-11-16 04:10:10 -03:00
ReinUsesLisp
a08aeec982 Add Op* prefix to instructions that have to be emited 2018-10-31 21:23:27 -03:00
Renamed from src/literal-string.h (Browse further)