winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2016
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
722 discussions
Start a n
N
ew thread
André Hentschel : shell32: Provide helper function a buffer of correct size.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 1010372778978a30fb7f9d36d51c0cdacfb1c2c7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1010372778978a30fb7f9d36d…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Wed Mar 23 20:25:12 2016 +0100 shell32: Provide helper function a buffer of correct size. Signed-off-by: André Hentschel <nerv(a)dawncrow.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/shlexec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index 5fcbe03..6aa3eec 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -1087,6 +1087,7 @@ HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpR { UINT_PTR retval = SE_ERR_NOASSOC; WCHAR old_dir[1024]; + WCHAR res[MAX_PATH]; TRACE("File %s, Dir %s\n", debugstr_w(lpFile), debugstr_w(lpDirectory)); @@ -1100,7 +1101,10 @@ HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpR SetCurrentDirectoryW(lpDirectory); } - retval = SHELL_FindExecutable(lpDirectory, lpFile, wszOpen, lpResult, MAX_PATH, NULL, NULL, NULL, NULL); + retval = SHELL_FindExecutable(lpDirectory, lpFile, wszOpen, res, MAX_PATH, NULL, NULL, NULL, NULL); + + if (retval > 32) + strcpyW(lpResult, res); TRACE("returning %s\n", debugstr_w(lpResult)); if (lpDirectory)
1
0
0
0
Andrew Eikum : winecoreaudio.drv: Ensure divide-by-zero SSE exceptions are masked before calling AudioConverterNew.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 8efa49375a92913be3db11c7028c8f7eabccfce7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8efa49375a92913be3db11c70…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Fri Mar 25 08:26:11 2016 -0500 winecoreaudio.drv: Ensure divide-by-zero SSE exceptions are masked before calling AudioConverterNew. AudioConverterNew can trigger a divide-by-zero exception. Normally this is masked by the default SSE mask flags. However, iRacing disables this mask, leading to a crash when it tries to initialize a recording device. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winecoreaudio.drv/mmdevdrv.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c index 9f9fd0d..8316d65 100644 --- a/dlls/winecoreaudio.drv/mmdevdrv.c +++ b/dlls/winecoreaudio.drv/mmdevdrv.c @@ -36,6 +36,7 @@ #include <sys/stat.h> #include <sys/ioctl.h> #include <fcntl.h> +#include <fenv.h> #include <unistd.h> #include <libkern/OSAtomic.h> @@ -1233,6 +1234,8 @@ static HRESULT ca_setup_audiounit(EDataFlow dataflow, AudioComponentInstance uni AudioStreamBasicDescription desc; UInt32 size; Float64 rate; + fenv_t fenv; + BOOL fenv_stored = TRUE; hr = ca_get_audiodesc(&desc, fmt); if(FAILED(hr)) @@ -1262,7 +1265,17 @@ static HRESULT ca_setup_audiounit(EDataFlow dataflow, AudioComponentInstance uni return osstatus_to_hresult(sc); } + /* AudioConverterNew requires divide-by-zero SSE exceptions to be masked */ + if(feholdexcept(&fenv)){ + WARN("Failed to store fenv state\n"); + fenv_stored = FALSE; + } + sc = AudioConverterNew(dev_desc, &desc, converter); + + if(fenv_stored && fesetenv(&fenv)) + WARN("Failed to restore fenv state\n"); + if(sc != noErr){ WARN("Couldn't create audio converter: %x\n", (int)sc); return osstatus_to_hresult(sc);
1
0
0
0
Paul Gofman : wined3d: Support D3DFMT_L8 format as render target.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: d05edd03c43aa826738770910fd5f0a8c0a52b2f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d05edd03c43aa826738770910…
Author: Paul Gofman <gofmanp(a)gmail.com> Date: Fri Mar 25 12:04:00 2016 +0300 wined3d: Support D3DFMT_L8 format as render target. Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/utils.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index df22e80..e5a3ee6 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -1262,15 +1262,16 @@ static const struct wined3d_format_texture_info format_texture_info[] = WINED3DFMT_FLAG_TEXTURE, ARB_TEXTURE_RG, NULL}, /* Luminance */ - {WINED3DFMT_L8_UNORM, GL_R8, GL_R8, 0, - GL_RED, GL_UNSIGNED_BYTE, 0, - WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING, - ARB_TEXTURE_RG, NULL}, {WINED3DFMT_L8_UNORM, GL_LUMINANCE8, GL_SLUMINANCE8_EXT, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, 0, WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_SRGB_READ, WINED3D_GL_LEGACY_CONTEXT, NULL}, + {WINED3DFMT_L8_UNORM, GL_R8, GL_R8, 0, + GL_RED, GL_UNSIGNED_BYTE, 0, + WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING + | WINED3DFMT_FLAG_RENDERTARGET, + ARB_TEXTURE_RG, NULL}, {WINED3DFMT_L8A8_UNORM, GL_RG8, GL_RG8, 0, GL_RG, GL_UNSIGNED_BYTE, 0, WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING, @@ -2921,9 +2922,6 @@ static void apply_format_fixups(struct wined3d_adapter *adapter, struct wined3d_ idx = get_format_idx(WINED3DFMT_A8_UNORM); gl_info->formats[idx].color_fixup = create_color_fixup_desc( 0, CHANNEL_SOURCE_ZERO, 0, CHANNEL_SOURCE_ZERO, 0, CHANNEL_SOURCE_ZERO, 0, CHANNEL_SOURCE_X); - idx = get_format_idx(WINED3DFMT_L8_UNORM); - gl_info->formats[idx].color_fixup = create_color_fixup_desc( - 0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_ONE); idx = get_format_idx(WINED3DFMT_L8A8_UNORM); gl_info->formats[idx].color_fixup = create_color_fixup_desc( 0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_Y); @@ -2938,6 +2936,13 @@ static void apply_format_fixups(struct wined3d_adapter *adapter, struct wined3d_ 0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_X); } + if (gl_info->supported[ARB_TEXTURE_RG]) + { + idx = get_format_idx(WINED3DFMT_L8_UNORM); + gl_info->formats[idx].color_fixup = create_color_fixup_desc( + 0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_ONE); + } + if (gl_info->supported[ARB_FRAGMENT_PROGRAM]) { idx = get_format_idx(WINED3DFMT_P8_UINT);
1
0
0
0
Jacek Caban : jscript: Store entry scope chain in call_frame_t.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 400435dbe394cebc93ff9af8e1950a54df18f82c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=400435dbe394cebc93ff9af8e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Mar 25 12:04:19 2016 +0100 jscript: Store entry scope chain in call_frame_t. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/engine.c | 8 +++----- dlls/jscript/engine.h | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 3492bb0..9bf1bfb 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -2466,7 +2466,6 @@ static HRESULT unwind_exception(exec_ctx_t *ctx) static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t *ret) { exec_ctx_t *exec_ctx = ctx->call_ctx->exec_ctx; - scope_chain_t *prev_scope; call_frame_t *frame; jsop_t op; HRESULT hres = S_OK; @@ -2474,7 +2473,6 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t TRACE("\n"); frame = ctx->call_ctx; - prev_scope = frame->scope; while(frame->ip != -1) { op = frame->bytecode->instrs[frame->ip].op; @@ -2496,13 +2494,13 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t assert(ctx->call_ctx == frame); if(FAILED(hres)) { - while(frame->scope != prev_scope) + while(frame->scope != frame->base_scope) scope_pop(&frame->scope); stack_popn(exec_ctx, exec_ctx->top-frame->stack_base); } assert(exec_ctx->top == frame->stack_base); - assert(frame->scope == prev_scope); + assert(frame->scope == frame->base_scope); ctx->call_ctx = frame->prev_frame; release_call_frame(frame); @@ -2565,7 +2563,7 @@ static HRESULT setup_call_frame(exec_ctx_t *ctx, bytecode_t *bytecode, function_ frame->stack_base = ctx->top; if(scope) - frame->scope = scope_addref(scope); + frame->base_scope = frame->scope = scope_addref(scope); frame->exec_ctx = ctx; diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index c46ca7c..82ff4ed 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -196,6 +196,7 @@ typedef struct _call_frame_t { except_frame_t *except_frame; unsigned stack_base; scope_chain_t *scope; + scope_chain_t *base_scope; bytecode_t *bytecode; function_code_t *function;
1
0
0
0
Jacek Caban : jscript: Store current scope chain in call_frame_t.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 49ecfa950b207c97155dc285d5456e7caf74cb9f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=49ecfa950b207c97155dc285d…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Mar 25 12:04:13 2016 +0100 jscript: Store current scope chain in call_frame_t. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/engine.c | 47 ++++++++++++++++++++++------------------------- dlls/jscript/engine.h | 9 +++++---- dlls/jscript/function.c | 8 ++++---- dlls/jscript/global.c | 5 +++-- dlls/jscript/jscript.c | 8 ++++---- 5 files changed, 38 insertions(+), 39 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=49ecfa950b207c97155dc…
1
0
0
0
Jacek Caban : jscript: Store stack base in call_frame_t.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 0e32c0990143469c8578a86f0c1ce8b748c67365 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0e32c0990143469c8578a86f0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Mar 25 12:03:55 2016 +0100 jscript: Store stack base in call_frame_t. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/engine.c | 17 +++++++++-------- dlls/jscript/engine.h | 1 + 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index f622233..db6c2ae 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -2471,7 +2471,6 @@ static HRESULT unwind_exception(exec_ctx_t *ctx) static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t *ret) { exec_ctx_t *exec_ctx = ctx->call_ctx->exec_ctx; - unsigned prev_top; scope_chain_t *prev_scope; call_frame_t *frame; jsop_t op; @@ -2480,7 +2479,6 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t TRACE("\n"); frame = ctx->call_ctx; - prev_top = exec_ctx->top; prev_scope = exec_ctx->scope_chain; while(frame->ip != -1) { @@ -2501,19 +2499,21 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t } assert(ctx->call_ctx == frame); - ctx->call_ctx = frame->prev_frame; - release_call_frame(frame); if(FAILED(hres)) { while(exec_ctx->scope_chain != prev_scope) scope_pop(&exec_ctx->scope_chain); - stack_popn(exec_ctx, exec_ctx->top-prev_top); - return hres; + stack_popn(exec_ctx, exec_ctx->top-frame->stack_base); } - assert(exec_ctx->top == prev_top+1 || exec_ctx->top == prev_top); + assert(exec_ctx->top == frame->stack_base); + ctx->call_ctx = frame->prev_frame; + release_call_frame(frame); + + if(FAILED(hres)) + return hres; + assert(exec_ctx->scope_chain == prev_scope); - assert(exec_ctx->top == prev_top); *ret = exec_ctx->ret; exec_ctx->ret = jsval_undefined(); @@ -2568,6 +2568,7 @@ static HRESULT setup_call_frame(exec_ctx_t *ctx, bytecode_t *bytecode, function_ frame->bytecode = bytecode; frame->function = function; frame->ip = function->instr_off; + frame->stack_base = ctx->top; frame->exec_ctx = ctx; diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index ddbea50..e803047 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -193,6 +193,7 @@ struct _parser_ctx_t; typedef struct _call_frame_t { unsigned ip; except_frame_t *except_frame; + unsigned stack_base; bytecode_t *bytecode; function_code_t *function;
1
0
0
0
Jacek Caban : jscript: Store instruction pointer in call_frame_t.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: a120ecbefc5b23c3d6167f50ebf76dd2699d4c39 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a120ecbefc5b23c3d6167f50e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Mar 25 12:03:45 2016 +0100 jscript: Store instruction pointer in call_frame_t. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/engine.c | 35 +++++++++++++++++++---------------- dlls/jscript/engine.h | 3 +-- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 8688d4f..f622233 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -568,33 +568,38 @@ static HRESULT identifier_eval(script_ctx_t *ctx, BSTR identifier, exprval_t *re } static inline BSTR get_op_bstr(exec_ctx_t *ctx, int i){ - return ctx->script->call_ctx->bytecode->instrs[ctx->ip].u.arg[i].bstr; + call_frame_t *frame = ctx->script->call_ctx; + return frame->bytecode->instrs[frame->ip].u.arg[i].bstr; } static inline unsigned get_op_uint(exec_ctx_t *ctx, int i){ - return ctx->script->call_ctx->bytecode->instrs[ctx->ip].u.arg[i].uint; + call_frame_t *frame = ctx->script->call_ctx; + return frame->bytecode->instrs[frame->ip].u.arg[i].uint; } static inline unsigned get_op_int(exec_ctx_t *ctx, int i){ - return ctx->script->call_ctx->bytecode->instrs[ctx->ip].u.arg[i].lng; + call_frame_t *frame = ctx->script->call_ctx; + return frame->bytecode->instrs[frame->ip].u.arg[i].lng; } static inline jsstr_t *get_op_str(exec_ctx_t *ctx, int i){ - return ctx->script->call_ctx->bytecode->instrs[ctx->ip].u.arg[i].str; + call_frame_t *frame = ctx->script->call_ctx; + return frame->bytecode->instrs[frame->ip].u.arg[i].str; } static inline double get_op_double(exec_ctx_t *ctx){ - return ctx->script->call_ctx->bytecode->instrs[ctx->ip].u.dbl; + call_frame_t *frame = ctx->script->call_ctx; + return frame->bytecode->instrs[frame->ip].u.dbl; } static inline void jmp_next(exec_ctx_t *ctx) { - ctx->ip++; + ctx->script->call_ctx->ip++; } static inline void jmp_abs(exec_ctx_t *ctx, unsigned dst) { - ctx->ip = dst; + ctx->script->call_ctx->ip = dst; } /* ECMA-262 3rd Edition 12.2 */ @@ -2428,7 +2433,7 @@ static HRESULT unwind_exception(exec_ctx_t *ctx) while(except_frame->scope != ctx->scope_chain) scope_pop(&ctx->scope_chain); - ctx->ip = except_frame->catch_off; + frame->ip = except_frame->catch_off; except_val = ctx->script->ei.val; ctx->script->ei.val = jsval_undefined(); @@ -2466,7 +2471,7 @@ static HRESULT unwind_exception(exec_ctx_t *ctx) static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t *ret) { exec_ctx_t *exec_ctx = ctx->call_ctx->exec_ctx; - unsigned prev_ip, prev_top; + unsigned prev_top; scope_chain_t *prev_scope; call_frame_t *frame; jsop_t op; @@ -2477,11 +2482,9 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t frame = ctx->call_ctx; prev_top = exec_ctx->top; prev_scope = exec_ctx->scope_chain; - prev_ip = exec_ctx->ip; - exec_ctx->ip = func->instr_off; - while(exec_ctx->ip != -1) { - op = frame->bytecode->instrs[exec_ctx->ip].op; + while(frame->ip != -1) { + op = frame->bytecode->instrs[frame->ip].op; hres = op_funcs[op](exec_ctx); if(FAILED(hres)) { TRACE("EXCEPTION %08x\n", hres); @@ -2493,12 +2496,10 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t if(FAILED(hres)) break; }else { - exec_ctx->ip += op_move[op]; + frame->ip += op_move[op]; } } - exec_ctx->ip = prev_ip; - assert(ctx->call_ctx == frame); ctx->call_ctx = frame->prev_frame; release_call_frame(frame); @@ -2566,6 +2567,8 @@ static HRESULT setup_call_frame(exec_ctx_t *ctx, bytecode_t *bytecode, function_ frame->bytecode = bytecode; frame->function = function; + frame->ip = function->instr_off; + frame->exec_ctx = ctx; frame->prev_frame = ctx->script->call_ctx; diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index e31b9b9..ddbea50 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -191,6 +191,7 @@ typedef struct _except_frame_t except_frame_t; struct _parser_ctx_t; typedef struct _call_frame_t { + unsigned ip; except_frame_t *except_frame; bytecode_t *bytecode; @@ -213,8 +214,6 @@ struct _exec_ctx_t { unsigned stack_size; unsigned top; jsval_t ret; - - unsigned ip; }; static inline void exec_addref(exec_ctx_t *ctx)
1
0
0
0
Jacek Caban : jscript: Store exception frame in call_frame_t.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: fa5d9b3db132a13ad0527fb57f4bfadd0f288df2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fa5d9b3db132a13ad0527fb57…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Mar 25 12:03:35 2016 +0100 jscript: Store exception frame in call_frame_t. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/engine.c | 21 ++++++++++----------- dlls/jscript/engine.h | 3 ++- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 3118994..8688d4f 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -764,6 +764,7 @@ static HRESULT interp_push_except(exec_ctx_t *ctx) { const unsigned arg1 = get_op_uint(ctx, 0); const BSTR arg2 = get_op_bstr(ctx, 1); + call_frame_t *frame = ctx->script->call_ctx; except_frame_t *except; unsigned stack_top; @@ -790,22 +791,23 @@ static HRESULT interp_push_except(exec_ctx_t *ctx) except->scope = ctx->scope_chain; except->catch_off = arg1; except->ident = arg2; - except->next = ctx->except_frame; - ctx->except_frame = except; + except->next = frame->except_frame; + frame->except_frame = except; return S_OK; } /* ECMA-262 3rd Edition 12.14 */ static HRESULT interp_pop_except(exec_ctx_t *ctx) { + call_frame_t *frame = ctx->script->call_ctx; except_frame_t *except; TRACE("\n"); - except = ctx->except_frame; + except = frame->except_frame; assert(except != NULL); - ctx->except_frame = except->next; + frame->except_frame = except->next; heap_free(except); return S_OK; } @@ -2411,13 +2413,14 @@ static void release_call_frame(call_frame_t *frame) static HRESULT unwind_exception(exec_ctx_t *ctx) { + call_frame_t *frame = ctx->script->call_ctx; except_frame_t *except_frame; jsval_t except_val; BSTR ident; HRESULT hres; - except_frame = ctx->except_frame; - ctx->except_frame = except_frame->next; + except_frame = frame->except_frame; + frame->except_frame = except_frame->next; assert(except_frame->stack_top <= ctx->top); stack_popn(ctx, ctx->top - except_frame->stack_top); @@ -2463,7 +2466,6 @@ static HRESULT unwind_exception(exec_ctx_t *ctx) static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t *ret) { exec_ctx_t *exec_ctx = ctx->call_ctx->exec_ctx; - except_frame_t *prev_except_frame; unsigned prev_ip, prev_top; scope_chain_t *prev_scope; call_frame_t *frame; @@ -2475,10 +2477,8 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t frame = ctx->call_ctx; prev_top = exec_ctx->top; prev_scope = exec_ctx->scope_chain; - prev_except_frame = exec_ctx->except_frame; prev_ip = exec_ctx->ip; exec_ctx->ip = func->instr_off; - exec_ctx->except_frame = NULL; while(exec_ctx->ip != -1) { op = frame->bytecode->instrs[exec_ctx->ip].op; @@ -2486,7 +2486,7 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t if(FAILED(hres)) { TRACE("EXCEPTION %08x\n", hres); - if(!exec_ctx->except_frame) + if(!frame->except_frame) break; hres = unwind_exception(exec_ctx); @@ -2498,7 +2498,6 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t } exec_ctx->ip = prev_ip; - exec_ctx->except_frame = prev_except_frame; assert(ctx->call_ctx == frame); ctx->call_ctx = frame->prev_frame; diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index 31b904c..e31b9b9 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -191,6 +191,8 @@ typedef struct _except_frame_t except_frame_t; struct _parser_ctx_t; typedef struct _call_frame_t { + except_frame_t *except_frame; + bytecode_t *bytecode; function_code_t *function; @@ -210,7 +212,6 @@ struct _exec_ctx_t { jsval_t *stack; unsigned stack_size; unsigned top; - except_frame_t *except_frame; jsval_t ret; unsigned ip;
1
0
0
0
Jacek Caban : jscript: Added new helpers for jumps.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 53ecdb6549eccd84657d8b20ad0d9ba6dd7f987f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=53ecdb6549eccd84657d8b20a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Mar 25 12:03:25 2016 +0100 jscript: Added new helpers for jumps. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/engine.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 333df27..3118994 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -587,6 +587,16 @@ static inline double get_op_double(exec_ctx_t *ctx){ return ctx->script->call_ctx->bytecode->instrs[ctx->ip].u.dbl; } +static inline void jmp_next(exec_ctx_t *ctx) +{ + ctx->ip++; +} + +static inline void jmp_abs(exec_ctx_t *ctx, unsigned dst) +{ + ctx->ip = dst; +} + /* ECMA-262 3rd Edition 12.2 */ static HRESULT interp_var_set(exec_ctx_t *ctx) { @@ -656,10 +666,10 @@ static HRESULT interp_forin(exec_ctx_t *ctx) if(FAILED(hres)) return hres; - ctx->ip++; + jmp_next(ctx); }else { stack_popn(ctx, 4); - ctx->ip = arg; + jmp_abs(ctx, arg); } return S_OK; } @@ -711,9 +721,9 @@ static HRESULT interp_case(exec_ctx_t *ctx) if(b) { stack_popn(ctx, 1); - ctx->ip = arg; + jmp_abs(ctx, arg); }else { - ctx->ip++; + jmp_next(ctx); } return S_OK; } @@ -1260,10 +1270,10 @@ static HRESULT interp_cnd_nz(exec_ctx_t *ctx) return hres; if(b) { - ctx->ip = arg; + jmp_abs(ctx, arg); }else { stack_popn(ctx, 1); - ctx->ip++; + jmp_next(ctx); } return S_OK; } @@ -1283,9 +1293,9 @@ static HRESULT interp_cnd_z(exec_ctx_t *ctx) if(b) { stack_popn(ctx, 1); - ctx->ip++; + jmp_next(ctx); }else { - ctx->ip = arg; + jmp_abs(ctx, arg); } return S_OK; } @@ -2327,7 +2337,7 @@ static HRESULT interp_jmp(exec_ctx_t *ctx) TRACE("%u\n", arg); - ctx->ip = arg; + jmp_abs(ctx, arg); return S_OK; } @@ -2347,9 +2357,9 @@ static HRESULT interp_jmp_z(exec_ctx_t *ctx) return hres; if(b) - ctx->ip++; + jmp_next(ctx); else - ctx->ip = arg; + jmp_abs(ctx, arg); return S_OK; } @@ -2367,7 +2377,7 @@ static HRESULT interp_ret(exec_ctx_t *ctx) { TRACE("\n"); - ctx->ip = -1; + jmp_abs(ctx, -1); return S_OK; }
1
0
0
0
Jacek Caban : jscript: Store function description in call_frame_t.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 132ff14d3739b03549244af07d442209b4a3fc31 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=132ff14d3739b03549244af07…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Mar 25 12:03:11 2016 +0100 jscript: Store function description in call_frame_t. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/engine.c | 12 +++++------- dlls/jscript/engine.h | 3 +-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 8b0477f..333df27 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -825,12 +825,13 @@ static HRESULT interp_end_finally(exec_ctx_t *ctx) static HRESULT interp_func(exec_ctx_t *ctx) { unsigned func_idx = get_op_uint(ctx, 0); + call_frame_t *frame = ctx->script->call_ctx; jsdisp_t *dispex; HRESULT hres; TRACE("%d\n", func_idx); - hres = create_source_function(ctx->script, ctx->script->call_ctx->bytecode, ctx->func_code->funcs+func_idx, + hres = create_source_function(ctx->script, frame->bytecode, frame->function->funcs+func_idx, ctx->scope_chain, &dispex); if(FAILED(hres)) return hres; @@ -2453,7 +2454,6 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t { exec_ctx_t *exec_ctx = ctx->call_ctx->exec_ctx; except_frame_t *prev_except_frame; - function_code_t *prev_func; unsigned prev_ip, prev_top; scope_chain_t *prev_scope; call_frame_t *frame; @@ -2467,10 +2467,8 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t prev_scope = exec_ctx->scope_chain; prev_except_frame = exec_ctx->except_frame; prev_ip = exec_ctx->ip; - prev_func = exec_ctx->func_code; exec_ctx->ip = func->instr_off; exec_ctx->except_frame = NULL; - exec_ctx->func_code = func; while(exec_ctx->ip != -1) { op = frame->bytecode->instrs[exec_ctx->ip].op; @@ -2491,7 +2489,6 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t exec_ctx->ip = prev_ip; exec_ctx->except_frame = prev_except_frame; - exec_ctx->func_code = prev_func; assert(ctx->call_ctx == frame); ctx->call_ctx = frame->prev_frame; @@ -2550,7 +2547,7 @@ static HRESULT bind_event_target(script_ctx_t *ctx, function_code_t *func, jsdis return hres; } -static HRESULT setup_call_frame(exec_ctx_t *ctx, bytecode_t *bytecode) +static HRESULT setup_call_frame(exec_ctx_t *ctx, bytecode_t *bytecode, function_code_t *function) { call_frame_t *frame; @@ -2559,6 +2556,7 @@ static HRESULT setup_call_frame(exec_ctx_t *ctx, bytecode_t *bytecode) return E_OUTOFMEMORY; frame->bytecode = bytecode; + frame->function = function; frame->exec_ctx = ctx; frame->prev_frame = ctx->script->call_ctx; @@ -2601,7 +2599,7 @@ HRESULT exec_source(exec_ctx_t *ctx, bytecode_t *code, function_code_t *func, js } } - hres = setup_call_frame(ctx, code); + hres = setup_call_frame(ctx, code, func); if(FAILED(hres)) return hres; diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index fc99c68..31b904c 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -192,6 +192,7 @@ struct _parser_ctx_t; typedef struct _call_frame_t { bytecode_t *bytecode; + function_code_t *function; struct _call_frame_t *prev_frame; exec_ctx_t *exec_ctx; @@ -200,12 +201,10 @@ typedef struct _call_frame_t { struct _exec_ctx_t { LONG ref; - struct _parser_ctx_t *parser; script_ctx_t *script; scope_chain_t *scope_chain; jsdisp_t *var_disp; IDispatch *this_obj; - function_code_t *func_code; BOOL is_global; jsval_t *stack;
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
...
73
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Results per page:
10
25
50
100
200