aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2015-09-20 19:18:31 +0200
committerMike Pall <mike>2015-09-20 19:18:31 +0200
commit49427dfcc2bb9ac60cd6023a59b0f788fcd38c3c (patch)
tree2e3482d7b82fedb861d219fc51607d3c9ca63c9d
parent55c3b29f7b20f3801848e0ab71e9de1d22207b95 (diff)
parent076d625dc6046c5f05d55a95d3b9afd5637d5a5a (diff)
downloadluajit-49427dfcc2bb9ac60cd6023a59b0f788fcd38c3c.tar.gz
luajit-49427dfcc2bb9ac60cd6023a59b0f788fcd38c3c.tar.bz2
luajit-49427dfcc2bb9ac60cd6023a59b0f788fcd38c3c.zip
Merge branch 'master' into v2.1
-rw-r--r--src/lj_alloc.c2
-rw-r--r--src/lj_arch.h6
-rw-r--r--src/lj_err.c6
3 files changed, 10 insertions, 4 deletions
diff --git a/src/lj_alloc.c b/src/lj_alloc.c
index 0aad826d..ddd50cae 100644
--- a/src/lj_alloc.c
+++ b/src/lj_alloc.c
@@ -196,7 +196,7 @@ static LJ_AINLINE void *CALL_MMAP(size_t size)
196 return ptr; 196 return ptr;
197} 197}
198 198
199#elif LJ_TARGET_OSX || LJ_TARGET_PS4 || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__sun__) 199#elif LJ_TARGET_OSX || LJ_TARGET_PS4 || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__sun__) || defined(__CYGWIN__)
200 200
201/* OSX and FreeBSD mmap() use a naive first-fit linear search. 201/* OSX and FreeBSD mmap() use a naive first-fit linear search.
202** That's perfect for us. Except that -pagezero_size must be set for OSX, 202** That's perfect for us. Except that -pagezero_size must be set for OSX,
diff --git a/src/lj_arch.h b/src/lj_arch.h
index f1e7d7f4..b72dbcca 100644
--- a/src/lj_arch.h
+++ b/src/lj_arch.h
@@ -155,7 +155,11 @@
155#define LJ_ARCH_NAME "x64" 155#define LJ_ARCH_NAME "x64"
156#define LJ_ARCH_BITS 64 156#define LJ_ARCH_BITS 64
157#define LJ_ARCH_ENDIAN LUAJIT_LE 157#define LJ_ARCH_ENDIAN LUAJIT_LE
158#define LJ_ABI_WIN LJ_TARGET_WINDOWS 158#if LJ_TARGET_WINDOWS || __CYGWIN__
159#define LJ_ABI_WIN 1
160#else
161#define LJ_ABI_WIN 0
162#endif
159#define LJ_TARGET_X64 1 163#define LJ_TARGET_X64 1
160#define LJ_TARGET_X86ORX64 1 164#define LJ_TARGET_X86ORX64 1
161#define LJ_TARGET_EHRETREG 0 165#define LJ_TARGET_EHRETREG 0
diff --git a/src/lj_err.c b/src/lj_err.c
index 2e20c2c0..9ac0c988 100644
--- a/src/lj_err.c
+++ b/src/lj_err.c
@@ -183,7 +183,7 @@ static void *err_unwind(lua_State *L, void *stopcf, int errcode)
183 183
184/* -- External frame unwinding -------------------------------------------- */ 184/* -- External frame unwinding -------------------------------------------- */
185 185
186#if defined(__GNUC__) && !LJ_NO_UNWIND && !LJ_TARGET_WINDOWS 186#if defined(__GNUC__) && !LJ_NO_UNWIND && !LJ_ABI_WIN
187 187
188/* 188/*
189** We have to use our own definitions instead of the mandatory (!) unwind.h, 189** We have to use our own definitions instead of the mandatory (!) unwind.h,
@@ -349,7 +349,7 @@ LJ_FUNCA int lj_err_unwind_arm(int state, void *ucb, _Unwind_Context *ctx)
349 349
350#endif 350#endif
351 351
352#elif LJ_TARGET_X64 && LJ_TARGET_WINDOWS 352#elif LJ_TARGET_X64 && LJ_ABI_WIN
353 353
354/* 354/*
355** Someone in Redmond owes me several days of my life. A lot of this is 355** Someone in Redmond owes me several days of my life. A lot of this is
@@ -414,7 +414,9 @@ LJ_FUNCA EXCEPTION_DISPOSITION lj_err_unwind_win64(EXCEPTION_RECORD *rec,
414 if (cf2) { /* We catch it, so start unwinding the upper frames. */ 414 if (cf2) { /* We catch it, so start unwinding the upper frames. */
415 if (rec->ExceptionCode == LJ_MSVC_EXCODE || 415 if (rec->ExceptionCode == LJ_MSVC_EXCODE ||
416 rec->ExceptionCode == LJ_GCC_EXCODE) { 416 rec->ExceptionCode == LJ_GCC_EXCODE) {
417#if LJ_TARGET_WINDOWS
417 __DestructExceptionObject(rec, 1); 418 __DestructExceptionObject(rec, 1);
419#endif
418 setstrV(L, L->top++, lj_err_str(L, LJ_ERR_ERRCPP)); 420 setstrV(L, L->top++, lj_err_str(L, LJ_ERR_ERRCPP));
419 } else if (!LJ_EXCODE_CHECK(rec->ExceptionCode)) { 421 } else if (!LJ_EXCODE_CHECK(rec->ExceptionCode)) {
420 /* Don't catch access violations etc. */ 422 /* Don't catch access violations etc. */