diff options
author | Mike Pall <mike> | 2013-09-03 16:02:54 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2013-09-03 16:02:54 +0200 |
commit | f8cecffbbf0fdb7a038d48c136a4bba67c64881e (patch) | |
tree | 642ff017e1d3c5c392c1177cf7288b1c74785799 | |
parent | a4fa4dcfdf5649fb5df623f31648046113c70b61 (diff) | |
parent | b6ec7c7c86ac249ac40a241e1c9b47b729bbba3b (diff) | |
download | luajit-f8cecffbbf0fdb7a038d48c136a4bba67c64881e.tar.gz luajit-f8cecffbbf0fdb7a038d48c136a4bba67c64881e.tar.bz2 luajit-f8cecffbbf0fdb7a038d48c136a4bba67c64881e.zip |
Merge branch 'master' into v2.1
-rw-r--r-- | src/lj_debug.c | 17 | ||||
-rw-r--r-- | src/ljamalg.c | 2 | ||||
-rw-r--r-- | src/xedkbuild.bat | 8 |
3 files changed, 17 insertions, 10 deletions
diff --git a/src/lj_debug.c b/src/lj_debug.c index 8166fcc0..92c216f9 100644 --- a/src/lj_debug.c +++ b/src/lj_debug.c | |||
@@ -72,9 +72,18 @@ static BCPos debug_framepc(lua_State *L, GCfunc *fn, cTValue *nextframe) | |||
72 | /* Lua function below errfunc/gc/hook: find cframe to get the PC. */ | 72 | /* Lua function below errfunc/gc/hook: find cframe to get the PC. */ |
73 | void *cf = cframe_raw(L->cframe); | 73 | void *cf = cframe_raw(L->cframe); |
74 | TValue *f = L->base-1; | 74 | TValue *f = L->base-1; |
75 | if (cf == NULL) | 75 | for (;;) { |
76 | return NO_BCPOS; | 76 | if (cf == NULL) |
77 | while (f > nextframe) { | 77 | return NO_BCPOS; |
78 | while (cframe_nres(cf) < 0) { | ||
79 | if (f >= restorestack(L, -cframe_nres(cf))) | ||
80 | break; | ||
81 | cf = cframe_raw(cframe_prev(cf)); | ||
82 | if (cf == NULL) | ||
83 | return NO_BCPOS; | ||
84 | } | ||
85 | if (f < nextframe) | ||
86 | break; | ||
78 | if (frame_islua(f)) { | 87 | if (frame_islua(f)) { |
79 | f = frame_prevl(f); | 88 | f = frame_prevl(f); |
80 | } else { | 89 | } else { |
@@ -83,8 +92,6 @@ static BCPos debug_framepc(lua_State *L, GCfunc *fn, cTValue *nextframe) | |||
83 | f = frame_prevd(f); | 92 | f = frame_prevd(f); |
84 | } | 93 | } |
85 | } | 94 | } |
86 | if (cframe_prev(cf)) | ||
87 | cf = cframe_raw(cframe_prev(cf)); | ||
88 | ins = cframe_pc(cf); | 95 | ins = cframe_pc(cf); |
89 | } | 96 | } |
90 | } | 97 | } |
diff --git a/src/ljamalg.c b/src/ljamalg.c index 29fed380..6a4d6022 100644 --- a/src/ljamalg.c +++ b/src/ljamalg.c | |||
@@ -6,7 +6,7 @@ | |||
6 | /* | 6 | /* |
7 | +--------------------------------------------------------------------------+ | 7 | +--------------------------------------------------------------------------+ |
8 | | WARNING: Compiling the amalgamation needs a lot of virtual memory | | 8 | | WARNING: Compiling the amalgamation needs a lot of virtual memory | |
9 | | (around 200 MB with GCC 4.x)! If you don't have enough physical memory | | 9 | | (around 300 MB with GCC 4.x)! If you don't have enough physical memory | |
10 | | your machine will start swapping to disk and the compile will not finish | | 10 | | your machine will start swapping to disk and the compile will not finish | |
11 | | within a reasonable amount of time. | | 11 | | within a reasonable amount of time. | |
12 | | So either compile on a bigger machine or use the non-amalgamated build. | | 12 | | So either compile on a bigger machine or use the non-amalgamated build. | |
diff --git a/src/xedkbuild.bat b/src/xedkbuild.bat index 375f1955..adbce8be 100644 --- a/src/xedkbuild.bat +++ b/src/xedkbuild.bat | |||
@@ -54,13 +54,13 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c | |||
54 | @if errorlevel 1 goto :BAD | 54 | @if errorlevel 1 goto :BAD |
55 | 55 | ||
56 | @rem ---- Cross compiler ---- | 56 | @rem ---- Cross compiler ---- |
57 | @set LJCOMPILE="%XEDK%\bin\win32\cl" /nologo /c /MT /O2 /W3 /GF /Gm- /GR- /GS- /Gy /openmp- /D_CRT_SECURE_NO_DEPRECATE /DNDEBUG /D_XBOX /D_LIB /DLUAJIT_USE_SYSMALLOC | 57 | @set "LJCOMPILE=%XEDK%\bin\win32\cl /nologo /c /MT /O2 /W3 /GF /Gm- /GR- /GS- /Gy /openmp- /D_CRT_SECURE_NO_DEPRECATE /DNDEBUG /D_XBOX /D_LIB /DLUAJIT_USE_SYSMALLOC" |
58 | @set LJLIB="%XEDK%\bin\win32\lib" /nologo | 58 | @set "LJLIB=%XEDK%\bin\win32\lib /nologo" |
59 | @set INCLUDE="%XEDK%\include\xbox" | 59 | @set "INCLUDE=%XEDK%\include\xbox" |
60 | 60 | ||
61 | @if "%1" neq "debug" goto :NODEBUG | 61 | @if "%1" neq "debug" goto :NODEBUG |
62 | @shift | 62 | @shift |
63 | @set LJCOMPILE="%LJCOMPILE%" /Zi | 63 | @set "LJCOMPILE=%LJCOMPILE% /Zi" |
64 | :NODEBUG | 64 | :NODEBUG |
65 | @if "%1"=="amalg" goto :AMALG | 65 | @if "%1"=="amalg" goto :AMALG |
66 | %LJCOMPILE% /DLUA_BUILD_AS_DLL lj_*.c lib_*.c | 66 | %LJCOMPILE% /DLUA_BUILD_AS_DLL lj_*.c lib_*.c |