diff --git a/src/compiler/Parser.cpp b/src/compiler/Parser.cpp index 8661d81e..2073e488 100644 --- a/src/compiler/Parser.cpp +++ b/src/compiler/Parser.cpp @@ -571,7 +571,6 @@ void Parser::unaryMessage(MethodGenerationContext* mgenc, bool super) { void Parser::binaryMessage(MethodGenerationContext* mgenc, bool super) { VMSymbol* msg = binarySelector(); - bool tmp_bool = false; binaryOperand(mgenc); if (super) diff --git a/src/interpreter/Interpreter.cpp b/src/interpreter/Interpreter.cpp index 67ce56ea..89dca0bf 100644 --- a/src/interpreter/Interpreter.cpp +++ b/src/interpreter/Interpreter.cpp @@ -411,14 +411,11 @@ void Interpreter::doJump(long bytecodeIndex) { } void Interpreter::WalkGlobals(walk_heap_fn walk) { -#warning method and frame are stored as VMptrs, is that acceptable? Is the solution here with _store_ptr and load_ptr robust? - method = load_ptr(static_cast(walk(_store_ptr(method)))); // Get the current frame and mark it. // Since marking is done recursively, this automatically // marks the whole stack -# warning Do I need a null check here? frame = load_ptr(static_cast(walk(_store_ptr(frame)))); } diff --git a/src/memory/GenerationalCollector.cpp b/src/memory/GenerationalCollector.cpp index b6678c7b..1bc2036e 100644 --- a/src/memory/GenerationalCollector.cpp +++ b/src/memory/GenerationalCollector.cpp @@ -72,7 +72,6 @@ static gc_oop_t copy_if_necessary(gc_oop_t oop) { // walk recursively newObj->WalkObjects(copy_if_necessary); -#warning not sure about the use of _store_ptr here, or whether it should be a plain cast return _store_ptr(newObj); } diff --git a/src/vm/Universe.cpp b/src/vm/Universe.cpp index e546c772..6671dc3c 100644 --- a/src/vm/Universe.cpp +++ b/src/vm/Universe.cpp @@ -385,8 +385,6 @@ Universe::~Universe() { VMObject* Universe::InitializeGlobals() { set_vt_to_null(); -# warning is _store_ptr sufficient? - // //allocate nil object // @@ -499,14 +497,12 @@ VMClass* Universe::GetBlockClassWithArgs(long numberOfArguments) { result->AddInstancePrimitive(new (GetHeap()) VMEvaluationPrimitive(numberOfArguments) ); SetGlobal(name, result); -# warning is _store_ptr sufficient here? blockClassesByNoOfArgs[numberOfArguments] = _store_ptr(result); return result; } vm_oop_t Universe::GetGlobal(VMSymbol* name) { - # warning is _store_ptr correct here? it relies on _store_ptr not to be really changed... auto it = globals.find(_store_ptr(name)); if (it == globals.end()) { return nullptr; @@ -516,7 +512,6 @@ vm_oop_t Universe::GetGlobal(VMSymbol* name) { } bool Universe::HasGlobal(VMSymbol* name) { - # warning is _store_ptr correct here? it relies on _store_ptr not to be really changed... auto it = globals.find(_store_ptr(name)); if (it == globals.end()) { return false; @@ -719,7 +714,6 @@ VMFrame* Universe::NewFrame(VMFrame* previousFrame, VMMethod* method) const { long additionalBytes = length * sizeof(VMObject*); result = new (GetHeap(), additionalBytes) VMFrame(length); result->clazz = nullptr; -# warning I think _store_ptr is sufficient here, but... result->method = _store_ptr(method); result->previousFrame = _store_ptr(previousFrame); result->ResetStackPointer(); @@ -879,7 +873,6 @@ VMSymbol* Universe::NewSymbol(const StdString& str) { VMSymbol* Universe::NewSymbol(const size_t length, const char* str) { VMSymbol* result = new (GetHeap(), PADDED_SIZE(length)) VMSymbol(length, str); -# warning is _store_ptr sufficient here? symbolsMap[StdString(str, length)] = _store_ptr(result); LOG_ALLOCATION("VMSymbol", result->GetObjectSize()); @@ -904,6 +897,5 @@ VMSymbol* Universe::SymbolFor(const StdString& str) { } void Universe::SetGlobal(VMSymbol* name, vm_oop_t val) { -# warning is _store_ptr correct here? it relies on _store_ptr not to be really changed... globals[_store_ptr(name)] = _store_ptr(val); } diff --git a/src/vmobjects/VMFrame.cpp b/src/vmobjects/VMFrame.cpp index d38c407f..bc0ecbbb 100644 --- a/src/vmobjects/VMFrame.cpp +++ b/src/vmobjects/VMFrame.cpp @@ -114,7 +114,6 @@ VMFrame::VMFrame(long size, long nof) : gc_oop_t* end = (gc_oop_t*) SHIFTED_PTR(this, objectSize); long i = 0; while (arguments + i < end) { -# warning is the direct use of gc_oop_t here safe for all GCs? arguments[i] = nilObject; i++; } diff --git a/src/vmobjects/VMMethod.cpp b/src/vmobjects/VMMethod.cpp index 2ce67ace..1c8148c9 100644 --- a/src/vmobjects/VMMethod.cpp +++ b/src/vmobjects/VMMethod.cpp @@ -52,13 +52,11 @@ VMMethod::VMMethod(long bcCount, long numberOfConstants) : #ifdef UNSAFE_FRAME_OPTIMIZATION cachedFrame = nullptr; #endif -# warning not sure whether the use of _store_ptr is ok here - - bcLength = _store_ptr(NEW_INT(bcCount)); - numberOfLocals = _store_ptr(NEW_INT(0)); - maximumNumberOfStackElements = _store_ptr(NEW_INT(0)); - numberOfArguments = _store_ptr(NEW_INT(0)); - this->numberOfConstants = _store_ptr(NEW_INT(numberOfConstants)); + store_ptr(bcLength, NEW_INT(bcCount)); + store_ptr(numberOfLocals, NEW_INT(0)); + store_ptr(maximumNumberOfStackElements, NEW_INT(0)); + store_ptr(numberOfArguments, NEW_INT(0)); + store_ptr(this->numberOfConstants, NEW_INT(numberOfConstants)); indexableFields = (gc_oop_t*)(&indexableFields + 2); for (long i = 0; i < numberOfConstants; ++i) { @@ -97,9 +95,9 @@ void VMMethod::WalkObjects(walk_heap_fn walk) { long numIndexableFields = GetNumberOfIndexableFields(); for (long i = 0; i < numIndexableFields; ++i) { - if (GetIndexableField(i) != nullptr) -# warning not sure _store_ptr is the best way, perhaps we should access the array content directly - indexableFields[i] = walk(_store_ptr(GetIndexableField(i))); + if (indexableFields[i] != nullptr) { + indexableFields[i] = walk(indexableFields[i]); + } } } diff --git a/src/vmobjects/VMObject.cpp b/src/vmobjects/VMObject.cpp index 8c330cea..5c1ca277 100644 --- a/src/vmobjects/VMObject.cpp +++ b/src/vmobjects/VMObject.cpp @@ -80,7 +80,6 @@ void VMObject::WalkObjects(walk_heap_fn walk) { long numFields = GetNumberOfFields(); for (long i = 0; i < numFields; ++i) { -# warning not sure whether the use of _store_ptr is correct and robust here FIELDS[i] = walk(_store_ptr(GetField(i))); } }