satyr 0.42
|
Platform JavaScript platform. More...
#include <inttypes.h>
#include <json.h>
Go to the source code of this file.
Macros | |
#define | SR_JS_ENGINE_VALIDITY_CHECK(engine) (engine > 0 && engine < _SR_JS_ENGINE_UPPER_BOUND) |
#define | SR_JS_RUNTIME_VALIDITY_CHECK(runtime) (runtime > 0 && runtime < _SR_JS_RUNTIME_UPPER_BOUND) |
#define | SR_JS_PLATFORM_NULL 0 |
#define | _sr_js_platform_assemble(runtime, engine) ((uint32_t)(runtime << 4) | engine) |
#define | sr_js_platform_new() (_sr_js_platform_assemble(_SR_JS_RUNTIME_UNINIT, _SR_JS_ENGINE_UNINIT)) |
#define | sr_js_platform_init(platform, runtime, engine) do { platform = _sr_js_platform_assemble(runtime, engine); } while (0) |
#define | sr_js_platform_free(platform) ((void)platform) |
#define | sr_js_platform_dup(platform) (platform) |
#define | sr_js_platform_engine(platform) (platform & 0xF) |
#define | sr_js_platform_runtime(platform) (platform >> 4) |
Typedefs | |
typedef uint32_t | sr_js_platform_t |
Functions | |
const char * | sr_js_engine_to_string (enum sr_js_engine engine) |
enum sr_js_engine | sr_js_engine_from_string (const char *engine) |
const char * | sr_js_runtime_to_string (enum sr_js_runtime runtime) |
enum sr_js_runtime | sr_js_runtime_from_string (const char *runtime) |
sr_js_platform_t | sr_js_platform_from_string (const char *runtime_name, const char *runtime_version, char **error_message) |
char * | sr_js_platform_to_json (sr_js_platform_t platform) |
sr_js_platform_t | sr_js_platform_from_json (json_object *root, char **error_message) |
struct sr_js_stacktrace * | sr_js_platform_parse_stacktrace (sr_js_platform_t platform, const char **input, struct sr_location *location) |
struct sr_js_frame * | sr_js_platform_parse_frame (sr_js_platform_t platform, const char **input, struct sr_location *location) |
Platform JavaScript platform.
Definition in file platform.h.
#define _sr_js_platform_assemble | ( | runtime, | |
engine | |||
) | ((uint32_t)(runtime << 4) | engine) |
Definition at line 91 of file platform.h.
#define SR_JS_ENGINE_VALIDITY_CHECK | ( | engine | ) | (engine > 0 && engine < _SR_JS_ENGINE_UPPER_BOUND) |
Definition at line 57 of file platform.h.
#define sr_js_platform_dup | ( | platform | ) | (platform) |
Definition at line 101 of file platform.h.
#define sr_js_platform_engine | ( | platform | ) | (platform & 0xF) |
Definition at line 103 of file platform.h.
#define sr_js_platform_free | ( | platform | ) | ((void)platform) |
Definition at line 99 of file platform.h.
#define sr_js_platform_init | ( | platform, | |
runtime, | |||
engine | |||
) | do { platform = _sr_js_platform_assemble(runtime, engine); } while (0) |
Definition at line 96 of file platform.h.
#define sr_js_platform_new | ( | ) | (_sr_js_platform_assemble(_SR_JS_RUNTIME_UNINIT, _SR_JS_ENGINE_UNINIT)) |
Definition at line 94 of file platform.h.
#define SR_JS_PLATFORM_NULL 0 |
Definition at line 89 of file platform.h.
#define sr_js_platform_runtime | ( | platform | ) | (platform >> 4) |
Definition at line 105 of file platform.h.
#define SR_JS_RUNTIME_VALIDITY_CHECK | ( | runtime | ) | (runtime > 0 && runtime < _SR_JS_RUNTIME_UPPER_BOUND) |
Definition at line 82 of file platform.h.
typedef uint32_t sr_js_platform_t |
Definition at line 87 of file platform.h.
enum sr_js_engine |
Definition at line 38 of file platform.h.
enum sr_js_runtime |
Definition at line 59 of file platform.h.