This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
/* | |
' is replaced with ' | |
& is replaced with & | |
" is replaced with " | |
< is replaced with < | |
> is replaced with > | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
metac_expr_t* MetaCParser_ParseExpr2(metac_parser_t* self, parse_expr_flags_t flags) | |
{ | |
metac_expr_t* result = NULL; | |
metac_token_t* currentToken = NULL; | |
metac_token_enum_t tokenType = tok_invalid; | |
metac_expr_kind_t leftOp = expr_invalid; | |
metac_expr_kind_t op = expr_invalid; | |
uint32_t prec = 0; | |
uint32_t opPrec = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// #include "../os/compat.h" | |
#include <stdint.h> | |
#include <assert.h> | |
#ifndef cast | |
# define cast(T) (T) | |
#endif | |
#ifdef __ARM_FEATURE_CRC32 | |
# define ARM_NEON_CRC32C |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>REPL UI with Add Tab Button</title> | |
<style> | |
/* Basic styles */ | |
.tab { | |
display: none; | |
} | |
.active { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Table: Fields | |
CREATE TABLE IF NOT EXISTS Fields ( | |
StructIndex INTEGER PRIMARY KEY NOT NULL, | |
FieldIndex INTEGER, | |
Identifier INTEGER, | |
TypeIndex INTEGER, | |
Offset INTEGER, | |
FOREIGN KEY (Identifier) REFERENCES Identifiers (Index), | |
FOREIGN KEY (TypeIndex) REFERENCES Types (Index) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define ACCEL ACCEL_TABLE | |
#define NO_FIBERS | |
#define NO_PREPROCESSOR | |
#include "compat.h" | |
#include "metac_driver.c" | |
#include "utils/read_file.c" | |
#include "metac_parser_obj.c" | |
#include "metac_semantic_obj.c" | |
#include "metac_lpp.c" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define ACCEL ACCEL_TABLE | |
#define NO_FIBERS | |
#define NO_PREPROCESSOR | |
#include "compat.h" | |
#include "metac_driver.c" | |
#include "utils/read_file.c" | |
#include "metac_parser_obj.c" | |
#include "metac_semantic_obj.c" | |
#include "metac_lpp.c" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define NO_FIBERS | |
#define ACCEL ACCEL_TABLE | |
#include "../compat.h" | |
#include "../utils/read_file.c" | |
#include "../crc32c.h" | |
#include "../metac_parser_obj.c" | |
#include "../metac_semantic_obj.c" | |
#include "../metac_driver.c" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define SPWAN_TASK(RESULT, FUNC, ...) do { \ | |
taskqueue_t* q = &CurrentWorker()->Queue; \ | |
task_t task = {0}; \ | |
CTX_TYPE(FUNC) ctx = {__VA_ARGS__}; \ | |
CTX_TYPE(FUNC)* ctxPtr = &ctx; \ | |
STATIC_ASSERT(sizeof(task._inlineContext) >= sizeof(CTX_TYPE(FUNC)), \ | |
"Context size too large for inline context storage"); \ | |
task.Context = task._inlineContext; \ | |
task.TaskFunction = CAT(FUNC, Task); \ | |
task.Parent = CurrentTask(); \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint8_t getMask(const int16_t hash, const int16x8_t LRU) | |
{ | |
// assert(hash & 0xF == 0); | |
const int16x8_t hash8 = {hash, hash, hash, hash, | |
hash, hash, hash, hash}; | |
const int16x8_t LRUHashes = LRU & ~0xF; | |
const int16x8_t matches = LRUHashes == hash8; | |
// == sets the result element to 0xFF on match | |
const int16x8_t multi = {1 << 0, 1 << 1, 1 << 2, 1 << 3, | |
1 << 4, 1 << 5, 1 << 6, 1 << 7}; |
NewerOlder