common.h 987 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. #ifdef _MSC_VER
  3. #pragma warning (disable:4267)
  4. #pragma warning (disable:4101)
  5. #define _CRT_NONSTDC_NO_DEPRECATE
  6. #define strdup _strdup
  7. #endif
  8. #include <sstream>
  9. #include <regex>
  10. #include <stack>
  11. #include <cmath>
  12. #include <stdexcept>
  13. #include <vector>
  14. #include <string>
  15. #include <cstring>
  16. #include <chrono>
  17. #include <string_view>
  18. #include <queue>
  19. #include <iomanip>
  20. #include <memory>
  21. #include <functional>
  22. #include <iostream>
  23. #include "hash_table8.hpp"
  24. #ifdef POCKETPY_H
  25. #define UNREACHABLE() throw std::runtime_error( "L" + std::to_string(__LINE__) + " UNREACHABLE()! This should be a bug, please report it");
  26. #else
  27. #define UNREACHABLE() throw std::runtime_error( __FILE__ + std::string(":") + std::to_string(__LINE__) + " UNREACHABLE()!");
  28. #endif
  29. #ifdef __EMSCRIPTEN__
  30. #include <emscripten.h>
  31. #endif
  32. #define PK_VERSION "0.8.1"
  33. typedef int64_t i64;
  34. typedef double f64;
  35. #define DUMMY_VAL (i64)0
  36. #define CPP_LAMBDA(x) ([](VM* vm, const pkpy::Args& args) { return x; })