Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable google-runtime-int
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <[email protected]>
smarr committed Aug 19, 2024

Verified

This commit was signed with the committer’s verified signature.
snyk-bot Snyk bot
1 parent 6e7d9b3 commit 52e7e26
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -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,
9 changes: 5 additions & 4 deletions src/interpreter/Interpreter.cpp
Original file line number Diff line number Diff line change
@@ -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);
}
@@ -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
@@ -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
@@ -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
1 change: 1 addition & 0 deletions src/memory/DebugCopyingCollector.cpp
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@

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

#include "../memory/Heap.h"
#include "../misc/Timer.h"
4 changes: 2 additions & 2 deletions src/vm/Universe.cpp
Original file line number Diff line number Diff line change
@@ -343,8 +343,8 @@ void Universe::initialize(int32_t _argc, char** _argv) {

#if CACHE_INTEGER
// create prebuilt integers
for (long it = INT_CACHE_MIN_VALUE; it <= INT_CACHE_MAX_VALUE; ++it) {
prebuildInts[(unsigned long)(it - INT_CACHE_MIN_VALUE)] =
for (int64_t it = INT_CACHE_MIN_VALUE; it <= INT_CACHE_MAX_VALUE; ++it) {
prebuildInts[(size_t)(it - INT_CACHE_MIN_VALUE)] =
store_root(new (GetHeap<HEAP_CLS>(), 0) VMInteger(it));
}
#endif

0 comments on commit 52e7e26

Please sign in to comment.