Reformat the world

This commit is contained in:
Tim Wojtulewicz 2021-09-16 15:35:39 -07:00
parent 194cb24547
commit b2f171ec69
714 changed files with 35149 additions and 35203 deletions

View file

@ -4,14 +4,15 @@
#pragma once
namespace zeek::detail {
namespace zeek::detail
{
// Opcodes associated with ZAM instructions.
enum ZOp {
enum ZOp
{
#include "zeek/ZAM-OpsDefs.h"
OP_NOP,
};
};
// Possible types of instruction operands in terms of which fields they use.
// Used for low-level optimization (so important that they're correct),
@ -22,8 +23,13 @@ enum ZOp {
// I1/I2/I3/I4: the instruction's integer value, used directly (not as a slot)
// FRAME: a slot in the (intrepreter) Frame object
// X: no operands
enum ZAMOpType {
OP_X, OP_C, OP_V, OP_V_I1, OP_VC_I1,
enum ZAMOpType
{
OP_X,
OP_C,
OP_V,
OP_V_I1,
OP_VC_I1,
OP_VC,
OP_VV,
@ -46,15 +52,16 @@ enum ZAMOpType {
OP_VVVV_I3_I4,
OP_VVVV_I2_I3_I4,
};
};
// Possible "flavors" for an operator's first slot.
enum ZAMOp1Flavor {
OP1_READ, // the slot is read, not modified
OP1_WRITE, // the slot is modified, not read - the most common
OP1_READ_WRITE, // the slot is both read and then modified, e.g. "++"
OP1_INTERNAL, // we're doing some internal manipulation of the slot
};
enum ZAMOp1Flavor
{
OP1_READ, // the slot is read, not modified
OP1_WRITE, // the slot is modified, not read - the most common
OP1_READ_WRITE, // the slot is both read and then modified, e.g. "++"
OP1_INTERNAL, // we're doing some internal manipulation of the slot
};
// Maps an operand to its flavor.
extern ZAMOp1Flavor op1_flavor[];
@ -62,4 +69,4 @@ extern ZAMOp1Flavor op1_flavor[];
// Maps an operand to whether it has side effects.
extern bool op_side_effects[];
} // namespace zeek::detail
} // namespace zeek::detail