mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-01 17:30:53 +01:00
Fix apple & cgoto builds (oops)
This commit is contained in:
parent
e1e4a7aab2
commit
b55d427db1
2 changed files with 10 additions and 0 deletions
|
@ -1,5 +1,10 @@
|
|||
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
||||
#pragma once
|
||||
#ifdef __clang__
|
||||
#if __has_warning("-Wassume")
|
||||
#pragma clang diagnostic ignored "-Wassume"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Compiler codegen control macros
|
||||
#ifdef _MSC_VER
|
||||
|
@ -19,8 +24,12 @@
|
|||
#define LUAU_UNLIKELY(x) __builtin_expect(x, 0)
|
||||
#define LUAU_UNREACHABLE() __builtin_unreachable()
|
||||
#define LUAU_DEBUGBREAK() __builtin_trap()
|
||||
#ifdef __APPLE__
|
||||
#define LUAU_ASSUME(x) (void)sizeof(!!(x))
|
||||
#elif
|
||||
#define LUAU_ASSUME(x) __attribute__((assume(x)));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// LUAU_FALLTHROUGH is a C++11-compatible alternative to [[fallthrough]] for use in the VM library
|
||||
#if defined(__clang__) && defined(__has_warning)
|
||||
|
|
|
@ -236,6 +236,7 @@ reentry:
|
|||
VM_START(); // starts the interpreter "loop"
|
||||
|
||||
while (true) {
|
||||
dispatch:
|
||||
// Note: this code doesn't always execute! on some platforms we use computed goto which bypasses all of this unless we run in single-step mode
|
||||
// Therefore only ever put assertions here.
|
||||
LUAU_ASSERT(base == L->base && L->base == L->ci->base);
|
||||
|
|
Loading…
Add table
Reference in a new issue