2021-10-10 20:26:30 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cassert>
|
2021-10-20 13:28:00 +00:00
|
|
|
#include <chrono>
|
2021-10-10 20:26:30 +00:00
|
|
|
#include <cstdint>
|
2021-10-20 13:28:00 +00:00
|
|
|
#include <exception>
|
2021-10-10 20:26:30 +00:00
|
|
|
#include <filesystem>
|
|
|
|
#include <fstream>
|
|
|
|
#include <iostream>
|
2021-10-20 13:28:00 +00:00
|
|
|
#include <map>
|
|
|
|
#include <memory>
|
|
|
|
#include <sstream>
|
2021-10-10 20:26:30 +00:00
|
|
|
#include <stdexcept>
|
|
|
|
#include <string>
|
2021-10-18 12:12:22 +00:00
|
|
|
#include <utility>
|
2021-10-10 20:26:30 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2021-10-20 13:28:00 +00:00
|
|
|
#include <Bus.h>
|
|
|
|
#include <Ram.h>
|
|
|
|
#include <mos6502.h>
|
|
|
|
#include <Disassembly.h>
|
|
|
|
#include <Symbols.h>
|
|
|
|
|
2021-10-18 11:07:24 +00:00
|
|
|
//#define TEST_JSON_PERFORMANCE
|
2021-10-11 18:52:22 +00:00
|
|
|
|
2021-10-19 10:44:58 +00:00
|
|
|
#define USE_SIMDJSON_JSON // 13 seconds (19)
|
|
|
|
//#define USE_RAPIDJSON_JSON // 19 seconds (22)
|
2021-10-18 23:39:26 +00:00
|
|
|
//#define USE_BOOST_JSON // 26 seconds (32)
|
2021-10-20 20:05:43 +00:00
|
|
|
//#define USE_NLOHMANN_JSON // 56 seconds (65)
|
|
|
|
//#define USE_JSONCPP_JSON // 80 seconds (87)
|
2021-10-18 10:54:01 +00:00
|
|
|
|
|
|
|
#ifdef USE_SIMDJSON_JSON
|
|
|
|
# define JSON_PREFER_PASS_BY_VALUE
|
|
|
|
# define JSON_PREFER_REUSE_OF_PARSER
|
2021-10-20 20:05:43 +00:00
|
|
|
# define JSON_PREFER_ITERATOR_TO_INDEX
|
|
|
|
# define JSON_ACCESS_DATA_VIA_OBJECT
|
2021-10-18 10:54:01 +00:00
|
|
|
# include "simdjson/simdjson.h"
|
|
|
|
#endif
|
2021-10-11 13:59:23 +00:00
|
|
|
|
2021-10-18 23:39:26 +00:00
|
|
|
#ifdef USE_RAPIDJSON_JSON
|
2021-10-19 08:28:13 +00:00
|
|
|
# define RAPIDJSON_HAS_STDSTRING 1
|
|
|
|
# define RAPIDJSON_SSE42
|
2021-10-20 13:28:00 +00:00
|
|
|
# define JSON_INSITU_PARSE
|
2021-10-20 20:05:43 +00:00
|
|
|
# define JSON_ACCESS_DATA_VIA_OBJECT
|
2021-10-18 23:39:26 +00:00
|
|
|
# include "rapidjson/document.h"
|
|
|
|
#endif
|
|
|
|
|
2021-10-11 13:59:23 +00:00
|
|
|
#ifdef USE_BOOST_JSON
|
2021-10-20 20:05:43 +00:00
|
|
|
# define JSON_ACCESS_DATA_VIA_OBJECT
|
2021-10-11 13:59:23 +00:00
|
|
|
# include <boost/json.hpp>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef USE_NLOHMANN_JSON
|
2021-10-20 13:28:00 +00:00
|
|
|
# define JSON_USE_IMPLICIT_CONVERSIONS 0
|
2021-10-20 20:05:43 +00:00
|
|
|
# define JSON_ACCESS_DATA_VIA_OBJECT
|
2021-10-11 13:59:23 +00:00
|
|
|
# include "nlohmann/json.hpp"
|
2021-10-11 18:13:05 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef USE_JSONCPP_JSON
|
2021-10-12 09:10:45 +00:00
|
|
|
# define JSON_PREFER_REUSE_OF_PARSER
|
2021-10-20 20:05:43 +00:00
|
|
|
# define JSON_ACCESS_DATA_VIA_OBJECT
|
2021-10-11 18:13:05 +00:00
|
|
|
# include <json/json.h>
|
|
|
|
#endif
|