blueloveTH 3 роки тому
батько
коміт
6854128bac
3 змінених файлів з 7 додано та 12 видалено
  1. 1 1
      amalgamate.py
  2. 0 11
      src/common.h
  3. 6 0
      src/safestl.h

+ 1 - 1
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"]

+ 0 - 11
src/common.h

@@ -29,11 +29,6 @@
 
 #define EMH_EXT 1
 #define EMH_FIND_HIT 1
-#include "hash_table5.hpp"
-namespace pkpy {
-	template<typename... Args>
-	using HashMap = emhash5::HashMap<Args...>;
-}
 
 #ifdef POCKETPY_H
 #define UNREACHABLE() throw std::runtime_error( "L" + std::to_string(__LINE__) + " UNREACHABLE()!");
@@ -66,12 +61,6 @@ struct Type {
 	}
 };
 
-template<typename T>
-void* tid() {
-	static volatile int8_t _x;
-	return (void*)(&_x);
-}
-
 //#define THREAD_LOCAL thread_local
 #define THREAD_LOCAL
 

+ 6 - 0
src/safestl.h

@@ -9,6 +9,12 @@ typedef pkpy::shared_ptr<PyObject> PyVar;
 typedef PyVar PyVarOrNull;
 typedef PyVar PyVarRef;
 
+#include "hash_table5.hpp"
+namespace pkpy {
+	template<typename... Args>
+	using HashMap = emhash5::HashMap<Args...>;
+}
+
 namespace pkpy{
 class List: public std::vector<PyVar> {
     PyVar& at(size_t) = delete;