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 bytecode pointer in call_frame_t.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 89ad1094ea5521c3b6ec505867bc4482de89adfb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=89ad1094ea5521c3b6ec50586…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Mar 25 12:02:48 2016 +0100 jscript: Store bytecode 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 | 27 ++++++++++++--------------- dlls/jscript/engine.h | 3 ++- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 8d42962..8b0477f 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -568,23 +568,23 @@ 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->code->instrs[ctx->ip].u.arg[i].bstr; + return ctx->script->call_ctx->bytecode->instrs[ctx->ip].u.arg[i].bstr; } static inline unsigned get_op_uint(exec_ctx_t *ctx, int i){ - return ctx->code->instrs[ctx->ip].u.arg[i].uint; + return ctx->script->call_ctx->bytecode->instrs[ctx->ip].u.arg[i].uint; } static inline unsigned get_op_int(exec_ctx_t *ctx, int i){ - return ctx->code->instrs[ctx->ip].u.arg[i].lng; + return ctx->script->call_ctx->bytecode->instrs[ctx->ip].u.arg[i].lng; } static inline jsstr_t *get_op_str(exec_ctx_t *ctx, int i){ - return ctx->code->instrs[ctx->ip].u.arg[i].str; + return ctx->script->call_ctx->bytecode->instrs[ctx->ip].u.arg[i].str; } static inline double get_op_double(exec_ctx_t *ctx){ - return ctx->code->instrs[ctx->ip].u.dbl; + return ctx->script->call_ctx->bytecode->instrs[ctx->ip].u.dbl; } /* ECMA-262 3rd Edition 12.2 */ @@ -830,7 +830,7 @@ static HRESULT interp_func(exec_ctx_t *ctx) TRACE("%d\n", func_idx); - hres = create_source_function(ctx->script, ctx->code, ctx->func_code->funcs+func_idx, + hres = create_source_function(ctx->script, ctx->script->call_ctx->bytecode, ctx->func_code->funcs+func_idx, ctx->scope_chain, &dispex); if(FAILED(hres)) return hres; @@ -2449,14 +2449,13 @@ static HRESULT unwind_exception(exec_ctx_t *ctx) return hres; } -static HRESULT enter_bytecode(script_ctx_t *ctx, bytecode_t *code, function_code_t *func, jsval_t *ret) +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; function_code_t *prev_func; unsigned prev_ip, prev_top; scope_chain_t *prev_scope; - bytecode_t *prev_code; call_frame_t *frame; jsop_t op; HRESULT hres = S_OK; @@ -2468,15 +2467,13 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, bytecode_t *code, function_code prev_scope = exec_ctx->scope_chain; prev_except_frame = exec_ctx->except_frame; prev_ip = exec_ctx->ip; - prev_code = exec_ctx->code; prev_func = exec_ctx->func_code; exec_ctx->ip = func->instr_off; exec_ctx->except_frame = NULL; - exec_ctx->code = code; exec_ctx->func_code = func; while(exec_ctx->ip != -1) { - op = code->instrs[exec_ctx->ip].op; + op = frame->bytecode->instrs[exec_ctx->ip].op; hres = op_funcs[op](exec_ctx); if(FAILED(hres)) { TRACE("EXCEPTION %08x\n", hres); @@ -2494,7 +2491,6 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, bytecode_t *code, function_code exec_ctx->ip = prev_ip; exec_ctx->except_frame = prev_except_frame; - exec_ctx->code = prev_code; exec_ctx->func_code = prev_func; assert(ctx->call_ctx == frame); @@ -2554,7 +2550,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) +static HRESULT setup_call_frame(exec_ctx_t *ctx, bytecode_t *bytecode) { call_frame_t *frame; @@ -2562,6 +2558,7 @@ static HRESULT setup_call_frame(exec_ctx_t *ctx) if(!frame) return E_OUTOFMEMORY; + frame->bytecode = bytecode; frame->exec_ctx = ctx; frame->prev_frame = ctx->script->call_ctx; @@ -2604,11 +2601,11 @@ HRESULT exec_source(exec_ctx_t *ctx, bytecode_t *code, function_code_t *func, js } } - hres = setup_call_frame(ctx); + hres = setup_call_frame(ctx, code); if(FAILED(hres)) return hres; - hres = enter_bytecode(ctx->script, code, func, &val); + hres = enter_bytecode(ctx->script, func, &val); if(FAILED(hres)) return hres; diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index 81316f7..fc99c68 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 { + bytecode_t *bytecode; + struct _call_frame_t *prev_frame; exec_ctx_t *exec_ctx; } call_frame_t; @@ -199,7 +201,6 @@ struct _exec_ctx_t { LONG ref; struct _parser_ctx_t *parser; - bytecode_t *code; script_ctx_t *script; scope_chain_t *scope_chain; jsdisp_t *var_disp;
1
0
0
0
Jacek Caban : jscript: Keep track of active call in a separated structure.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 8a17cf89fb0c78888855afd20cc2ebf05a1a351e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8a17cf89fb0c78888855afd20…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Mar 25 12:02:35 2016 +0100 jscript: Keep track of active call in a separated structure. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/engine.c | 40 ++++++++++++++++++++++++++++++++-------- dlls/jscript/engine.h | 5 +++++ dlls/jscript/global.c | 4 ++-- dlls/jscript/jscript.h | 2 +- 4 files changed, 40 insertions(+), 11 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 214d8fe..8d42962 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -511,8 +511,8 @@ static HRESULT identifier_eval(script_ctx_t *ctx, BSTR identifier, exprval_t *re TRACE("%s\n", debugstr_w(identifier)); - if(ctx->exec_ctx) { - for(scope = ctx->exec_ctx->scope_chain; scope; scope = scope->next) { + if(ctx->call_ctx) { + for(scope = ctx->call_ctx->exec_ctx->scope_chain; scope; scope = scope->next) { if(scope->jsobj) hres = jsdisp_get_id(scope->jsobj, identifier, fdexNameImplicit, &id); else @@ -2393,6 +2393,11 @@ OP_LIST #undef X }; +static void release_call_frame(call_frame_t *frame) +{ + heap_free(frame); +} + static HRESULT unwind_exception(exec_ctx_t *ctx) { except_frame_t *except_frame; @@ -2446,17 +2451,19 @@ static HRESULT unwind_exception(exec_ctx_t *ctx) static HRESULT enter_bytecode(script_ctx_t *ctx, bytecode_t *code, function_code_t *func, jsval_t *ret) { - exec_ctx_t *exec_ctx = ctx->exec_ctx; + 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; bytecode_t *prev_code; + call_frame_t *frame; jsop_t op; HRESULT hres = S_OK; TRACE("\n"); + frame = ctx->call_ctx; prev_top = exec_ctx->top; prev_scope = exec_ctx->scope_chain; prev_except_frame = exec_ctx->except_frame; @@ -2490,6 +2497,10 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, bytecode_t *code, function_code exec_ctx->code = prev_code; exec_ctx->func_code = prev_func; + 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); @@ -2543,9 +2554,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) +{ + call_frame_t *frame; + + frame = heap_alloc_zero(sizeof(*frame)); + if(!frame) + return E_OUTOFMEMORY; + + frame->exec_ctx = ctx; + + frame->prev_frame = ctx->script->call_ctx; + ctx->script->call_ctx = frame; + return S_OK; +} + HRESULT exec_source(exec_ctx_t *ctx, bytecode_t *code, function_code_t *func, jsval_t *ret) { - exec_ctx_t *prev_ctx; jsval_t val; unsigned i; HRESULT hres = S_OK; @@ -2579,12 +2604,11 @@ HRESULT exec_source(exec_ctx_t *ctx, bytecode_t *code, function_code_t *func, js } } - prev_ctx = ctx->script->exec_ctx; - ctx->script->exec_ctx = ctx; + hres = setup_call_frame(ctx); + if(FAILED(hres)) + return hres; hres = enter_bytecode(ctx->script, code, func, &val); - assert(ctx->script->exec_ctx == ctx); - ctx->script->exec_ctx = prev_ctx; if(FAILED(hres)) return hres; diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index 3943c9a..81316f7 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -190,6 +190,11 @@ static inline void scope_addref(scope_chain_t *scope) typedef struct _except_frame_t except_frame_t; struct _parser_ctx_t; +typedef struct _call_frame_t { + struct _call_frame_t *prev_frame; + exec_ctx_t *exec_ctx; +} call_frame_t; + struct _exec_ctx_t { LONG ref; diff --git a/dlls/jscript/global.c b/dlls/jscript/global.c index 0755844..763868f 100644 --- a/dlls/jscript/global.c +++ b/dlls/jscript/global.c @@ -206,7 +206,7 @@ static HRESULT JSGlobal_eval(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, uns return S_OK; } - if(!ctx->exec_ctx) { + if(!ctx->call_ctx) { FIXME("No active exec_ctx\n"); return E_UNEXPECTED; } @@ -222,7 +222,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->exec_ctx, code, &code->global_code, r); + hres = exec_source(ctx->call_ctx->exec_ctx, code, &code->global_code, r); release_bytecode(code); return hres; } diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 87f2e94..18be0c1 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -385,7 +385,7 @@ struct _script_ctx_t { SCRIPTSTATE state; IActiveScript *active_script; - exec_ctx_t *exec_ctx; + struct _call_frame_t *call_ctx; named_item_t *named_items; IActiveScriptSite *site; IInternetHostSecurityManager *secmgr;
1
0
0
0
Alexandre Julliard : makefiles: Build import libraries that contain object files as static libraries.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 27528e54980d2742ff9b32ce2dbd5f8b73ba63b2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=27528e54980d2742ff9b32ce2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 25 15:31:54 2016 +0900 makefiles: Build import libraries that contain object files as static libraries. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- aclocal.m4 | 25 +++++++------------------ configure | 27 +++++++-------------------- configure.ac | 2 -- tools/makedep.c | 24 +++++------------------- 4 files changed, 19 insertions(+), 59 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 41eb7f6..c65ebc4 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -395,29 +395,18 @@ $ac_dir/uninstall:: if wine_fn_has_flag staticimplib then wine_fn_append_rule \ -"__builddeps__: $ac_file.$IMPLIBEXT $ac_file.$STATIC_IMPLIBEXT -$ac_file.$STATIC_IMPLIBEXT $ac_file.cross.a: $ac_deps -$ac_file.def: $srcdir/$ac_dir/$ac_name.spec \$(WINEBUILD) - \$(WINEBUILD) \$(TARGETFLAGS)$ac_implibflags -w --def -o \$[@] --export $srcdir/$ac_dir/$ac_name.spec -$ac_file.$STATIC_IMPLIBEXT: dummy - @cd $ac_dir && \$(MAKE) lib$ac_implib.$STATIC_IMPLIBEXT +"__builddeps__: $ac_file.a +$ac_file.a $ac_file.cross.a: $ac_deps +$ac_file.a: dummy + @cd $ac_dir && \$(MAKE) lib$ac_implib.a .PHONY: $ac_dir/install-dev $ac_dir/uninstall -$ac_dir/install-dev:: $ac_file.$IMPLIBEXT - \$(INSTALL_DATA) $ac_file.$IMPLIBEXT \$(DESTDIR)\$(dlldir)/lib$ac_implib.$IMPLIBEXT +$ac_dir/install-dev:: $ac_file.a + \$(INSTALL_DATA) $ac_file.a \$(DESTDIR)\$(dlldir)/lib$ac_implib.a $ac_dir/uninstall:: - \$(RM) \$(DESTDIR)\$(dlldir)/lib$ac_implib.$IMPLIBEXT + \$(RM) \$(DESTDIR)\$(dlldir)/lib$ac_implib.a install install-dev:: $ac_dir/install-dev __uninstall__: $ac_dir/uninstall" - if test "$IMPLIBEXT" != "$STATIC_IMPLIBEXT" - then - wine_fn_append_rule \ -"$ac_dir/install-dev:: $ac_file.$STATIC_IMPLIBEXT __builddeps__ - \$(INSTALL_DATA) $ac_file.$STATIC_IMPLIBEXT \$(DESTDIR)\$(dlldir)/lib$ac_implib.$STATIC_IMPLIBEXT -$ac_dir/uninstall:: - \$(RM) \$(DESTDIR)\$(dlldir)/lib$ac_implib.$STATIC_IMPLIBEXT" - fi - if test -n "$CROSSTARGET" -a -z "$ac_implibflags" then wine_fn_append_rule \ diff --git a/configure b/configure index 76a6267..4d39f05 100755 --- a/configure +++ b/configure @@ -7184,7 +7184,6 @@ LDEXECFLAGS="" LIBEXT="so" DLLEXT=".so" IMPLIBEXT="def" -STATIC_IMPLIBEXT="def.a" # Extract the first word of "ldd", so it can be a program name with args. set dummy ldd; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -7622,29 +7621,18 @@ fi if wine_fn_has_flag staticimplib then wine_fn_append_rule \ -"__builddeps__: $ac_file.$IMPLIBEXT $ac_file.$STATIC_IMPLIBEXT -$ac_file.$STATIC_IMPLIBEXT $ac_file.cross.a: $ac_deps -$ac_file.def: $srcdir/$ac_dir/$ac_name.spec \$(WINEBUILD) - \$(WINEBUILD) \$(TARGETFLAGS)$ac_implibflags -w --def -o \$@ --export $srcdir/$ac_dir/$ac_name.spec -$ac_file.$STATIC_IMPLIBEXT: dummy - @cd $ac_dir && \$(MAKE) lib$ac_implib.$STATIC_IMPLIBEXT +"__builddeps__: $ac_file.a +$ac_file.a $ac_file.cross.a: $ac_deps +$ac_file.a: dummy + @cd $ac_dir && \$(MAKE) lib$ac_implib.a .PHONY: $ac_dir/install-dev $ac_dir/uninstall -$ac_dir/install-dev:: $ac_file.$IMPLIBEXT - \$(INSTALL_DATA) $ac_file.$IMPLIBEXT \$(DESTDIR)\$(dlldir)/lib$ac_implib.$IMPLIBEXT +$ac_dir/install-dev:: $ac_file.a + \$(INSTALL_DATA) $ac_file.a \$(DESTDIR)\$(dlldir)/lib$ac_implib.a $ac_dir/uninstall:: - \$(RM) \$(DESTDIR)\$(dlldir)/lib$ac_implib.$IMPLIBEXT + \$(RM) \$(DESTDIR)\$(dlldir)/lib$ac_implib.a install install-dev:: $ac_dir/install-dev __uninstall__: $ac_dir/uninstall" - if test "$IMPLIBEXT" != "$STATIC_IMPLIBEXT" - then - wine_fn_append_rule \ -"$ac_dir/install-dev:: $ac_file.$STATIC_IMPLIBEXT __builddeps__ - \$(INSTALL_DATA) $ac_file.$STATIC_IMPLIBEXT \$(DESTDIR)\$(dlldir)/lib$ac_implib.$STATIC_IMPLIBEXT -$ac_dir/uninstall:: - \$(RM) \$(DESTDIR)\$(dlldir)/lib$ac_implib.$STATIC_IMPLIBEXT" - fi - if test -n "$CROSSTARGET" -a -z "$ac_implibflags" then wine_fn_append_rule \ @@ -7921,7 +7909,6 @@ fi LIBEXT="dll" DLLEXT="" IMPLIBEXT="a" - STATIC_IMPLIBEXT="a" enable_iphlpapi=${enable_iphlpapi:-no} enable_kernel32=${enable_kernel32:-no} enable_msvcrt=${enable_msvcrt:-no} diff --git a/configure.ac b/configure.ac index 8c22a4f..ddb28fa 100644 --- a/configure.ac +++ b/configure.ac @@ -676,7 +676,6 @@ AC_SUBST(LDEXECFLAGS,"") LIBEXT="so" DLLEXT=".so" IMPLIBEXT="def" -STATIC_IMPLIBEXT="def.a" WINE_PATH_SONAME_TOOLS WINE_CONFIG_HELPERS @@ -691,7 +690,6 @@ case $host_os in LIBEXT="dll" DLLEXT="" IMPLIBEXT="a" - STATIC_IMPLIBEXT="a" dnl Disable modules that can't be used on Windows enable_iphlpapi=${enable_iphlpapi:-no} enable_kernel32=${enable_kernel32:-no} diff --git a/tools/makedep.c b/tools/makedep.c index 9ee316c..7f81208 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1810,7 +1810,7 @@ static void add_generated_sources( struct makefile *make ) if (source->file->flags & FLAG_C_IMPLIB) { if (!make->staticimplib && make->importlib && *dll_ext) - make->staticimplib = strmake( "lib%s.def.a", make->importlib ); + make->staticimplib = strmake( "lib%s.a", make->importlib ); } if (strendswith( source->name, ".po" )) { @@ -2004,9 +2004,10 @@ static struct strarray add_import_libs( const struct makefile *make, struct stra const char *dir = top_obj_dir_path( make, submake->base_dir ); const char *ext = cross ? "cross.a" : *dll_ext ? "def" : "a"; - strarray_add( deps, strmake( "%s/lib%s.%s", dir, name, ext )); if (!cross && submake->staticimplib) - strarray_add( deps, strmake( "%s/%s", dir, submake->staticimplib )); + lib = base_dir_path( submake, submake->staticimplib ); + else + strarray_add( deps, strmake( "%s/lib%s.%s", dir, name, ext )); break; } @@ -2704,7 +2705,7 @@ static struct strarray output_sources( const struct makefile *make ) if (spec_file && make->importlib) { char *importlib_path = obj_dir_path( make, strmake( "lib%s", make->importlib )); - if (*dll_ext) + if (*dll_ext && !implib_objs.count) { strarray_add( &clean_files, strmake( "lib%s.def", make->importlib )); output( "%s.def: %s %s\n", importlib_path, tools_path( make, "winebuild" ), spec_file ); @@ -2715,21 +2716,6 @@ static struct strarray output_sources( const struct makefile *make ) add_install_rule( make, install_rules, make->importlib, strmake( "lib%s.def", make->importlib ), strmake( "d$(dlldir)/lib%s.def", make->importlib )); - if (implib_objs.count) - { - strarray_add( &clean_files, strmake( "lib%s.def.a", make->importlib )); - output( "%s.def.a:", importlib_path ); - output_filenames_obj_dir( make, implib_objs ); - output( "\n" ); - output( "\trm -f $@\n" ); - output( "\t$(AR) $(ARFLAGS) $@" ); - output_filenames_obj_dir( make, implib_objs ); - output( "\n" ); - output( "\t$(RANLIB) $@\n" ); - add_install_rule( make, install_rules, make->importlib, - strmake( "lib%s.def.a", make->importlib ), - strmake( "d$(dlldir)/lib%s.def.a", make->importlib )); - } } else {
1
0
0
0
Alexandre Julliard : makefiles: Expand the names of static libraries in linker commands.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 255b90c64c5f64ba65a5101436ea62d5f1df966e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=255b90c64c5f64ba65a510143…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 25 15:19:53 2016 +0900 makefiles: Expand the names of static libraries in linker commands. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/makedep.c | 52 ++++++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index 8cbba1b..9ee316c 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1926,16 +1926,17 @@ static struct strarray get_local_dependencies( const struct makefile *make, cons /******************************************************************* - * has_static_lib + * get_static_lib * - * Check if makefile builds the named static library. + * Check if makefile builds the named static library and return the full lib path. */ -static int has_static_lib( const struct makefile *make, const char *name ) +static const char *get_static_lib( const struct makefile *make, const char *name ) { - if (!make->staticlib) return 0; - if (strncmp( make->staticlib, "lib", 3 )) return 0; - if (strncmp( make->staticlib + 3, name, strlen(name) )) return 0; - return !strcmp( make->staticlib + 3 + strlen(name), ".a" ); + if (!make->staticlib) return NULL; + if (strncmp( make->staticlib, "lib", 3 )) return NULL; + if (strncmp( make->staticlib + 3, name, strlen(name) )) return NULL; + if (strcmp( make->staticlib + 3 + strlen(name), ".a" )) return NULL; + return base_dir_path( make, make->staticlib ); } @@ -1954,7 +1955,8 @@ static struct strarray add_default_libraries( const struct makefile *make, struc for (i = 0; i < all_libs.count; i++) { - int found = 0; + const char *lib = NULL; + if (!strncmp( all_libs.str[i], "-l", 2 )) { const char *name = all_libs.str[i] + 2; @@ -1963,17 +1965,17 @@ static struct strarray add_default_libraries( const struct makefile *make, struc { const struct makefile *submake = top_makefile->submakes[j]; - if ((found = has_static_lib( submake, name ))) - { - const char *lib = strmake( "%s/lib%s.a", - top_obj_dir_path( make, submake->base_dir ), name ); - strarray_add( deps, lib ); - strarray_add( &ret, lib ); - break; - } + if ((lib = get_static_lib( submake, name ))) break; } } - if (!found) strarray_add( &ret, all_libs.str[i] ); + + if (lib) + { + lib = top_obj_dir_path( make, lib ); + strarray_add( deps, lib ); + strarray_add( &ret, lib ); + } + else strarray_add( &ret, all_libs.str[i] ); } return ret; } @@ -1991,6 +1993,7 @@ static struct strarray add_import_libs( const struct makefile *make, struct stra for (i = 0; i < imports.count; i++) { const char *name = imports.str[i]; + const char *lib = NULL; for (j = 0; j < top_makefile->subdirs.count; j++) { @@ -2007,15 +2010,16 @@ static struct strarray add_import_libs( const struct makefile *make, struct stra break; } - if (has_static_lib( submake, name )) - { - const char *dir = top_obj_dir_path( make, submake->base_dir ); + if ((lib = get_static_lib( submake, name ))) break; + } - strarray_add( deps, strmake( "%s/lib%s.a", dir, name )); - break; - } + if (lib) + { + lib = top_obj_dir_path( make, lib ); + strarray_add( deps, lib ); + strarray_add( &ret, lib ); } - strarray_add( &ret, strmake( "-l%s", name )); + else strarray_add( &ret, strmake( "-l%s", name )); } return ret; }
1
0
0
0
Alexandre Julliard : winebuild: Add support for linking to static import libraries.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 13fe69714bbf719d9ddbcf8d34d025f48da3af7b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=13fe69714bbf719d9ddbcf8d3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 25 15:33:35 2016 +0900 winebuild: Add support for linking to static import libraries. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winebuild/import.c | 57 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 51 insertions(+), 6 deletions(-) diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index d2d6f57..4fbcab0 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -309,6 +309,28 @@ void add_extra_ld_symbol( const char *name ) strarray_add( &extra_ld_symbols, name, NULL ); } +/* retrieve an imported dll, adding one if necessary */ +struct import *add_static_import_dll( const char *name ) +{ + struct import *import; + char *dll_name = get_dll_name( name, NULL ); + + if ((import = find_import_dll( dll_name ))) return import; + + import = xmalloc( sizeof(*import) ); + memset( import, 0, sizeof(*import) ); + + import->dll_name = dll_name; + import->full_name = xstrdup( dll_name ); + import->c_name = make_c_identifier( dll_name ); + + if (is_delayed_import( dll_name )) + list_add_tail( &dll_delayed, &import->entry ); + else + list_add_tail( &dll_imports, &import->entry ); + return import; +} + /* add a function to the list of imports from a given dll */ static void add_import_func( struct import *imp, const char *name, const char *export_name, int ordinal ) { @@ -324,6 +346,26 @@ static void add_import_func( struct import *imp, const char *name, const char *e imp->nb_imports++; } +/* add an import for an undefined function of the form __wine$func$ */ +static void add_undef_import( const char *name, int is_ordinal ) +{ + char *p, *dll_name = xstrdup( name ); + int ordinal = 0; + struct import *import; + + if (!(p = strchr( dll_name, '$' ))) return; + *p++ = 0; + while (*p >= '0' && *p <= '9') ordinal = 10 * ordinal + *p++ - '0'; + if (*p != '$') return; + p++; + + import = add_static_import_dll( dll_name ); + if (is_ordinal) + add_import_func( import, NULL, xstrdup( p ), ordinal ); + else + add_import_func( import, xstrdup( p ), NULL, ordinal ); +} + /* get the default entry point for a given spec file */ static const char *get_default_entry_point( const DLLSPEC *spec ) { @@ -351,7 +393,7 @@ static void add_extra_undef_symbols( DLLSPEC *spec ) if (!spec->init_func) spec->init_func = xstrdup( get_default_entry_point(spec) ); add_extra_ld_symbol( spec->init_func ); if (has_stubs( spec )) add_extra_ld_symbol( "__wine_spec_unimplemented_stub" ); - if (!list_empty( &dll_delayed )) add_extra_ld_symbol( "__wine_spec_delay_load" ); + if (delayed_imports.count) add_extra_ld_symbol( "__wine_spec_delay_load" ); } /* check if a given imported dll is not needed, taking forwards into account */ @@ -518,7 +560,11 @@ void read_undef_symbols( DLLSPEC *spec, char **argv ) while (*p == ' ') p++; if (p[0] == 'U' && p[1] == ' ' && p[2]) p += 2; if (prefix_len && !strncmp( p, name_prefix, prefix_len )) p += prefix_len; - strarray_add( &undef_symbols, xstrdup( p ), NULL ); + if (!strncmp( p, import_func_prefix, strlen(import_func_prefix) )) + add_undef_import( p + strlen( import_func_prefix ), 0 ); + else if (!strncmp( p, import_ord_prefix, strlen(import_ord_prefix) )) + add_undef_import( p + strlen( import_ord_prefix ), 1 ); + else strarray_add( &undef_symbols, xstrdup( p ), NULL ); } if ((err = pclose( f ))) warning( "%s failed with status %d\n", cmd, err ); free( cmd ); @@ -526,13 +572,13 @@ void read_undef_symbols( DLLSPEC *spec, char **argv ) void resolve_dll_imports( DLLSPEC *spec, struct list *list ) { - unsigned int j, removed; + unsigned int j; struct import *imp, *next; ORDDEF *odp; LIST_FOR_EACH_ENTRY_SAFE( imp, next, list, struct import, entry ) { - for (j = removed = 0; j < undef_symbols.count; j++) + for (j = 0; j < undef_symbols.count; j++) { odp = find_export( undef_symbols.str[j], imp->exports, imp->nb_exports ); if (odp) @@ -546,11 +592,10 @@ void resolve_dll_imports( DLLSPEC *spec, struct list *list ) add_import_func( imp, (odp->flags & FLAG_NONAME) ? NULL : odp->name, odp->export_name, odp->ordinal ); remove_name( &undef_symbols, j-- ); - removed++; } } } - if (!removed) + if (!imp->nb_imports) { /* the dll is not used, get rid of it */ if (check_unused( imp, spec ))
1
0
0
0
Alexandre Julliard : winebuild: Add support for creating static import libraries.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: aac69889bf1e276688895eca313dc861cab07545 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aac69889bf1e276688895eca3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 25 15:32:22 2016 +0900 winebuild: Add support for creating static import libraries. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winebuild/build.h | 1 + tools/winebuild/import.c | 132 ++++++++++++++++++++++++++++++++++++--- tools/winebuild/utils.c | 7 +++ tools/winebuild/winebuild.man.in | 2 +- 4 files changed, 131 insertions(+), 11 deletions(-) diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h index 5cf984b..03b88fa 100644 --- a/tools/winebuild/build.h +++ b/tools/winebuild/build.h @@ -233,6 +233,7 @@ extern char *strmake(const char* fmt, ...) __attribute__((__format__ (__printf__ extern struct strarray strarray_fromstring( const char *str, const char *delim ); extern void strarray_add( struct strarray *array, ... ); extern void strarray_addv( struct strarray *array, char * const *argv ); +extern void strarray_addall( struct strarray *array, struct strarray args ); extern DECLSPEC_NORETURN void fatal_error( const char *msg, ... ) __attribute__ ((__format__ (__printf__, 1, 2))); extern DECLSPEC_NORETURN void fatal_perror( const char *msg, ... ) diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index 1d561c4..d2d6f57 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -68,6 +68,10 @@ static struct strarray ext_link_imports; /* list of external symbols to link to static struct list dll_imports = LIST_INIT( dll_imports ); static struct list dll_delayed = LIST_INIT( dll_delayed ); +static struct strarray as_files; + +static const char import_func_prefix[] = "__wine$func$"; +static const char import_ord_prefix[] = "__wine$ord$"; static inline const char *ppc_reg( int reg ) { @@ -1283,16 +1287,56 @@ void output_imports( DLLSPEC *spec ) output_external_link_imports( spec ); } -/* output an import library for a Win32 module and additional object files */ -void output_import_lib( DLLSPEC *spec, char **argv ) +/* create a new asm temp file */ +static void new_output_as_file( const char *prefix ) +{ + char *name = get_temp_file_name( prefix, ".s" ); + + if (output_file) fclose( output_file ); + if (!(output_file = fopen( name, "w" ))) + fatal_error( "Unable to create output file '%s'\n", name ); + strarray_add( &as_files, name, NULL ); +} + +/* assemble all the asm files */ +static void assemble_files( const char *prefix ) +{ + unsigned int i; + + if (output_file) fclose( output_file ); + output_file = NULL; + + for (i = 0; i < as_files.count; i++) + { + char *obj = get_temp_file_name( prefix, ".o" ); + assemble_file( as_files.str[i], obj ); + as_files.str[i] = obj; + } +} + +/* build a library from the current asm files and any additional object files in argv */ +static void build_library( const char *output_name, char **argv, int create ) +{ + struct strarray args = find_tool( "ar", NULL ); + struct strarray ranlib = find_tool( "ranlib", NULL ); + + strarray_add( &args, create ? "rc" : "r", output_name, NULL ); + strarray_addall( &args, as_files ); + strarray_addv( &args, argv ); + if (create) unlink( output_name ); + spawn( args ); + + strarray_add( &ranlib, output_name, NULL ); + spawn( ranlib ); +} + +/* create a Windows-style import library */ +static void build_windows_import_lib( DLLSPEC *spec ) { struct strarray args; char *def_file; const char *as_flags, *m_flag; - if (target_platform != PLATFORM_WINDOWS) - fatal_error( "Unix-style import libraries not supported yet\n" ); - def_file = get_temp_file_name( output_file_name, ".def" ); fclose( output_file ); if (!(output_file = fopen( def_file, "w" ))) @@ -1320,13 +1364,81 @@ void output_import_lib( DLLSPEC *spec, char **argv ) if (m_flag) strarray_add( &args, "-m", m_flag, as_flags, NULL ); spawn( args ); +} + +/* create a Unix-style import library */ +static void build_unix_import_lib( DLLSPEC *spec ) +{ + static const char valid_chars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._@"; + int i, total; + const char *name, *prefix; + char *dll_name = xstrdup( spec->file_name ); - if (argv[0]) + if (strendswith( dll_name, ".dll" )) dll_name[strlen(dll_name) - 4] = 0; + if (strspn( dll_name, valid_chars ) < strlen( dll_name )) + fatal_error( "%s contains invalid characters\n", spec->file_name ); + + /* entry points */ + + for (i = total = 0; i < spec->nb_entry_points; i++) + { + const ORDDEF *odp = &spec->entry_points[i]; + + if (odp->name) name = odp->name; + else if (odp->export_name) name = odp->export_name; + else continue; + + if (odp->flags & FLAG_PRIVATE) continue; + total++; + + /* C++ mangled names cannot be imported */ + if (strpbrk( name, "?@" )) continue; + + switch(odp->type) + { + case TYPE_VARARGS: + case TYPE_CDECL: + case TYPE_STDCALL: + case TYPE_THISCALL: + prefix = (!odp->name || (odp->flags & FLAG_ORDINAL)) ? import_ord_prefix : import_func_prefix; + new_output_as_file( spec->file_name ); + output( "\t.text\n" ); + output( "\n\t.align %d\n", get_alignment( get_ptr_size() )); + output( "\t%s\n", func_declaration( name ) ); + output( "%s\n", asm_globl( name ) ); + output( "\t%s %s%s$%u$%s\n", get_asm_ptr_keyword(), + asm_name( prefix ), dll_name, odp->ordinal, name ); + output_function_size( name ); + break; + + default: + break; + } + } + if (!total) warning( "%s: Import library doesn't export anything\n", spec->file_name ); + + if (!as_files.count) /* create a dummy file to avoid empty import libraries */ + { + new_output_as_file( spec->file_name ); + output( "\t.text\n" ); + } + + assemble_files( spec->file_name ); + free( dll_name ); +} + +/* output an import library for a Win32 module and additional object files */ +void output_import_lib( DLLSPEC *spec, char **argv ) +{ + if (target_platform == PLATFORM_WINDOWS) + { + build_windows_import_lib( spec ); + if (argv[0]) build_library( output_file_name, argv, 0 ); + } + else { - args = find_tool( "ar", NULL ); - strarray_add( &args, "rs", output_file_name, NULL ); - strarray_addv( &args, argv ); - spawn( args ); + build_unix_import_lib( spec ); + build_library( output_file_name, argv, 1 ); } output_file_name = NULL; } diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c index c513565..9308e83 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -182,6 +182,13 @@ void strarray_addv( struct strarray *array, char * const *argv ) while (*argv) strarray_add_one( array, *argv++ ); } +void strarray_addall( struct strarray *array, struct strarray args ) +{ + unsigned int i; + + for (i = 0; i < args.count; i++) strarray_add_one( array, args.str[i] ); +} + struct strarray strarray_fromstring( const char *str, const char *delim ) { const char *tok; diff --git a/tools/winebuild/winebuild.man.in b/tools/winebuild/winebuild.man.in index 2063738..d99fb57 100644 --- a/tools/winebuild/winebuild.man.in +++ b/tools/winebuild/winebuild.man.in @@ -47,7 +47,7 @@ Build a .def file from a spec file. The .spec file is specified via the \fB-E\fR option. This is used when building dlls with a PE (Win32) compiler. .TP .BI \--implib -Build a PE import library from a spec file. The .spec file is +Build a .a import library from a spec file. The .spec file is specified via the \fB-E\fR option. .TP .B \--resources
1
0
0
0
Louis Lenders : gdiplus/tests: Add test for GdipTransformPath with null-matrix.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 2d6daeb8ea0746e9561e67c67f8fe23aa8ee57b8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2d6daeb8ea0746e9561e67c67…
Author: Louis Lenders <xerox.xerox2000x(a)gmail.com> Date: Tue Mar 22 21:18:56 2016 +0100 gdiplus/tests: Add test for GdipTransformPath with null-matrix. Signed-off-by: Louis Lenders <xerox.xerox2000x(a)gmail.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/tests/graphicspath.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/gdiplus/tests/graphicspath.c b/dlls/gdiplus/tests/graphicspath.c index 24619e5..c43fb42 100644 --- a/dlls/gdiplus/tests/graphicspath.c +++ b/dlls/gdiplus/tests/graphicspath.c @@ -1012,6 +1012,9 @@ static void test_flatten(void) status = GdipFlattenPath(path, NULL, 1.0); expect(Ok, status); + status = GdipTransformPath(path, 0); + expect(Ok, status); + status = GdipAddPathEllipse(path, 0.0, 0.0, 100.0, 50.0); expect(Ok, status);
1
0
0
0
Louis Lenders : gdiplus: GdipTransformPath should return Ok if matrix = NULL.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 36fdc6abf19bc53dfb33532464f3613f95444239 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36fdc6abf19bc53dfb3353246…
Author: Louis Lenders <xerox.xerox2000x(a)gmail.com> Date: Tue Mar 22 21:07:05 2016 +0100 gdiplus: GdipTransformPath should return Ok if matrix = NULL. Signed-off-by: Louis Lenders <xerox.xerox2000x(a)gmail.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/graphicspath.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 58e99a2..963ee1c 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -1216,11 +1216,9 @@ GpStatus WINGDIPAPI GdipFlattenPath(GpPath *path, GpMatrix* matrix, REAL flatnes if(path->pathdata.Count == 0) return Ok; - if(matrix){ - stat = GdipTransformPath(path, matrix); - if (stat != Ok) - return stat; - } + stat = GdipTransformPath(path, matrix); + if(stat != Ok) + return stat; pt = path->pathdata.Points[0]; if(!init_path_list(&list, pt.X, pt.Y)) @@ -1677,7 +1675,7 @@ GpStatus WINGDIPAPI GdipTransformPath(GpPath *path, GpMatrix *matrix) if(!path) return InvalidParameter; - if(path->pathdata.Count == 0) + if(path->pathdata.Count == 0 || !matrix) return Ok; return GdipTransformMatrixPoints(matrix, path->pathdata.Points,
1
0
0
0
Stefan Dösinger : wined3d: Avoid storing color and rectangle pointers in struct wined3d_cs_clear.
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 7d65065ecb08f2eef59bf0d6e3a3aa397bccb46b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7d65065ecb08f2eef59bf0d6e…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Mar 24 18:24:31 2016 +0100 wined3d: Avoid storing color and rectangle pointers in struct wined3d_cs_clear. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/cs.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 0e6cc5b..91e1759 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -67,12 +67,12 @@ struct wined3d_cs_present struct wined3d_cs_clear { enum wined3d_cs_op opcode; - DWORD rect_count; - const RECT *rects; DWORD flags; - const struct wined3d_color *color; + struct wined3d_color color; float depth; DWORD stencil; + unsigned int rect_count; + RECT rects[1]; }; struct wined3d_cs_draw @@ -287,7 +287,7 @@ static void wined3d_cs_exec_clear(struct wined3d_cs *cs, const void *data) wined3d_get_draw_rect(&device->state, &draw_rect); device_clear_render_targets(device, device->adapter->gl_info.limits.buffers, &device->fb, op->rect_count, op->rects, &draw_rect, op->flags, - op->color, op->depth, op->stencil); + &op->color, op->depth, op->stencil); } void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects, @@ -295,14 +295,14 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT * { struct wined3d_cs_clear *op; - op = cs->ops->require_space(cs, sizeof(*op)); + op = cs->ops->require_space(cs, FIELD_OFFSET(struct wined3d_cs_clear, rects[rect_count])); op->opcode = WINED3D_CS_OP_CLEAR; - op->rect_count = rect_count; - op->rects = rects; op->flags = flags; - op->color = color; + op->color = *color; op->depth = depth; op->stencil = stencil; + op->rect_count = rect_count; + memcpy(op->rects, rects, sizeof(*rects) * rect_count); cs->ops->submit(cs); }
1
0
0
0
Henri Verbeet : wined3d: Get resource info from the texture in surface_load_renderbuffer().
by Alexandre Julliard
25 Mar '16
25 Mar '16
Module: wine Branch: master Commit: 38f921a8a966d7279a45c845fa60e34d7e77ea29 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=38f921a8a966d7279a45c845f…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Mar 24 18:24:30 2016 +0100 wined3d: Get resource info from the texture in surface_load_renderbuffer(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index a7394f8..cab1451 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3232,7 +3232,7 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi else /* surface_blt_fbo will load the source location if necessary. */ src_location = WINED3D_LOCATION_TEXTURE_RGB; - surface_blt_fbo(surface->resource.device, context, WINED3D_TEXF_POINT, + surface_blt_fbo(surface->container->resource.device, context, WINED3D_TEXF_POINT, surface, src_location, &rect, surface, dst_location, &rect); }
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
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