Skip to content

Commit

Permalink
Enable google-runtime-int
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <git@stefan-marr.de>
  • Loading branch information
smarr committed Aug 18, 2024
1 parent 6e7d9b3 commit e2718e0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Checks: '*include*,
readability-convert-member-functions-to-static,
cppcoreguidelines-pro-type-member-init,
performance-unnecessary-value-param,
google-runtime-int,
-altera-unroll-loops,
-altera-id-dependent-backward-branch,
-bugprone-easily-swappable-parameters,
Expand Down
9 changes: 5 additions & 4 deletions src/interpreter/Interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void Interpreter::triggerDoesNotUnderstand(VMSymbol* signature) {

// the receiver should not go into the argumentsArray
// so, numberOfArgs - 2
for (long i = numberOfArgs - 2; i >= 0; --i) {
for (int64_t i = numberOfArgs - 2; i >= 0; --i) {
vm_oop_t o = GetFrame()->Pop();
argumentsArray->SetIndexableField(i, o);
}
Expand All @@ -176,7 +176,7 @@ void Interpreter::triggerDoesNotUnderstand(VMSymbol* signature) {
// check if current frame is big enough for this unplanned Send
// doesNotUnderstand: needs 3 slots, one for this, one for method name, one
// for args
long const additionalStackSlots = 3 - GetFrame()->RemainingStackSize();
int64_t const additionalStackSlots = 3 - GetFrame()->RemainingStackSize();
if (additionalStackSlots > 0) {
GetFrame()->SetBytecodeIndex(bytecodeIndexGlobal);
// copy current frame into a bigger one and replace the current frame
Expand Down Expand Up @@ -288,7 +288,7 @@ void Interpreter::SendUnknownGlobal(VMSymbol* globalName) {

// check if there is enough space on the stack for this unplanned Send
// unknowGlobal: needs 2 slots, one for "this" and one for the argument
long const additionalStackSlots = 2 - GetFrame()->RemainingStackSize();
int64_t const additionalStackSlots = 2 - GetFrame()->RemainingStackSize();
if (additionalStackSlots > 0) {
GetFrame()->SetBytecodeIndex(bytecodeIndexGlobal);
// copy current frame into a bigger one and replace the current
Expand Down Expand Up @@ -461,7 +461,8 @@ void Interpreter::doReturnNonLocal() {

// check if current frame is big enough for this unplanned send
// #escapedBlock: needs 2 slots, one for self, and one for the block
long const additionalStackSlots = 2 - GetFrame()->RemainingStackSize();
int64_t const additionalStackSlots =
2 - GetFrame()->RemainingStackSize();
if (additionalStackSlots > 0) {
GetFrame()->SetBytecodeIndex(bytecodeIndexGlobal);
// copy current frame into a bigger one, and replace it
Expand Down
1 change: 1 addition & 0 deletions src/memory/DebugCopyingCollector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <cassert>
#include <cstddef>
#include <cstdint>

#include "../memory/Heap.h"
#include "../misc/Timer.h"
Expand Down

0 comments on commit e2718e0

Please sign in to comment.