IR generation for shifts

This commit is contained in:
Alex Beregszaszi
2020-05-06 19:14:23 +02:00
committed by chriseth
parent 3a93080ca9
commit 327c75bc1b
32 changed files with 236 additions and 18 deletions
@@ -147,6 +147,11 @@ private:
std::string const& _right
);
/// @returns code to perform the given shift operation.
/// The operation itself will be performed in the type of the value,
/// while the amount to shift can have its own type.
std::string shiftOperation(langutil::Token _op, IRVariable const& _value, IRVariable const& _shiftAmount);
/// Assigns the value of @a _value to the lvalue @a _lvalue.
void writeToLValue(IRLValue const& _lvalue, IRVariable const& _value);
/// @returns a fresh IR variable containing the value of the lvalue @a _lvalue.