Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Roblox
GitHub Repository: Roblox/luau
Path: blob/master/CodeGen/include/Luau/CodeGenCommon.h
2727 views
1
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
2
#pragma once
3
4
#include "Luau/Common.h"
5
6
#if defined(LUAU_ASSERTENABLED)
7
#define CODEGEN_ASSERT(expr) ((void)(!!(expr) || (Luau::assertCallHandler(#expr, __FILE__, __LINE__, __FUNCTION__) && (LUAU_DEBUGBREAK(), 0))))
8
#elif defined(CODEGEN_ENABLE_ASSERT_HANDLER)
9
#define CODEGEN_ASSERT(expr) ((void)(!!(expr) || Luau::assertCallHandler(#expr, __FILE__, __LINE__, __FUNCTION__)))
10
#else
11
#define CODEGEN_ASSERT(expr) (void)sizeof(!!(expr))
12
#endif
13
14
#if defined(__x86_64__) || defined(_M_X64)
15
#define CODEGEN_TARGET_X64
16
#elif defined(__aarch64__) || defined(_M_ARM64)
17
#define CODEGEN_TARGET_A64
18
#endif
19
20