diff --git a/src/memory/heap.cpp b/src/memory/heap.cpp index a0fbbcc31bafa5668a5c52233bef30d3e3d096e3..0816210313811f13026c6f0392f749c7b2d160b6 100644 --- a/src/memory/heap.cpp +++ b/src/memory/heap.cpp @@ -1,6 +1,7 @@ #include "runtime/universe.hpp" #include "memory/heap.hpp" #include "memory/oopClosure.hpp" +#include Heap* Heap::instance = NULL; size_t Heap::MAX_CAP = 2 * 1024 * 1024; diff --git a/src/memory/heap.hpp b/src/memory/heap.hpp index ff5d4d82b1e40f5d2f6a4758f379ae817a85a958..2e9a32de4031ae12c546ff305a5dc3c304fb0f87 100644 --- a/src/memory/heap.hpp +++ b/src/memory/heap.hpp @@ -2,7 +2,6 @@ #define MEMORY_HEAP_HPP #include -#include class HiObject; diff --git a/src/runtime/interpreter.cpp b/src/runtime/interpreter.cpp index 1eb01721ad6a706d726b9b4e4de4681d79fcc554..0fd30cc6f1b0d189c99006adccaa5ba274eaeda5 100644 --- a/src/runtime/interpreter.cpp +++ b/src/runtime/interpreter.cpp @@ -267,6 +267,7 @@ void Interpreter::eval_frame() { printf("\n"); break; + case ByteCode::INPLACE_ADD: case ByteCode::BINARY_ADD: v = POP(); w = POP(); diff --git a/src/util/map.cpp b/src/util/map.cpp index d44971abea65f4aa5ec9fab68f8a60b4f9671ff7..f6c96276efa12c837fc54299c338fa1bead37b13 100644 --- a/src/util/map.cpp +++ b/src/util/map.cpp @@ -73,7 +73,7 @@ template V Map::remove(K k) { int i = index(k); - if (k < 0) + if (i < 0) return 0; V v = _entries[i]._v;