From 30476506ae04ce62358a2e99f7dff4bbefebd276 Mon Sep 17 00:00:00 2001 From: zys Date: Thu, 4 Oct 2018 17:03:51 +0800 Subject: [PATCH] modify2bugs --- src/code/binaryFileParser.cpp | 0 src/code/binaryFileParser.hpp | 0 src/code/bytecode.hpp | 0 src/code/codeObject.cpp | 0 src/code/codeObject.hpp | 0 src/main.cpp | 0 src/memory/heap.cpp | 1 + src/memory/heap.hpp | 1 - src/memory/oopClosure.cpp | 0 src/memory/oopClosure.hpp | 0 src/object/hiDict.cpp | 0 src/object/hiDict.hpp | 0 src/object/hiInteger.cpp | 0 src/object/hiInteger.hpp | 0 src/object/hiList.cpp | 0 src/object/hiList.hpp | 0 src/object/hiObject.cpp | 0 src/object/hiObject.hpp | 0 src/object/hiString.cpp | 0 src/object/hiString.hpp | 0 src/object/klass.cpp | 0 src/object/klass.hpp | 0 src/runtime/frameObject.cpp | 0 src/runtime/frameObject.hpp | 0 src/runtime/functionObject.cpp | 0 src/runtime/functionObject.hpp | 0 src/runtime/interpreter.cpp | 1 + src/runtime/interpreter.hpp | 0 src/runtime/stringTable.cpp | 0 src/runtime/stringTable.hpp | 0 src/runtime/universe.cpp | 0 src/runtime/universe.hpp | 0 src/util/arrayList.cpp | 0 src/util/arrayList.hpp | 0 src/util/bufferedInputStream.hpp | 0 src/util/handles.cpp | 0 src/util/handles.hpp | 0 src/util/map.cpp | 2 +- src/util/map.hpp | 0 src/util/stack.cpp | 0 src/util/stack.hpp | 0 41 files changed, 3 insertions(+), 2 deletions(-) mode change 100644 => 100755 src/code/binaryFileParser.cpp mode change 100644 => 100755 src/code/binaryFileParser.hpp mode change 100644 => 100755 src/code/bytecode.hpp mode change 100644 => 100755 src/code/codeObject.cpp mode change 100644 => 100755 src/code/codeObject.hpp mode change 100644 => 100755 src/main.cpp mode change 100644 => 100755 src/memory/heap.cpp mode change 100644 => 100755 src/memory/heap.hpp mode change 100644 => 100755 src/memory/oopClosure.cpp mode change 100644 => 100755 src/memory/oopClosure.hpp mode change 100644 => 100755 src/object/hiDict.cpp mode change 100644 => 100755 src/object/hiDict.hpp mode change 100644 => 100755 src/object/hiInteger.cpp mode change 100644 => 100755 src/object/hiInteger.hpp mode change 100644 => 100755 src/object/hiList.cpp mode change 100644 => 100755 src/object/hiList.hpp mode change 100644 => 100755 src/object/hiObject.cpp mode change 100644 => 100755 src/object/hiObject.hpp mode change 100644 => 100755 src/object/hiString.cpp mode change 100644 => 100755 src/object/hiString.hpp mode change 100644 => 100755 src/object/klass.cpp mode change 100644 => 100755 src/object/klass.hpp mode change 100644 => 100755 src/runtime/frameObject.cpp mode change 100644 => 100755 src/runtime/frameObject.hpp mode change 100644 => 100755 src/runtime/functionObject.cpp mode change 100644 => 100755 src/runtime/functionObject.hpp mode change 100644 => 100755 src/runtime/interpreter.cpp mode change 100644 => 100755 src/runtime/interpreter.hpp mode change 100644 => 100755 src/runtime/stringTable.cpp mode change 100644 => 100755 src/runtime/stringTable.hpp mode change 100644 => 100755 src/runtime/universe.cpp mode change 100644 => 100755 src/runtime/universe.hpp mode change 100644 => 100755 src/util/arrayList.cpp mode change 100644 => 100755 src/util/arrayList.hpp mode change 100644 => 100755 src/util/bufferedInputStream.hpp mode change 100644 => 100755 src/util/handles.cpp mode change 100644 => 100755 src/util/handles.hpp mode change 100644 => 100755 src/util/map.cpp mode change 100644 => 100755 src/util/map.hpp mode change 100644 => 100755 src/util/stack.cpp mode change 100644 => 100755 src/util/stack.hpp diff --git a/src/code/binaryFileParser.cpp b/src/code/binaryFileParser.cpp old mode 100644 new mode 100755 diff --git a/src/code/binaryFileParser.hpp b/src/code/binaryFileParser.hpp old mode 100644 new mode 100755 diff --git a/src/code/bytecode.hpp b/src/code/bytecode.hpp old mode 100644 new mode 100755 diff --git a/src/code/codeObject.cpp b/src/code/codeObject.cpp old mode 100644 new mode 100755 diff --git a/src/code/codeObject.hpp b/src/code/codeObject.hpp old mode 100644 new mode 100755 diff --git a/src/main.cpp b/src/main.cpp old mode 100644 new mode 100755 diff --git a/src/memory/heap.cpp b/src/memory/heap.cpp old mode 100644 new mode 100755 index a0fbbcc..0816210 --- 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 old mode 100644 new mode 100755 index ff5d4d8..2e9a32d --- 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/memory/oopClosure.cpp b/src/memory/oopClosure.cpp old mode 100644 new mode 100755 diff --git a/src/memory/oopClosure.hpp b/src/memory/oopClosure.hpp old mode 100644 new mode 100755 diff --git a/src/object/hiDict.cpp b/src/object/hiDict.cpp old mode 100644 new mode 100755 diff --git a/src/object/hiDict.hpp b/src/object/hiDict.hpp old mode 100644 new mode 100755 diff --git a/src/object/hiInteger.cpp b/src/object/hiInteger.cpp old mode 100644 new mode 100755 diff --git a/src/object/hiInteger.hpp b/src/object/hiInteger.hpp old mode 100644 new mode 100755 diff --git a/src/object/hiList.cpp b/src/object/hiList.cpp old mode 100644 new mode 100755 diff --git a/src/object/hiList.hpp b/src/object/hiList.hpp old mode 100644 new mode 100755 diff --git a/src/object/hiObject.cpp b/src/object/hiObject.cpp old mode 100644 new mode 100755 diff --git a/src/object/hiObject.hpp b/src/object/hiObject.hpp old mode 100644 new mode 100755 diff --git a/src/object/hiString.cpp b/src/object/hiString.cpp old mode 100644 new mode 100755 diff --git a/src/object/hiString.hpp b/src/object/hiString.hpp old mode 100644 new mode 100755 diff --git a/src/object/klass.cpp b/src/object/klass.cpp old mode 100644 new mode 100755 diff --git a/src/object/klass.hpp b/src/object/klass.hpp old mode 100644 new mode 100755 diff --git a/src/runtime/frameObject.cpp b/src/runtime/frameObject.cpp old mode 100644 new mode 100755 diff --git a/src/runtime/frameObject.hpp b/src/runtime/frameObject.hpp old mode 100644 new mode 100755 diff --git a/src/runtime/functionObject.cpp b/src/runtime/functionObject.cpp old mode 100644 new mode 100755 diff --git a/src/runtime/functionObject.hpp b/src/runtime/functionObject.hpp old mode 100644 new mode 100755 diff --git a/src/runtime/interpreter.cpp b/src/runtime/interpreter.cpp old mode 100644 new mode 100755 index 1eb0172..58652e1 --- 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/runtime/interpreter.hpp b/src/runtime/interpreter.hpp old mode 100644 new mode 100755 diff --git a/src/runtime/stringTable.cpp b/src/runtime/stringTable.cpp old mode 100644 new mode 100755 diff --git a/src/runtime/stringTable.hpp b/src/runtime/stringTable.hpp old mode 100644 new mode 100755 diff --git a/src/runtime/universe.cpp b/src/runtime/universe.cpp old mode 100644 new mode 100755 diff --git a/src/runtime/universe.hpp b/src/runtime/universe.hpp old mode 100644 new mode 100755 diff --git a/src/util/arrayList.cpp b/src/util/arrayList.cpp old mode 100644 new mode 100755 diff --git a/src/util/arrayList.hpp b/src/util/arrayList.hpp old mode 100644 new mode 100755 diff --git a/src/util/bufferedInputStream.hpp b/src/util/bufferedInputStream.hpp old mode 100644 new mode 100755 diff --git a/src/util/handles.cpp b/src/util/handles.cpp old mode 100644 new mode 100755 diff --git a/src/util/handles.hpp b/src/util/handles.hpp old mode 100644 new mode 100755 diff --git a/src/util/map.cpp b/src/util/map.cpp old mode 100644 new mode 100755 index d44971a..f6c9627 --- 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; diff --git a/src/util/map.hpp b/src/util/map.hpp old mode 100644 new mode 100755 diff --git a/src/util/stack.cpp b/src/util/stack.cpp old mode 100644 new mode 100755 diff --git a/src/util/stack.hpp b/src/util/stack.hpp old mode 100644 new mode 100755 -- Gitee