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
Jacek Caban : jscript: Store return value in call_frame_t.
by Alexandre Julliard
28 Mar '16
28 Mar '16
Module: wine Branch: master Commit: 932ffa0de935734abd1eed030054bd54818bb154 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=932ffa0de935734abd1eed030…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Mar 25 17:49:56 2016 +0100 jscript: Store return value 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 | 23 ++++++++++++----------- dlls/jscript/engine.h | 4 ++-- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 349f932..0a46b58 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -305,7 +305,6 @@ HRESULT create_exec_ctx(script_ctx_t *script_ctx, BOOL is_global, exec_ctx_t **r ctx->ref = 1; ctx->is_global = is_global; - ctx->ret = jsval_undefined(); script_addref(script_ctx); ctx->script = script_ctx; @@ -321,7 +320,6 @@ void exec_release(exec_ctx_t *ctx) if(ctx->script) script_release(ctx->script); - jsval_release(ctx->ret); heap_free(ctx); } @@ -2361,10 +2359,12 @@ static HRESULT interp_ret(script_ctx_t *ctx) static HRESULT interp_setret(script_ctx_t *ctx) { + call_frame_t *frame = ctx->call_ctx; + TRACE("\n"); - jsval_release(ctx->call_ctx->exec_ctx->ret); - ctx->call_ctx->exec_ctx->ret = stack_pop(ctx); + jsval_release(frame->ret); + frame->ret = stack_pop(ctx); return S_OK; } @@ -2390,6 +2390,7 @@ static void release_call_frame(call_frame_t *frame) IDispatch_Release(frame->this_obj); if(frame->scope) scope_release(frame->scope); + jsval_release(frame->ret); heap_free(frame); } @@ -2447,7 +2448,6 @@ static HRESULT unwind_exception(script_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; call_frame_t *frame; jsop_t op; HRESULT hres = S_OK; @@ -2484,14 +2484,14 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t assert(ctx->stack_top == frame->stack_base); assert(frame->scope == frame->base_scope); ctx->call_ctx = frame->prev_frame; - release_call_frame(frame); - if(FAILED(hres)) - return hres; + if(SUCCEEDED(hres)) { + *ret = frame->ret; + frame->ret = jsval_undefined(); + } - *ret = exec_ctx->ret; - exec_ctx->ret = jsval_undefined(); - return S_OK; + release_call_frame(frame); + return hres; } static HRESULT bind_event_target(script_ctx_t *ctx, function_code_t *func, jsdisp_t *func_obj) @@ -2556,6 +2556,7 @@ static HRESULT setup_call_frame(exec_ctx_t *ctx, bytecode_t *bytecode, function_ frame->function = function; frame->ip = function->instr_off; frame->stack_base = ctx->script->stack_top; + frame->ret = jsval_undefined(); if(scope) frame->base_scope = frame->scope = scope_addref(scope); diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index 55ce72a..8b54bd2 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -198,6 +198,8 @@ typedef struct _call_frame_t { scope_chain_t *scope; scope_chain_t *base_scope; + jsval_t ret; + IDispatch *this_obj; jsdisp_t *variable_obj; @@ -213,8 +215,6 @@ struct _exec_ctx_t { script_ctx_t *script; BOOL is_global; - - jsval_t ret; }; static inline void exec_addref(exec_ctx_t *ctx)
1
0
0
0
Jacek Caban : jscript: Store variable object in call_frame_t.
by Alexandre Julliard
28 Mar '16
28 Mar '16
Module: wine Branch: master Commit: b8fb19f160183f480befd7a6b409adebce91b126 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b8fb19f160183f480befd7a6b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Mar 25 17:49:48 2016 +0100 jscript: Store variable object 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 | 24 +++++++++++------------- dlls/jscript/engine.h | 6 +++--- dlls/jscript/function.c | 4 ++-- dlls/jscript/global.c | 3 ++- dlls/jscript/jscript.c | 8 ++++---- 5 files changed, 22 insertions(+), 23 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 15f71bd..349f932 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -295,8 +295,7 @@ void scope_release(scope_chain_t *scope) heap_free(scope); } -HRESULT create_exec_ctx(script_ctx_t *script_ctx, jsdisp_t *var_disp, - BOOL is_global, exec_ctx_t **ret) +HRESULT create_exec_ctx(script_ctx_t *script_ctx, BOOL is_global, exec_ctx_t **ret) { exec_ctx_t *ctx; @@ -308,9 +307,6 @@ HRESULT create_exec_ctx(script_ctx_t *script_ctx, jsdisp_t *var_disp, ctx->is_global = is_global; ctx->ret = jsval_undefined(); - jsdisp_addref(var_disp); - ctx->var_disp = var_disp; - script_addref(script_ctx); ctx->script = script_ctx; @@ -323,8 +319,6 @@ void exec_release(exec_ctx_t *ctx) if(--ctx->ref) return; - if(ctx->var_disp) - jsdisp_release(ctx->var_disp); if(ctx->script) script_release(ctx->script); jsval_release(ctx->ret); @@ -587,7 +581,7 @@ static HRESULT interp_var_set(script_ctx_t *ctx) TRACE("%s\n", debugstr_w(name)); val = stack_pop(ctx); - hres = jsdisp_propput_name(ctx->call_ctx->exec_ctx->var_disp, name, val); + hres = jsdisp_propput_name(ctx->call_ctx->variable_obj, name, val); jsval_release(val); return hres; } @@ -2390,6 +2384,8 @@ OP_LIST static void release_call_frame(call_frame_t *frame) { + if(frame->variable_obj) + jsdisp_release(frame->variable_obj); if(frame->this_obj) IDispatch_Release(frame->this_obj); if(frame->scope) @@ -2536,7 +2532,7 @@ static HRESULT bind_event_target(script_ctx_t *ctx, function_code_t *func, jsdis } static HRESULT setup_call_frame(exec_ctx_t *ctx, bytecode_t *bytecode, function_code_t *function, scope_chain_t *scope, - IDispatch *this_obj) + IDispatch *this_obj, jsdisp_t *variable_obj) { call_frame_t *frame; @@ -2572,6 +2568,8 @@ static HRESULT setup_call_frame(exec_ctx_t *ctx, bytecode_t *bytecode, function_ frame->this_obj = to_disp(ctx->script->global); IDispatch_AddRef(frame->this_obj); + frame->variable_obj = jsdisp_addref(variable_obj); + frame->exec_ctx = ctx; frame->prev_frame = ctx->script->call_ctx; @@ -2580,7 +2578,7 @@ static HRESULT setup_call_frame(exec_ctx_t *ctx, bytecode_t *bytecode, function_ } HRESULT exec_source(exec_ctx_t *ctx, bytecode_t *code, function_code_t *func, scope_chain_t *scope, - IDispatch *this_obj, jsval_t *ret) + IDispatch *this_obj, jsdisp_t *variable_obj, jsval_t *ret) { jsval_t val; unsigned i; @@ -2599,7 +2597,7 @@ HRESULT exec_source(exec_ctx_t *ctx, bytecode_t *code, function_code_t *func, sc if(func->funcs[i].event_target) hres = bind_event_target(ctx->script, func->funcs+i, func_obj); else - hres = jsdisp_propput_name(ctx->var_disp, func->funcs[i].name, jsval_obj(func_obj)); + hres = jsdisp_propput_name(variable_obj, func->funcs[i].name, jsval_obj(func_obj)); jsdisp_release(func_obj); if(FAILED(hres)) return hres; @@ -2609,13 +2607,13 @@ HRESULT exec_source(exec_ctx_t *ctx, bytecode_t *code, function_code_t *func, sc if(!ctx->is_global || !lookup_global_members(ctx->script, func->variables[i], NULL)) { DISPID id = 0; - hres = jsdisp_get_id(ctx->var_disp, func->variables[i], fdexNameEnsure, &id); + hres = jsdisp_get_id(variable_obj, func->variables[i], fdexNameEnsure, &id); if(FAILED(hres)) return hres; } } - hres = setup_call_frame(ctx, code, func, scope, this_obj); + hres = setup_call_frame(ctx, code, func, scope, this_obj, variable_obj); if(FAILED(hres)) return hres; diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index cd4051f..55ce72a 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -199,6 +199,7 @@ typedef struct _call_frame_t { scope_chain_t *base_scope; IDispatch *this_obj; + jsdisp_t *variable_obj; bytecode_t *bytecode; function_code_t *function; @@ -211,7 +212,6 @@ struct _exec_ctx_t { LONG ref; script_ctx_t *script; - jsdisp_t *var_disp; BOOL is_global; jsval_t ret; @@ -223,6 +223,6 @@ static inline void exec_addref(exec_ctx_t *ctx) } void exec_release(exec_ctx_t*) DECLSPEC_HIDDEN; -HRESULT create_exec_ctx(script_ctx_t*,jsdisp_t*,BOOL,exec_ctx_t**) DECLSPEC_HIDDEN; -HRESULT exec_source(exec_ctx_t*,bytecode_t*,function_code_t*,scope_chain_t*,IDispatch*,jsval_t*) DECLSPEC_HIDDEN; +HRESULT create_exec_ctx(script_ctx_t*,BOOL,exec_ctx_t**) DECLSPEC_HIDDEN; +HRESULT exec_source(exec_ctx_t*,bytecode_t*,function_code_t*,scope_chain_t*,IDispatch*,jsdisp_t*,jsval_t*) DECLSPEC_HIDDEN; HRESULT create_source_function(script_ctx_t*,bytecode_t*,function_code_t*,scope_chain_t*,jsdisp_t**) DECLSPEC_HIDDEN; diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c index 05792bd..8cd363d 100644 --- a/dlls/jscript/function.c +++ b/dlls/jscript/function.c @@ -239,13 +239,13 @@ static HRESULT invoke_source(script_ctx_t *ctx, FunctionInstance *function, IDis hres = scope_push(function->scope_chain, var_disp, to_disp(var_disp), &scope); if(SUCCEEDED(hres)) { - hres = create_exec_ctx(ctx, var_disp, FALSE, &exec_ctx); + hres = create_exec_ctx(ctx, FALSE, &exec_ctx); if(SUCCEEDED(hres)) { jsdisp_t *prev_args; prev_args = function->arguments; function->arguments = arg_disp; - hres = exec_source(exec_ctx, function->code, function->func_code, scope, this_obj, r); + hres = exec_source(exec_ctx, function->code, function->func_code, scope, this_obj, var_disp, r); function->arguments = prev_args; exec_release(exec_ctx); diff --git a/dlls/jscript/global.c b/dlls/jscript/global.c index 5574f50..73bee82 100644 --- a/dlls/jscript/global.c +++ b/dlls/jscript/global.c @@ -223,7 +223,8 @@ static HRESULT JSGlobal_eval(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, uns return throw_syntax_error(ctx, hres, NULL); } - hres = exec_source(ctx->call_ctx->exec_ctx, code, &code->global_code, frame->scope, frame->this_obj, r); + hres = exec_source(ctx->call_ctx->exec_ctx, code, &code->global_code, frame->scope, + frame->this_obj, frame->variable_obj, r); release_bytecode(code); return hres; } diff --git a/dlls/jscript/jscript.c b/dlls/jscript/jscript.c index 3dda22c..88c1616 100644 --- a/dlls/jscript/jscript.c +++ b/dlls/jscript/jscript.c @@ -105,14 +105,14 @@ static HRESULT exec_global_code(JScript *This, bytecode_t *code) exec_ctx_t *exec_ctx; HRESULT hres; - hres = create_exec_ctx(This->ctx, This->ctx->global, TRUE, &exec_ctx); + hres = create_exec_ctx(This->ctx, TRUE, &exec_ctx); if(FAILED(hres)) return hres; IActiveScriptSite_OnEnterScript(This->site); clear_ei(This->ctx); - hres = exec_source(exec_ctx, code, &code->global_code, NULL, NULL, NULL); + hres = exec_source(exec_ctx, code, &code->global_code, NULL, NULL, This->ctx->global, NULL); exec_release(exec_ctx); IActiveScriptSite_OnLeaveScript(This->site); @@ -776,14 +776,14 @@ static HRESULT WINAPI JScriptParse_ParseScriptText(IActiveScriptParse *iface, if(dwFlags & SCRIPTTEXT_ISEXPRESSION) { exec_ctx_t *exec_ctx; - hres = create_exec_ctx(This->ctx, This->ctx->global, TRUE, &exec_ctx); + hres = create_exec_ctx(This->ctx, TRUE, &exec_ctx); if(SUCCEEDED(hres)) { jsval_t r; IActiveScriptSite_OnEnterScript(This->site); clear_ei(This->ctx); - hres = exec_source(exec_ctx, code, &code->global_code, NULL, NULL, &r); + hres = exec_source(exec_ctx, code, &code->global_code, NULL, NULL, This->ctx->global, &r); if(SUCCEEDED(hres)) { if(pvarResult) hres = jsval_to_variant(r, pvarResult);
1
0
0
0
Jacek Caban : jscript: Store this object in call_frame_t.
by Alexandre Julliard
28 Mar '16
28 Mar '16
Module: wine Branch: master Commit: 0db7059663dd54f73107e623c122251f354e78eb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0db7059663dd54f73107e623c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Mar 25 17:49:37 2016 +0100 jscript: Store this object 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 | 61 +++++++++++++++++++++++++------------------------ dlls/jscript/engine.h | 7 +++--- dlls/jscript/function.c | 4 ++-- dlls/jscript/global.c | 2 +- dlls/jscript/jscript.c | 8 +++---- 5 files changed, 42 insertions(+), 40 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index c74aa75..15f71bd 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -295,7 +295,7 @@ void scope_release(scope_chain_t *scope) heap_free(scope); } -HRESULT create_exec_ctx(script_ctx_t *script_ctx, IDispatch *this_obj, jsdisp_t *var_disp, +HRESULT create_exec_ctx(script_ctx_t *script_ctx, jsdisp_t *var_disp, BOOL is_global, exec_ctx_t **ret) { exec_ctx_t *ctx; @@ -308,26 +308,6 @@ HRESULT create_exec_ctx(script_ctx_t *script_ctx, IDispatch *this_obj, jsdisp_t ctx->is_global = is_global; ctx->ret = jsval_undefined(); - /* ECMA-262 3rd Edition 11.2.3.7 */ - if(this_obj) { - jsdisp_t *jsthis; - - jsthis = iface_to_jsdisp((IUnknown*)this_obj); - if(jsthis) { - if(jsthis->builtin_info->class == JSCLASS_GLOBAL || jsthis->builtin_info->class == JSCLASS_NONE) - this_obj = NULL; - jsdisp_release(jsthis); - } - } - - if(this_obj) - ctx->this_obj = this_obj; - else if(script_ctx->host_global) - ctx->this_obj = script_ctx->host_global; - else - ctx->this_obj = to_disp(script_ctx->global); - IDispatch_AddRef(ctx->this_obj); - jsdisp_addref(var_disp); ctx->var_disp = var_disp; @@ -345,8 +325,6 @@ void exec_release(exec_ctx_t *ctx) if(ctx->var_disp) jsdisp_release(ctx->var_disp); - if(ctx->this_obj) - IDispatch_Release(ctx->this_obj); if(ctx->script) script_release(ctx->script); jsval_release(ctx->ret); @@ -1067,13 +1045,12 @@ static HRESULT interp_call_member(script_ctx_t *ctx) /* ECMA-262 3rd Edition 11.1.1 */ static HRESULT interp_this(script_ctx_t *ctx) { - IDispatch *this_obj; + call_frame_t *frame = ctx->call_ctx; TRACE("\n"); - this_obj = ctx->call_ctx->exec_ctx->this_obj; - IDispatch_AddRef(this_obj); - return stack_push(ctx, jsval_disp(this_obj)); + IDispatch_AddRef(frame->this_obj); + return stack_push(ctx, jsval_disp(frame->this_obj)); } /* ECMA-262 3rd Edition 10.1.4 */ @@ -2413,6 +2390,8 @@ OP_LIST static void release_call_frame(call_frame_t *frame) { + if(frame->this_obj) + IDispatch_Release(frame->this_obj); if(frame->scope) scope_release(frame->scope); heap_free(frame); @@ -2556,10 +2535,23 @@ 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, function_code_t *function, scope_chain_t *scope) +static HRESULT setup_call_frame(exec_ctx_t *ctx, bytecode_t *bytecode, function_code_t *function, scope_chain_t *scope, + IDispatch *this_obj) { call_frame_t *frame; + /* ECMA-262 3rd Edition 11.2.3.7 */ + if(this_obj) { + jsdisp_t *jsthis; + + jsthis = iface_to_jsdisp((IUnknown*)this_obj); + if(jsthis) { + if(jsthis->builtin_info->class == JSCLASS_GLOBAL || jsthis->builtin_info->class == JSCLASS_NONE) + this_obj = NULL; + jsdisp_release(jsthis); + } + } + frame = heap_alloc_zero(sizeof(*frame)); if(!frame) return E_OUTOFMEMORY; @@ -2572,6 +2564,14 @@ static HRESULT setup_call_frame(exec_ctx_t *ctx, bytecode_t *bytecode, function_ if(scope) frame->base_scope = frame->scope = scope_addref(scope); + if(this_obj) + frame->this_obj = this_obj; + else if(ctx->script->host_global) + frame->this_obj = ctx->script->host_global; + else + frame->this_obj = to_disp(ctx->script->global); + IDispatch_AddRef(frame->this_obj); + frame->exec_ctx = ctx; frame->prev_frame = ctx->script->call_ctx; @@ -2579,7 +2579,8 @@ static HRESULT setup_call_frame(exec_ctx_t *ctx, bytecode_t *bytecode, function_ return S_OK; } -HRESULT exec_source(exec_ctx_t *ctx, bytecode_t *code, function_code_t *func, scope_chain_t *scope, jsval_t *ret) +HRESULT exec_source(exec_ctx_t *ctx, bytecode_t *code, function_code_t *func, scope_chain_t *scope, + IDispatch *this_obj, jsval_t *ret) { jsval_t val; unsigned i; @@ -2614,7 +2615,7 @@ HRESULT exec_source(exec_ctx_t *ctx, bytecode_t *code, function_code_t *func, sc } } - hres = setup_call_frame(ctx, code, func, scope); + hres = setup_call_frame(ctx, code, func, scope, this_obj); if(FAILED(hres)) return hres; diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index 6c738ebe..cd4051f 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -198,6 +198,8 @@ typedef struct _call_frame_t { scope_chain_t *scope; scope_chain_t *base_scope; + IDispatch *this_obj; + bytecode_t *bytecode; function_code_t *function; @@ -210,7 +212,6 @@ struct _exec_ctx_t { script_ctx_t *script; jsdisp_t *var_disp; - IDispatch *this_obj; BOOL is_global; jsval_t ret; @@ -222,6 +223,6 @@ static inline void exec_addref(exec_ctx_t *ctx) } void exec_release(exec_ctx_t*) DECLSPEC_HIDDEN; -HRESULT create_exec_ctx(script_ctx_t*,IDispatch*,jsdisp_t*,BOOL,exec_ctx_t**) DECLSPEC_HIDDEN; -HRESULT exec_source(exec_ctx_t*,bytecode_t*,function_code_t*,scope_chain_t*,jsval_t*) DECLSPEC_HIDDEN; +HRESULT create_exec_ctx(script_ctx_t*,jsdisp_t*,BOOL,exec_ctx_t**) DECLSPEC_HIDDEN; +HRESULT exec_source(exec_ctx_t*,bytecode_t*,function_code_t*,scope_chain_t*,IDispatch*,jsval_t*) DECLSPEC_HIDDEN; HRESULT create_source_function(script_ctx_t*,bytecode_t*,function_code_t*,scope_chain_t*,jsdisp_t**) DECLSPEC_HIDDEN; diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c index 2c378b3..05792bd 100644 --- a/dlls/jscript/function.c +++ b/dlls/jscript/function.c @@ -239,13 +239,13 @@ static HRESULT invoke_source(script_ctx_t *ctx, FunctionInstance *function, IDis hres = scope_push(function->scope_chain, var_disp, to_disp(var_disp), &scope); if(SUCCEEDED(hres)) { - hres = create_exec_ctx(ctx, this_obj, var_disp, FALSE, &exec_ctx); + hres = create_exec_ctx(ctx, var_disp, FALSE, &exec_ctx); if(SUCCEEDED(hres)) { jsdisp_t *prev_args; prev_args = function->arguments; function->arguments = arg_disp; - hres = exec_source(exec_ctx, function->code, function->func_code, scope, r); + hres = exec_source(exec_ctx, function->code, function->func_code, scope, this_obj, r); function->arguments = prev_args; exec_release(exec_ctx); diff --git a/dlls/jscript/global.c b/dlls/jscript/global.c index ec3e355..5574f50 100644 --- a/dlls/jscript/global.c +++ b/dlls/jscript/global.c @@ -223,7 +223,7 @@ static HRESULT JSGlobal_eval(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, uns return throw_syntax_error(ctx, hres, NULL); } - hres = exec_source(ctx->call_ctx->exec_ctx, code, &code->global_code, frame->scope, r); + hres = exec_source(ctx->call_ctx->exec_ctx, code, &code->global_code, frame->scope, frame->this_obj, r); release_bytecode(code); return hres; } diff --git a/dlls/jscript/jscript.c b/dlls/jscript/jscript.c index c5c7705..3dda22c 100644 --- a/dlls/jscript/jscript.c +++ b/dlls/jscript/jscript.c @@ -105,14 +105,14 @@ static HRESULT exec_global_code(JScript *This, bytecode_t *code) exec_ctx_t *exec_ctx; HRESULT hres; - hres = create_exec_ctx(This->ctx, NULL, This->ctx->global, TRUE, &exec_ctx); + hres = create_exec_ctx(This->ctx, This->ctx->global, TRUE, &exec_ctx); if(FAILED(hres)) return hres; IActiveScriptSite_OnEnterScript(This->site); clear_ei(This->ctx); - hres = exec_source(exec_ctx, code, &code->global_code, NULL, NULL); + hres = exec_source(exec_ctx, code, &code->global_code, NULL, NULL, NULL); exec_release(exec_ctx); IActiveScriptSite_OnLeaveScript(This->site); @@ -776,14 +776,14 @@ static HRESULT WINAPI JScriptParse_ParseScriptText(IActiveScriptParse *iface, if(dwFlags & SCRIPTTEXT_ISEXPRESSION) { exec_ctx_t *exec_ctx; - hres = create_exec_ctx(This->ctx, NULL, This->ctx->global, TRUE, &exec_ctx); + hres = create_exec_ctx(This->ctx, This->ctx->global, TRUE, &exec_ctx); if(SUCCEEDED(hres)) { jsval_t r; IActiveScriptSite_OnEnterScript(This->site); clear_ei(This->ctx); - hres = exec_source(exec_ctx, code, &code->global_code, NULL, &r); + hres = exec_source(exec_ctx, code, &code->global_code, NULL, NULL, &r); if(SUCCEEDED(hres)) { if(pvarResult) hres = jsval_to_variant(r, pvarResult);
1
0
0
0
Jacek Caban : jscript: Moved stack from execution context to script context.
by Alexandre Julliard
28 Mar '16
28 Mar '16
Module: wine Branch: master Commit: 0224f1829b34f260291e810706e69b7a1d6f0191 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0224f1829b34f260291e81070…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Mar 25 17:49:24 2016 +0100 jscript: Moved stack from execution context to script context. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/engine.c | 42 ++++++++++++++++++------------------------ dlls/jscript/engine.h | 3 --- dlls/jscript/jscript.c | 2 ++ dlls/jscript/jscript.h | 4 ++++ 4 files changed, 24 insertions(+), 27 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index d459939..c74aa75 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -61,15 +61,14 @@ typedef struct { } u; } exprval_t; -static HRESULT stack_push(script_ctx_t *script_ctx, jsval_t v) +static HRESULT stack_push(script_ctx_t *ctx, jsval_t v) { - exec_ctx_t *ctx = script_ctx->call_ctx->exec_ctx; if(!ctx->stack_size) { ctx->stack = heap_alloc(16*sizeof(*ctx->stack)); if(!ctx->stack) return E_OUTOFMEMORY; ctx->stack_size = 16; - }else if(ctx->stack_size == ctx->top) { + }else if(ctx->stack_size == ctx->stack_top) { jsval_t *new_stack; new_stack = heap_realloc(ctx->stack, ctx->stack_size*2*sizeof(*new_stack)); @@ -82,7 +81,7 @@ static HRESULT stack_push(script_ctx_t *script_ctx, jsval_t v) ctx->stack_size *= 2; } - ctx->stack[ctx->top++] = v; + ctx->stack[ctx->stack_top++] = v; return S_OK; } @@ -110,32 +109,28 @@ static HRESULT stack_push_objid(script_ctx_t *ctx, IDispatch *disp, DISPID id) static inline jsval_t stack_top(script_ctx_t *ctx) { - exec_ctx_t *exec_ctx = ctx->call_ctx->exec_ctx; - assert(exec_ctx->top > ctx->call_ctx->stack_base); - return exec_ctx->stack[exec_ctx->top-1]; + assert(ctx->stack_top > ctx->call_ctx->stack_base); + return ctx->stack[ctx->stack_top-1]; } static inline jsval_t stack_topn(script_ctx_t *ctx, unsigned n) { - exec_ctx_t *exec_ctx = ctx->call_ctx->exec_ctx; - assert(exec_ctx->top > ctx->call_ctx->stack_base+n); - return exec_ctx->stack[exec_ctx->top-1-n]; + assert(ctx->stack_top > ctx->call_ctx->stack_base+n); + return ctx->stack[ctx->stack_top-1-n]; } -static inline jsval_t *stack_args(script_ctx_t *script_ctx, unsigned n) +static inline jsval_t *stack_args(script_ctx_t *ctx, unsigned n) { - exec_ctx_t *ctx = script_ctx->call_ctx->exec_ctx; if(!n) return NULL; - assert(ctx->top > script_ctx->call_ctx->stack_base+n-1); - return ctx->stack + ctx->top-n; + assert(ctx->stack_top > ctx->call_ctx->stack_base+n-1); + return ctx->stack + ctx->stack_top-n; } static inline jsval_t stack_pop(script_ctx_t *ctx) { - exec_ctx_t *exec_ctx = ctx->call_ctx->exec_ctx; - assert(exec_ctx->top > ctx->call_ctx->stack_base); - return exec_ctx->stack[--exec_ctx->top]; + assert(ctx->stack_top > ctx->call_ctx->stack_base); + return ctx->stack[--ctx->stack_top]; } static void stack_popn(script_ctx_t *ctx, unsigned n) @@ -355,7 +350,6 @@ void exec_release(exec_ctx_t *ctx) if(ctx->script) script_release(ctx->script); jsval_release(ctx->ret); - heap_free(ctx->stack); heap_free(ctx); } @@ -778,7 +772,7 @@ static HRESULT interp_push_except(script_ctx_t *ctx) TRACE("\n"); - stack_top = ctx->call_ctx->exec_ctx->top; + stack_top = ctx->stack_top; if(!arg2) { HRESULT hres; @@ -2435,8 +2429,8 @@ static HRESULT unwind_exception(script_ctx_t *ctx) except_frame = frame->except_frame; frame->except_frame = except_frame->next; - assert(except_frame->stack_top <= frame->exec_ctx->top); - stack_popn(ctx, frame->exec_ctx->top - except_frame->stack_top); + assert(except_frame->stack_top <= ctx->stack_top); + stack_popn(ctx, ctx->stack_top - except_frame->stack_top); while(except_frame->scope != frame->scope) scope_pop(&frame->scope); @@ -2509,10 +2503,10 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t if(FAILED(hres)) { while(frame->scope != frame->base_scope) scope_pop(&frame->scope); - stack_popn(ctx, exec_ctx->top-frame->stack_base); + stack_popn(ctx, ctx->stack_top-frame->stack_base); } - assert(exec_ctx->top == frame->stack_base); + assert(ctx->stack_top == frame->stack_base); assert(frame->scope == frame->base_scope); ctx->call_ctx = frame->prev_frame; release_call_frame(frame); @@ -2573,7 +2567,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->stack_base = ctx->script->stack_top; if(scope) frame->base_scope = frame->scope = scope_addref(scope); diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index 82ff4ed..6c738ebe 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -213,9 +213,6 @@ struct _exec_ctx_t { IDispatch *this_obj; BOOL is_global; - jsval_t *stack; - unsigned stack_size; - unsigned top; jsval_t ret; }; diff --git a/dlls/jscript/jscript.c b/dlls/jscript/jscript.c index 13a5b47..c5c7705 100644 --- a/dlls/jscript/jscript.c +++ b/dlls/jscript/jscript.c @@ -74,6 +74,8 @@ void script_release(script_ctx_t *ctx) heap_pool_free(&ctx->tmp_heap); if(ctx->last_match) jsstr_release(ctx->last_match); + assert(!ctx->stack_top); + heap_free(ctx->stack); ctx->jscaller->ctx = NULL; IServiceProvider_Release(&ctx->jscaller->IServiceProvider_iface); diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 18be0c1..1c7303e 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -400,6 +400,10 @@ struct _script_ctx_t { IDispatch *host_global; + jsval_t *stack; + unsigned stack_size; + unsigned stack_top; + jsstr_t *last_match; match_result_t match_parens[9]; DWORD last_match_index;
1
0
0
0
Jacek Caban : jscript: Pass script context instead of execution context to op handlers.
by Alexandre Julliard
28 Mar '16
28 Mar '16
Module: wine Branch: master Commit: 9e03bb2ecea25e22a30fbc4eac659e13a22b8b67 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9e03bb2ecea25e22a30fbc4ea…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Mar 25 17:49:14 2016 +0100 jscript: Pass script context instead of execution context to op handlers. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/engine.c | 423 ++++++++++++++++++++++++++------------------------ 1 file changed, 218 insertions(+), 205 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9e03bb2ecea25e22a30fb…
1
0
0
0
Józef Kucia : wined3d: Improve advertized driver version for Windows 10.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 4315caeff699325cd681b9beb7d22908b098411b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4315caeff699325cd681b9beb…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Mar 25 14:26:25 2016 +0100 wined3d: Improve advertized driver version for Windows 10. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/directx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 02c8a26..6bf1247 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1151,7 +1151,7 @@ static const struct driver_version_information driver_version_table[] = {DRIVER_AMD_R300, DRIVER_MODEL_NT5X, "ati2dvag.dll", 14, 10, 6764}, {DRIVER_AMD_R600, DRIVER_MODEL_NT5X, "ati2dvag.dll", 17, 10, 1280}, {DRIVER_AMD_R300, DRIVER_MODEL_NT6X, "atiumdag.dll", 14, 10, 741 }, - {DRIVER_AMD_R600, DRIVER_MODEL_NT6X, "atiumdag.dll", 17, 10, 1280 }, + {DRIVER_AMD_R600, DRIVER_MODEL_NT6X, "atiumdag.dll", 17, 10, 1280}, /* Intel * The drivers are unified but not all versions support all GPUs. At some point the 2k/xp @@ -1514,6 +1514,11 @@ static void init_driver_info(struct wined3d_driver_info *driver_info, } break; + case 10: + driver_os_version = 10; + driver_model = DRIVER_MODEL_NT6X; + break; + default: FIXME("Unhandled OS version %u.%u, reporting 2000/XP.\n", os_version.dwMajorVersion, os_version.dwMinorVersion);
1
0
0
0
Józef Kucia : d3d9: Avoid '\n' in middle of TRACE() messages.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 1f8de0696f75632b34ad461b71865cc4995849d4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1f8de0696f75632b34ad461b7…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Mar 25 14:26:24 2016 +0100 d3d9: Avoid '\n' in middle of TRACE() messages. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/device.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 47f4f7b..bd9f935 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -2314,7 +2314,7 @@ static HRESULT WINAPI d3d9_device_DrawIndexedPrimitive(IDirect3DDevice9Ex *iface struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); HRESULT hr; - TRACE("iface %p, primitive_type %#x, base_vertex_idx %u, min_vertex_idx %u,\n" + TRACE("iface %p, primitive_type %#x, base_vertex_idx %u, min_vertex_idx %u, " "vertex_count %u, start_idx %u, primitive_count %u.\n", iface, primitive_type, base_vertex_idx, min_vertex_idx, vertex_count, start_idx, primitive_count); @@ -2339,13 +2339,13 @@ static HRESULT d3d9_device_prepare_vertex_buffer(struct d3d9_device *device, UIN UINT size = max(device->vertex_buffer_size * 2, min_size); struct wined3d_buffer *buffer; - TRACE("Growing vertex buffer to %u bytes\n", size); + TRACE("Growing vertex buffer to %u bytes.\n", size); hr = wined3d_buffer_create_vb(device->wined3d_device, size, WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_WRITEONLY, WINED3D_POOL_DEFAULT, NULL, &d3d9_null_wined3d_parent_ops, &buffer); if (FAILED(hr)) { - ERR("(%p) wined3d_buffer_create_vb failed with hr = %08x\n", device, hr); + ERR("(%p) wined3d_buffer_create_vb failed with hr = %08x.\n", device, hr); return hr; } @@ -2423,13 +2423,13 @@ static HRESULT d3d9_device_prepare_index_buffer(struct d3d9_device *device, UINT UINT size = max(device->index_buffer_size * 2, min_size); struct wined3d_buffer *buffer; - TRACE("Growing index buffer to %u bytes\n", size); + TRACE("Growing index buffer to %u bytes.\n", size); hr = wined3d_buffer_create_ib(device->wined3d_device, size, WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_WRITEONLY, WINED3D_POOL_DEFAULT, NULL, &d3d9_null_wined3d_parent_ops, &buffer); if (FAILED(hr)) { - ERR("(%p) wined3d_buffer_create_ib failed with hr = %08x\n", device, hr); + ERR("(%p) wined3d_buffer_create_ib failed with hr = %08x.\n", device, hr); return hr; } @@ -2460,14 +2460,14 @@ static HRESULT WINAPI d3d9_device_DrawIndexedPrimitiveUP(IDirect3DDevice9Ex *ifa UINT vtx_size = vertex_count * vertex_stride; UINT vb_pos, align; - TRACE("iface %p, primitive_type %#x, min_vertex_idx %u, vertex_count %u, primitive_count %u,\n" + TRACE("iface %p, primitive_type %#x, min_vertex_idx %u, vertex_count %u, primitive_count %u, " "index_data %p, index_format %#x, vertex_data %p, vertex_stride %u.\n", iface, primitive_type, min_vertex_idx, vertex_count, primitive_count, index_data, index_format, vertex_data, vertex_stride); if (!primitive_count) { - WARN("primitive_count is 0, returning D3D_OK\n"); + WARN("primitive_count is 0, returning D3D_OK.\n"); return D3D_OK; } @@ -3259,7 +3259,7 @@ static HRESULT WINAPI d3d9_device_ComposeRects(IDirect3DDevice9Ex *iface, IDirect3DSurface9 *src_surface, IDirect3DSurface9 *dst_surface, IDirect3DVertexBuffer9 *src_descs, UINT rect_count, IDirect3DVertexBuffer9 *dst_descs, D3DCOMPOSERECTSOP operation, INT offset_x, INT offset_y) { - FIXME("iface %p, src_surface %p, dst_surface %p, src_descs %p, rect_count %u,\n" + FIXME("iface %p, src_surface %p, dst_surface %p, src_descs %p, rect_count %u, " "dst_descs %p, operation %#x, offset_x %u, offset_y %u stub!\n", iface, src_surface, dst_surface, src_descs, rect_count, dst_descs, operation, offset_x, offset_y); @@ -3372,7 +3372,7 @@ static HRESULT WINAPI d3d9_device_CreateRenderTargetEx(IDirect3DDevice9Ex *iface UINT width, UINT height, D3DFORMAT format, D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL lockable, IDirect3DSurface9 **surface, HANDLE *shared_handle, DWORD usage) { - FIXME("iface %p, width %u, height %u, format %#x, multisample_type %#x, multisample_quality %u,\n" + FIXME("iface %p, width %u, height %u, format %#x, multisample_type %#x, multisample_quality %u, " "lockable %#x, surface %p, shared_handle %p, usage %#x stub!\n", iface, width, height, format, multisample_type, multisample_quality, lockable, surface, shared_handle, usage);
1
0
0
0
Józef Kucia : d3d8: Avoid '\n' in middle of TRACE() messages.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 0aa885e75a38478a727882b079438fe08bd63627 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0aa885e75a38478a727882b07…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Mar 25 14:26:23 2016 +0100 d3d8: Avoid '\n' in middle of TRACE() messages. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d8/device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 1cad4be..154d817 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -942,8 +942,8 @@ static HRESULT d3d8_device_create_surface(struct d3d8_device *device, UINT width struct wined3d_texture *texture; HRESULT hr; - TRACE("device %p, width %u, height %u, format %#x, flags %#x, surface %p,\n" - "\tusage %#x, pool %#x, multisample_type %#x, multisample_quality %u.\n", + TRACE("device %p, width %u, height %u, format %#x, flags %#x, surface %p, " + "usage %#x, pool %#x, multisample_type %#x, multisample_quality %u.\n", device, width, height, format, flags, surface, usage, pool, multisample_type, multisample_quality); @@ -2130,7 +2130,7 @@ static HRESULT WINAPI d3d8_device_DrawIndexedPrimitiveUP(IDirect3DDevice8 *iface UINT vtx_size = vertex_count * vertex_stride; UINT vb_pos, align; - TRACE("iface %p, primitive_type %#x, min_vertex_idx %u, vertex_count %u, primitive_count %u,\n" + TRACE("iface %p, primitive_type %#x, min_vertex_idx %u, vertex_count %u, primitive_count %u, " "index_data %p, index_format %#x, vertex_data %p, vertex_stride %u.\n", iface, primitive_type, min_vertex_idx, vertex_count, primitive_count, index_data, index_format, vertex_data, vertex_stride);
1
0
0
0
Matteo Bruni : d3d11: Add a couple missing wined3d_mutex_unlock() in d3d_shader_resource_view_init() error paths.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: b0a9e0cebddf1a2446241b8e7bb3c791d48887cc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b0a9e0cebddf1a2446241b8e7…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri Mar 25 14:26:22 2016 +0100 d3d11: Add a couple missing wined3d_mutex_unlock() in d3d_shader_resource_view_init() error paths. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/view.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/d3d11/view.c b/dlls/d3d11/view.c index 1d9b766..c4487d3 100644 --- a/dlls/d3d11/view.c +++ b/dlls/d3d11/view.c @@ -1503,6 +1503,7 @@ static HRESULT d3d_shader_resource_view_init(struct d3d_shader_resource_view *vi wined3d_mutex_lock(); if (!(wined3d_resource = wined3d_resource_from_d3d11_resource(resource))) { + wined3d_mutex_unlock(); ERR("Failed to get wined3d resource for d3d10 resource %p.\n", resource); return E_FAIL; } @@ -1510,6 +1511,7 @@ static HRESULT d3d_shader_resource_view_init(struct d3d_shader_resource_view *vi if (FAILED(hr = wined3d_shader_resource_view_create(wined3d_resource, view, &d3d_null_wined3d_parent_ops, &view->wined3d_view))) { + wined3d_mutex_unlock(); WARN("Failed to create wined3d shader resource view, hr %#x.\n", hr); return hr; }
1
0
0
0
Ken Thomases : user32: Call the EnumDisplayMonitors callback using a wrapper.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 474196c746e95cf84137a85512d01a0e622c5c15 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=474196c746e95cf84137a8551…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Wed Mar 23 21:46:32 2016 -0500 user32: Call the EnumDisplayMonitors callback using a wrapper. Signed-off-by: Ken Thomases <ken(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/misc.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c index 071230e..109809f 100644 --- a/dlls/user32/misc.c +++ b/dlls/user32/misc.c @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" + #include <stdarg.h> #include "windef.h" @@ -466,11 +468,46 @@ BOOL WINAPI GetMonitorInfoW(HMONITOR hMonitor, LPMONITORINFO lpMonitorInfo) return ret; } +#ifdef __i386__ +/* Some apps pass a non-stdcall callback to EnumDisplayMonitors, + * so we need a small assembly wrapper to call it. + */ +struct enumdisplaymonitors_lparam +{ + MONITORENUMPROC proc; + LPARAM lparam; +}; + +extern BOOL CALLBACK enumdisplaymonitors_callback_wrapper(HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM lparam); +__ASM_STDCALL_FUNC( enumdisplaymonitors_callback_wrapper, 16, + "pushl %ebp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") + "movl %esp,%ebp\n\t" + __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") + "subl $8,%esp\n\t" + "movl 20(%ebp),%eax\n\t" /* struct enumdisplaymonitors_lparam *orig = (struct enumdisplaymonitors_lparam*)lparam */ + "pushl 4(%eax)\n\t" /* push orig->lparam */ + "pushl 16(%ebp)\n\t" + "pushl 12(%ebp)\n\t" + "pushl 8(%ebp)\n\t" + "call *(%eax)\n\t" /* call orig->proc */ + "leave\n\t" + __ASM_CFI(".cfi_def_cfa %esp,4\n\t") + __ASM_CFI(".cfi_same_value %ebp\n\t") + "ret $16" ) +#endif /* __i386__ */ + /*********************************************************************** * EnumDisplayMonitors (USER32.@) */ BOOL WINAPI EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPARAM lp ) { +#ifdef __i386__ + struct enumdisplaymonitors_lparam orig = { proc, lp }; + proc = enumdisplaymonitors_callback_wrapper; + lp = (LPARAM)&orig; +#endif return USER_Driver->pEnumDisplayMonitors( hdc, rect, proc, lp ); }
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
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