diff --git a/amalgamate.py b/amalgamate.py index 667b6b46..337fbe77 100644 --- a/amalgamate.py +++ b/amalgamate.py @@ -2,7 +2,7 @@ with open("src/opcodes.h", "rt", encoding='utf-8') as f: OPCODES_TEXT = f.read() pipeline = [ - ["hash_table5.hpp", "common.h", "memory.h", "str.h", "safestl.h", "builtins.h", "error.h"], + ["common.h", "hash_table5.hpp", "memory.h", "str.h", "safestl.h", "builtins.h", "error.h"], ["obj.h", "parser.h", "ref.h", "codeobject.h", "frame.h"], ["vm.h", "ceval.h", "compiler.h", "repl.h"], ["iter.h", "pocketpy.h"] diff --git a/src/common.h b/src/common.h index e6ae7391..b1112583 100644 --- a/src/common.h +++ b/src/common.h @@ -29,11 +29,6 @@ #define EMH_EXT 1 #define EMH_FIND_HIT 1 -#include "hash_table5.hpp" -namespace pkpy { - template - using HashMap = emhash5::HashMap; -} #ifdef POCKETPY_H #define UNREACHABLE() throw std::runtime_error( "L" + std::to_string(__LINE__) + " UNREACHABLE()!"); @@ -66,12 +61,6 @@ struct Type { } }; -template -void* tid() { - static volatile int8_t _x; - return (void*)(&_x); -} - //#define THREAD_LOCAL thread_local #define THREAD_LOCAL diff --git a/src/safestl.h b/src/safestl.h index 3417482f..f8fa0256 100644 --- a/src/safestl.h +++ b/src/safestl.h @@ -9,6 +9,12 @@ typedef pkpy::shared_ptr PyVar; typedef PyVar PyVarOrNull; typedef PyVar PyVarRef; +#include "hash_table5.hpp" +namespace pkpy { + template + using HashMap = emhash5::HashMap; +} + namespace pkpy{ class List: public std::vector { PyVar& at(size_t) = delete;