mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
still more nit-squashing
This commit is contained in:
parent
10d8c2fe6b
commit
81e8354ada
4 changed files with 9 additions and 8 deletions
|
@ -689,7 +689,7 @@ void ZAMCompiler::ReMapVar(ID* id, int slot, bro_uint_t inst)
|
|||
if ( s.scope_end <= static_cast<int>(inst) &&
|
||||
s.is_managed == is_managed )
|
||||
{ // It's compatible.
|
||||
if ( s.scope_end == inst )
|
||||
if ( s.scope_end == static_cast<int>(inst) )
|
||||
{ // It ends right on the money.
|
||||
apt_slot = i;
|
||||
break;
|
||||
|
|
|
@ -315,7 +315,7 @@ void ZAMCompiler::RemapFrameDenizens(const std::vector<int>& inst1_to_inst2)
|
|||
// the form "slotX = slotX". In that
|
||||
// case, look forward for the next viable
|
||||
// instruction.
|
||||
while ( start < int(insts1.size()) &&
|
||||
while ( start < insts1.size() &&
|
||||
inst1_to_inst2[start] == -1 )
|
||||
++start;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ using std::string;
|
|||
|
||||
namespace zeek::detail {
|
||||
|
||||
void ZInst::Dump(int inst_num, const FrameReMap* mappings) const
|
||||
void ZInst::Dump(bro_uint_t inst_num, const FrameReMap* mappings) const
|
||||
{
|
||||
// printf("v%d ", n);
|
||||
|
||||
|
@ -214,7 +214,7 @@ int ZInst::NumSlots() const
|
|||
return -1;
|
||||
}
|
||||
|
||||
string ZInst::VName(int n, int inst_num, const FrameReMap* mappings) const
|
||||
string ZInst::VName(int n, bro_uint_t inst_num, const FrameReMap* mappings) const
|
||||
{
|
||||
if ( n > NumFrameSlots() )
|
||||
return "";
|
||||
|
@ -333,11 +333,12 @@ string ZInstI::VName(int n, const FrameMap* frame_ids,
|
|||
auto& map = (*remappings)[slot];
|
||||
|
||||
unsigned int i;
|
||||
auto inst_num_u = static_cast<bro_uint_t>(inst_num);
|
||||
for ( i = 0; i < map.id_start.size(); ++i )
|
||||
{
|
||||
// See discussion for ZInst::VName.
|
||||
if ( (n == 1 && map.id_start[i] > inst_num) ||
|
||||
(n > 1 && map.id_start[i] >= inst_num) )
|
||||
if ( (n == 1 && map.id_start[i] > inst_num_u) ||
|
||||
(n > 1 && map.id_start[i] >= inst_num_u) )
|
||||
// Went too far.
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ public:
|
|||
virtual ~ZInst() { }
|
||||
|
||||
// Methods for printing out the instruction for debugging/maintenance.
|
||||
void Dump(int inst_num, const FrameReMap* mappings) const;
|
||||
void Dump(bro_uint_t inst_num, const FrameReMap* mappings) const;
|
||||
void Dump(const std::string& id1, const std::string& id2,
|
||||
const std::string& id3, const std::string& id4) const;
|
||||
|
||||
|
@ -75,7 +75,7 @@ public:
|
|||
// by its number within a larger set. "mappings" provides the
|
||||
// mappings used to translate raw slots to the corresponding
|
||||
// script variable(s).
|
||||
std::string VName(int n, int inst_num,
|
||||
std::string VName(int n, bro_uint_t inst_num,
|
||||
const FrameReMap* mappings) const;
|
||||
|
||||
// Number of slots that refer to a frame element. These always
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue