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
December 2011
----- 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
810 discussions
Start a n
N
ew thread
André Hentschel : d3drm: Add IDirect3DRMMeshBuilder3 interface.
by Alexandre Julliard
29 Dec '11
29 Dec '11
Module: wine Branch: master Commit: 7164806b561644423c08668ddeca2eba1e9bae5e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7164806b561644423c08668dd…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Thu Dec 29 02:25:42 2011 +0100 d3drm: Add IDirect3DRMMeshBuilder3 interface. --- dlls/d3drm/d3drm.c | 4 +- dlls/d3drm/d3drm_private.h | 2 +- dlls/d3drm/meshbuilder.c | 961 +++++++++++++++++++++++++++++++++++++++++--- include/d3drmobj.h | 2 +- 4 files changed, 899 insertions(+), 70 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=7164806b561644423c086…
1
0
0
0
Francois Gouget : inetcpl: Don't pad group box labels with spaces.
by Alexandre Julliard
29 Dec '11
29 Dec '11
Module: wine Branch: master Commit: 2180a9c3a4df91efecf2f19c0578027e641234b3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2180a9c3a4df91efecf2f19c0…
Author: Francois Gouget <fgouget(a)free.fr> Date: Thu Dec 29 00:12:21 2011 +0100 inetcpl: Don't pad group box labels with spaces. --- dlls/inetcpl.cpl/inetcpl.rc | 6 +++--- dlls/inetcpl.cpl/security.c | 9 ++------- po/ar.po | 11 +++-------- po/bg.po | 11 +++-------- po/ca.po | 12 +++++------- po/cs.po | 14 +++++--------- po/da.po | 11 +++-------- po/de.po | 12 +++++------- po/el.po | 10 +++------- po/en.po | 12 ++++-------- po/en_US.po | 14 +++++--------- po/eo.po | 11 +++-------- po/es.po | 14 +++++--------- po/fa.po | 11 +++-------- po/fi.po | 14 +++++--------- po/fr.po | 12 +++++------- po/he.po | 12 +++++------- po/hi.po | 11 +++-------- po/hu.po | 14 +++++--------- po/it.po | 12 +++++------- po/ja.po | 12 +++++------- po/ko.po | 12 +++++------- po/lt.po | 12 +++++------- po/ml.po | 11 +++-------- po/nb_NO.po | 11 +++-------- po/nl.po | 12 +++++------- po/or.po | 11 +++-------- po/pa.po | 11 +++-------- po/pl.po | 12 +++++------- po/pt_BR.po | 12 +++++------- po/pt_PT.po | 11 +++-------- po/rm.po | 11 +++-------- po/ro.po | 11 +++-------- po/ru.po | 12 +++++------- po/sk.po | 11 +++-------- po/sl.po | 11 +++-------- po/sr_RS(a)cyrillic.po | 12 +++++------- po/sr_RS(a)latin.po | 12 +++++------- po/sv.po | 12 +++++------- po/te.po | 11 +++-------- po/th.po | 11 +++-------- po/tr.po | 14 +++++--------- po/uk.po | 12 +++++------- po/wa.po | 11 +++-------- po/wine.pot | 10 +++------- po/zh_CN.po | 11 +++-------- po/zh_TW.po | 11 +++-------- 47 files changed, 185 insertions(+), 358 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=2180a9c3a4df91efecf2f…
1
0
0
0
Francois Gouget : cryptui: Don't assign access keys to group box labels.
by Alexandre Julliard
29 Dec '11
29 Dec '11
Module: wine Branch: master Commit: dc31798caf83c033f2f12db1aedacdd77aea9edb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dc31798caf83c033f2f12db1a…
Author: Francois Gouget <fgouget(a)free.fr> Date: Thu Dec 29 00:07:06 2011 +0100 cryptui: Don't assign access keys to group box labels. --- dlls/cryptui/cryptui.rc | 2 +- po/ar.po | 2 +- po/bg.po | 2 +- po/ca.po | 3 ++- po/cs.po | 2 +- po/da.po | 2 +- po/de.po | 3 ++- po/el.po | 2 +- po/en.po | 4 ++-- po/en_US.po | 4 ++-- po/eo.po | 2 +- po/es.po | 2 +- po/fa.po | 2 +- po/fi.po | 2 +- po/fr.po | 3 ++- po/he.po | 2 +- po/hi.po | 2 +- po/hu.po | 2 +- po/it.po | 3 ++- po/ja.po | 3 ++- po/ko.po | 3 ++- po/lt.po | 3 ++- po/ml.po | 2 +- po/nb_NO.po | 3 ++- po/nl.po | 3 ++- po/or.po | 2 +- po/pa.po | 2 +- po/pl.po | 3 ++- po/pt_BR.po | 3 ++- po/pt_PT.po | 3 ++- po/rm.po | 2 +- po/ro.po | 3 ++- po/ru.po | 3 ++- po/sk.po | 2 +- po/sl.po | 2 +- po/sr_RS(a)cyrillic.po | 2 +- po/sr_RS(a)latin.po | 2 +- po/sv.po | 3 ++- po/te.po | 2 +- po/th.po | 2 +- po/tr.po | 2 +- po/uk.po | 3 ++- po/wa.po | 2 +- po/wine.pot | 2 +- po/zh_CN.po | 2 +- po/zh_TW.po | 2 +- 46 files changed, 64 insertions(+), 48 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=dc31798caf83c033f2f12…
1
0
0
0
Francois Gouget : comdlg32: Use sentence capitalization for group box labels.
by Alexandre Julliard
29 Dec '11
29 Dec '11
Module: wine Branch: master Commit: f8c1b087865bec804464ffe1e1b92807b480cc33 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f8c1b087865bec804464ffe1e…
Author: Francois Gouget <fgouget(a)free.fr> Date: Thu Dec 29 00:05:02 2011 +0100 comdlg32: Use sentence capitalization for group box labels. --- dlls/comdlg32/comdlg32.rc | 2 +- po/ar.po | 9 ++------- po/bg.po | 8 ++------ po/ca.po | 10 +++------- po/cs.po | 8 ++------ po/da.po | 8 ++------ po/de.po | 10 +++------- po/el.po | 10 +++------- po/en.po | 10 +++------- po/en_US.po | 10 +++------- po/eo.po | 8 ++------ po/es.po | 8 ++------ po/fa.po | 9 ++------- po/fi.po | 10 +++------- po/fr.po | 8 ++------ po/he.po | 10 +++------- po/hi.po | 12 ++++-------- po/hu.po | 10 +++------- po/it.po | 8 ++------ po/ja.po | 10 +++------- po/ko.po | 8 ++------ po/lt.po | 10 +++------- po/ml.po | 12 ++++-------- po/nb_NO.po | 8 ++------ po/nl.po | 8 ++------ po/or.po | 12 ++++-------- po/pa.po | 12 ++++-------- po/pl.po | 8 ++------ po/pt_BR.po | 10 +++------- po/pt_PT.po | 10 +++------- po/rm.po | 9 ++------- po/ro.po | 8 ++------ po/ru.po | 8 ++------ po/sk.po | 8 ++------ po/sl.po | 8 ++------ po/sr_RS(a)cyrillic.po | 10 +++------- po/sr_RS(a)latin.po | 9 ++------- po/sv.po | 10 +++------- po/te.po | 12 ++++-------- po/th.po | 8 ++------ po/tr.po | 10 +++------- po/uk.po | 8 ++------ po/wa.po | 10 +++------- po/wine.pot | 8 ++------ po/zh_CN.po | 8 ++------ po/zh_TW.po | 9 ++------- 46 files changed, 117 insertions(+), 302 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=f8c1b087865bec804464f…
1
0
0
0
Nikolay Sivov : wshom.ocx: Added IDispatch support for IWshShell3.
by Alexandre Julliard
29 Dec '11
29 Dec '11
Module: wine Branch: master Commit: 322887635599ebae4bd13f838fb427face085c76 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=322887635599ebae4bd13f838…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Dec 29 12:16:22 2011 +0300 wshom.ocx: Added IDispatch support for IWshShell3. --- dlls/wshom.ocx/Makefile.in | 1 + dlls/wshom.ocx/shell.c | 37 +++++++++++++++++--- dlls/wshom.ocx/tests/wshom.c | 6 +++- dlls/wshom.ocx/wshom_main.c | 70 +++++++++++++++++++++++++++++++++++++++- dlls/wshom.ocx/wshom_private.h | 9 +++++ 5 files changed, 115 insertions(+), 8 deletions(-) diff --git a/dlls/wshom.ocx/Makefile.in b/dlls/wshom.ocx/Makefile.in index 879cc70..385fe73 100644 --- a/dlls/wshom.ocx/Makefile.in +++ b/dlls/wshom.ocx/Makefile.in @@ -1,4 +1,5 @@ MODULE = wshom.ocx +IMPORTS = uuid oleaut32 C_SRCS = \ shell.c \ diff --git a/dlls/wshom.ocx/shell.c b/dlls/wshom.ocx/shell.c index 9392ff5..68f14b8 100644 --- a/dlls/wshom.ocx/shell.c +++ b/dlls/wshom.ocx/shell.c @@ -23,6 +23,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(wshom); +static IWshShell3 WshShell3; + static HRESULT WINAPI WshShell3_QueryInterface(IWshShell3 *iface, REFIID riid, void **ppv) { if(IsEqualGUID(riid, &IID_IUnknown)) { @@ -66,23 +68,46 @@ static HRESULT WINAPI WshShell3_GetTypeInfoCount(IWshShell3 *iface, UINT *pctinf static HRESULT WINAPI WshShell3_GetTypeInfo(IWshShell3 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) { - FIXME("(%u %u %p)\n", iTInfo, lcid, ppTInfo); - return E_NOTIMPL; + TRACE("(%u %u %p)\n", iTInfo, lcid, ppTInfo); + return get_typeinfo(IWshShell3_tid, ppTInfo); } static HRESULT WINAPI WshShell3_GetIDsOfNames(IWshShell3 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) { - FIXME("(%s %p %u %u %p)\n", debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); - return E_NOTIMPL; + ITypeInfo *typeinfo; + HRESULT hr; + + TRACE("(%s %p %u %u %p)\n", debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); + + hr = get_typeinfo(IWshShell3_tid, &typeinfo); + if(SUCCEEDED(hr)) + { + hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId); + ITypeInfo_Release(typeinfo); + } + + return hr; } static HRESULT WINAPI WshShell3_Invoke(IWshShell3 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { - FIXME("(%d %s %d %d %p %p %p %p)\n", dispIdMember, debugstr_guid(riid), + ITypeInfo *typeinfo; + HRESULT hr; + + TRACE("(%d %s %d %d %p %p %p %p)\n", dispIdMember, debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); - return E_NOTIMPL; + + hr = get_typeinfo(IWshShell3_tid, &typeinfo); + if(SUCCEEDED(hr)) + { + hr = ITypeInfo_Invoke(typeinfo, &WshShell3, dispIdMember, wFlags, + pDispParams, pVarResult, pExcepInfo, puArgErr); + ITypeInfo_Release(typeinfo); + } + + return hr; } static HRESULT WINAPI WshShell3_get_SpecialFolders(IWshShell3 *iface, IWshCollection **out_Folders) diff --git a/dlls/wshom.ocx/tests/wshom.c b/dlls/wshom.ocx/tests/wshom.c index f9768b9..36081aa 100644 --- a/dlls/wshom.ocx/tests/wshom.c +++ b/dlls/wshom.ocx/tests/wshom.c @@ -31,6 +31,7 @@ DEFINE_GUID(IID_IWshShell3, 0x41904400, 0xbe18, 0x11d3, 0xa2,0x8b, 0x00,0x10,0x4 static void test_wshshell(void) { + IDispatchEx *dispex; IDispatch *disp; IUnknown *shell; HRESULT hres; @@ -43,9 +44,12 @@ static void test_wshshell(void) } hres = IDispatch_QueryInterface(disp, &IID_IWshShell3, (void**)&shell); - IDispatch_Release(disp); ok(hres == S_OK, "Could not get IWshShell3 iface: %08x\n", hres); + hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex); + ok(hres == E_NOINTERFACE, "got %08x\n", hres); + + IDispatch_Release(disp); IUnknown_Release(shell); } diff --git a/dlls/wshom.ocx/wshom_main.c b/dlls/wshom.ocx/wshom_main.c index b05eb86..c750592 100644 --- a/dlls/wshom.ocx/wshom_main.c +++ b/dlls/wshom.ocx/wshom_main.c @@ -16,8 +16,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "initguid.h" #include "wshom_private.h" + +#include "initguid.h" #include "wshom.h" #include "rpcproxy.h" @@ -27,6 +28,70 @@ WINE_DEFAULT_DEBUG_CHANNEL(wshom); static HINSTANCE wshom_instance; +static ITypeLib *typelib; +static ITypeInfo *typeinfos[LAST_tid]; + +static REFIID tid_ids[] = { + &IID_NULL, + &IID_IWshShell3 +}; + +static HRESULT load_typelib(void) +{ + HRESULT hres; + ITypeLib *tl; + + hres = LoadRegTypeLib(&LIBID_IWshRuntimeLibrary, 1, 0, LOCALE_SYSTEM_DEFAULT, &tl); + if(FAILED(hres)) { + ERR("LoadRegTypeLib failed: %08x\n", hres); + return hres; + } + + if(InterlockedCompareExchangePointer((void**)&typelib, tl, NULL)) + ITypeLib_Release(tl); + return hres; +} + +HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo) +{ + HRESULT hres; + + if (!typelib) + hres = load_typelib(); + if (!typelib) + return hres; + + if(!typeinfos[tid]) { + ITypeInfo *ti; + + hres = ITypeLib_GetTypeInfoOfGuid(typelib, tid_ids[tid], &ti); + if(FAILED(hres)) { + ERR("GetTypeInfoOfGuid(%s) failed: %08x\n", debugstr_guid(tid_ids[tid]), hres); + return hres; + } + + if(InterlockedCompareExchangePointer((void**)(typeinfos+tid), ti, NULL)) + ITypeInfo_Release(ti); + } + + *typeinfo = typeinfos[tid]; + return S_OK; +} + +void release_typelib(void) +{ + unsigned i; + + if(!typelib) + return; + + for(i=0; i < sizeof(typeinfos)/sizeof(*typeinfos); i++) + if(typeinfos[i]) + ITypeInfo_Release(typeinfos[i]); + + ITypeLib_Release(typelib); +} + static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) { *ppv = NULL; @@ -91,6 +156,9 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) wshom_instance = hInstDLL; DisableThreadLibraryCalls(wshom_instance); break; + case DLL_PROCESS_DETACH: + release_typelib(); + break; } return TRUE; diff --git a/dlls/wshom.ocx/wshom_private.h b/dlls/wshom.ocx/wshom_private.h index 50b84b3..42be641 100644 --- a/dlls/wshom.ocx/wshom_private.h +++ b/dlls/wshom.ocx/wshom_private.h @@ -24,4 +24,13 @@ #include "winbase.h" #include "ole2.h" +/* typelibs */ +typedef enum tid_t { + NULL_tid, + IWshShell3_tid, + LAST_tid +} tid_t; + +HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo); + HRESULT WINAPI WshShellFactory_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
1
0
0
0
Jacek Caban : jscript: Added bytecode dumper implementation.
by Alexandre Julliard
29 Dec '11
29 Dec '11
Module: wine Branch: master Commit: 59619073a89cc6add5eda979ac234ed8e2d0266e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=59619073a89cc6add5eda979a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Dec 29 11:09:51 2011 +0100 jscript: Added bytecode dumper implementation. --- dlls/jscript/compile.c | 55 +++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 52 insertions(+), 3 deletions(-) diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c index 05d1ccc..62dadea 100644 --- a/dlls/jscript/compile.c +++ b/dlls/jscript/compile.c @@ -25,6 +25,7 @@ #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(jscript); +WINE_DECLARE_DEBUG_CHANNEL(jscript_disas); typedef struct _statement_ctx_t { unsigned stack_use; @@ -61,6 +62,46 @@ OP_LIST #undef X }; +static void dump_instr_arg(instr_arg_type_t type, instr_arg_t *arg) +{ + switch(type) { + case ARG_STR: + TRACE_(jscript_disas)("\t%s", debugstr_w(arg->str)); + break; + case ARG_BSTR: + TRACE_(jscript_disas)("\t%s", debugstr_wn(arg->bstr, SysStringLen(arg->bstr))); + break; + case ARG_INT: + TRACE_(jscript_disas)("\t%d", arg->uint); + break; + case ARG_UINT: + case ARG_ADDR: + TRACE_(jscript_disas)("\t%u", arg->uint); + break; + case ARG_DBL: + TRACE_(jscript_disas)("\t%lf", *arg->dbl); + break; + case ARG_STAT: + case ARG_FUNC: + case ARG_NONE: + break; + default: + assert(0); + } +} + +static void dump_code(compiler_ctx_t *ctx, unsigned off) +{ + instr_t *instr; + + for(instr = ctx->code->instrs+off; instr < ctx->code->instrs+ctx->code_off; instr++) { + TRACE_(jscript_disas)("%d:\t%s", (int)(instr-ctx->code->instrs), instr_info[instr->op].op_str); + dump_instr_arg(instr_info[instr->op].arg1_type, &instr->arg1); + dump_instr_arg(instr_info[instr->op].arg2_type, &instr->arg2); + TRACE_(jscript_disas)("\n"); + } +} + static HRESULT compile_expression(compiler_ctx_t*,expression_t*); static HRESULT compile_statement(compiler_ctx_t*,statement_ctx_t*,statement_t*); @@ -1639,6 +1680,7 @@ HRESULT compile_subscript(parser_ctx_t *parser, expression_t *expr, unsigned *re HRESULT compile_subscript_stat(parser_ctx_t *parser, statement_t *stat, unsigned *ret_off) { + unsigned off; HRESULT hres; TRACE("\n"); @@ -1647,7 +1689,7 @@ HRESULT compile_subscript_stat(parser_ctx_t *parser, statement_t *stat, unsigned if(FAILED(hres)) return hres; - *ret_off = parser->compiler->code_off; + off = parser->compiler->code_off; if(stat->next) hres = compile_block_statement(parser->compiler, stat); else @@ -1655,7 +1697,14 @@ HRESULT compile_subscript_stat(parser_ctx_t *parser, statement_t *stat, unsigned if(FAILED(hres)) return hres; - resolve_labels(parser->compiler, *ret_off); + resolve_labels(parser->compiler, off); - return push_instr(parser->compiler, OP_ret) == -1 ? E_OUTOFMEMORY : S_OK; + if(push_instr(parser->compiler, OP_ret) == -1) + return E_OUTOFMEMORY; + + if(TRACE_ON(jscript_disas)) + dump_code(parser->compiler, off); + + *ret_off = off; + return S_OK; }
1
0
0
0
Jacek Caban : jscript: Moved instr_off from statement_t to source_elements_t.
by Alexandre Julliard
29 Dec '11
29 Dec '11
Module: wine Branch: master Commit: ee6e6986fb8d93632ba02c63f3f2015cd125c048 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ee6e6986fb8d93632ba02c63f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Dec 29 11:09:29 2011 +0100 jscript: Moved instr_off from statement_t to source_elements_t. --- dlls/jscript/engine.c | 6 +++--- dlls/jscript/engine.h | 2 +- dlls/jscript/parser.y | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 1cd96a7..9a4ac64 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -2755,10 +2755,10 @@ HRESULT exec_source(exec_ctx_t *ctx, parser_ctx_t *parser, source_elements_t *so rt.type = RT_NORMAL; if(source->statement) { - if(source->statement->instr_off == -1) - hres = compile_subscript_stat(ctx->parser, source->statement, &source->statement->instr_off); + if(source->instr_off == -1) + hres = compile_subscript_stat(ctx->parser, source->statement, &source->instr_off); if(SUCCEEDED(hres)) - hres = enter_bytecode(script, source->statement->instr_off, &rt, &val); + hres = enter_bytecode(script, source->instr_off, &rt, &val); } script->exec_ctx = prev_ctx; diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index c984ade..530a65a 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -320,7 +320,6 @@ typedef enum { struct _statement_t { statement_type_t type; statement_eval_t eval; - unsigned instr_off; statement_t *next; }; @@ -508,6 +507,7 @@ struct _source_elements_t { statement_t *statement_tail; function_declaration_t *functions; var_list_t *variables; + unsigned instr_off; }; struct _function_expression_t { diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y index a3fe42a..c45fb6e 100644 --- a/dlls/jscript/parser.y +++ b/dlls/jscript/parser.y @@ -845,7 +845,6 @@ static void *new_statement(parser_ctx_t *ctx, statement_type_t type, size_t size stat->type = type; stat->eval = NULL; - stat->instr_off = -1; stat->next = NULL; return stat; @@ -1472,6 +1471,7 @@ static source_elements_t *new_source_elements(parser_ctx_t *ctx) source_elements_t *ret = parser_alloc(ctx, sizeof(source_elements_t)); memset(ret, 0, sizeof(*ret)); + ret->instr_off = -1; return ret; }
1
0
0
0
Jacek Caban : jscript: No longer support per-statement compilation.
by Alexandre Julliard
29 Dec '11
29 Dec '11
Module: wine Branch: master Commit: b3907c40f74f4b25ed9c7a34004ddac051eb43e7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b3907c40f74f4b25ed9c7a340…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Dec 29 11:09:09 2011 +0100 jscript: No longer support per-statement compilation. --- dlls/jscript/compile.c | 4 ++-- dlls/jscript/engine.c | 14 ++++---------- dlls/jscript/engine.h | 2 +- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c index 5d63dbe..05d1ccc 100644 --- a/dlls/jscript/compile.c +++ b/dlls/jscript/compile.c @@ -1637,7 +1637,7 @@ HRESULT compile_subscript(parser_ctx_t *parser, expression_t *expr, unsigned *re return push_instr(parser->compiler, OP_ret) == -1 ? E_OUTOFMEMORY : S_OK; } -HRESULT compile_subscript_stat(parser_ctx_t *parser, statement_t *stat, BOOL compile_block, unsigned *ret_off) +HRESULT compile_subscript_stat(parser_ctx_t *parser, statement_t *stat, unsigned *ret_off) { HRESULT hres; @@ -1648,7 +1648,7 @@ HRESULT compile_subscript_stat(parser_ctx_t *parser, statement_t *stat, BOOL com return hres; *ret_off = parser->compiler->code_off; - if(compile_block && stat->next) + if(stat->next) hres = compile_block_statement(parser->compiler, stat); else hres = compile_statement(parser->compiler, NULL, stat); diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index c792a66..1cd96a7 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -2589,7 +2589,7 @@ static HRESULT unwind_exception(exec_ctx_t *ctx) return hres; } -HRESULT compiled_statement_eval(script_ctx_t *ctx, statement_t *stat, return_type_t *rt, VARIANT *ret) +static HRESULT enter_bytecode(script_ctx_t *ctx, unsigned ip, return_type_t *rt, VARIANT *ret) { exec_ctx_t *exec_ctx = ctx->exec_ctx; except_frame_t *prev_except_frame; @@ -2602,19 +2602,13 @@ HRESULT compiled_statement_eval(script_ctx_t *ctx, statement_t *stat, return_typ TRACE("\n"); - if(stat->instr_off == -1) { - hres = compile_subscript_stat(exec_ctx->parser, stat, FALSE, &stat->instr_off); - if(FAILED(hres)) - return hres; - } - prev_rt = exec_ctx->rt; prev_top = exec_ctx->top; prev_scope = exec_ctx->scope_chain; prev_except_frame = exec_ctx->except_frame; prev_ip = exec_ctx->ip; prev_ei = exec_ctx->ei; - exec_ctx->ip = stat->instr_off; + exec_ctx->ip = ip; exec_ctx->rt = rt; exec_ctx->ei = &rt->ei; exec_ctx->except_frame = NULL; @@ -2762,9 +2756,9 @@ HRESULT exec_source(exec_ctx_t *ctx, parser_ctx_t *parser, source_elements_t *so if(source->statement) { if(source->statement->instr_off == -1) - hres = compile_subscript_stat(ctx->parser, source->statement, TRUE, &source->statement->instr_off); + hres = compile_subscript_stat(ctx->parser, source->statement, &source->statement->instr_off); if(SUCCEEDED(hres)) - hres = compiled_statement_eval(script, source->statement, &rt, &val); + hres = enter_bytecode(script, source->statement->instr_off, &rt, &val); } script->exec_ctx = prev_ctx; diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index b42a2ba..c984ade 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -591,4 +591,4 @@ typedef struct { } property_value_expression_t; HRESULT compile_subscript(parser_ctx_t*,expression_t*,unsigned*) DECLSPEC_HIDDEN; -HRESULT compile_subscript_stat(parser_ctx_t*,statement_t*,BOOL,unsigned*) DECLSPEC_HIDDEN; +HRESULT compile_subscript_stat(parser_ctx_t*,statement_t*,unsigned*) DECLSPEC_HIDDEN;
1
0
0
0
Jacek Caban : jscript: Get rid of stat_eval_table.
by Alexandre Julliard
29 Dec '11
29 Dec '11
Module: wine Branch: master Commit: 6710e7ec6fbc4c68dbffabb02b7f78339d391b0b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6710e7ec6fbc4c68dbffabb02…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Dec 29 11:08:34 2011 +0100 jscript: Get rid of stat_eval_table. --- dlls/jscript/compile.c | 10 ++++++++++ dlls/jscript/engine.h | 1 - dlls/jscript/parser.y | 21 +-------------------- 3 files changed, 11 insertions(+), 21 deletions(-) diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c index 127d967..5d63dbe 100644 --- a/dlls/jscript/compile.c +++ b/dlls/jscript/compile.c @@ -1289,6 +1289,13 @@ static HRESULT compile_break_statement(compiler_ctx_t *ctx, branch_statement_t * return push_instr_uint(ctx, OP_jmp, pop_ctx->break_label); } +/* ECMA-262 3rd Edition 12.9 */ +static HRESULT compile_return_statement(compiler_ctx_t *ctx, expression_statement_t *stat) +{ + stat->stat.eval = return_statement_eval; + return compile_interp_fallback(ctx, &stat->stat); +} + /* ECMA-262 3rd Edition 12.10 */ static HRESULT compile_with_statement(compiler_ctx_t *ctx, with_statement_t *stat) { @@ -1527,6 +1534,9 @@ static HRESULT compile_statement(compiler_ctx_t *ctx, statement_ctx_t *stat_ctx, case STAT_LABEL: hres = push_instr(ctx, OP_label) == -1 ? E_OUTOFMEMORY : S_OK; /* FIXME */ break; + case STAT_RETURN: + hres = compile_return_statement(ctx, (expression_statement_t*)stat); + break; case STAT_SWITCH: hres = compile_switch_statement(ctx, (switch_statement_t*)stat); break; diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index 4ac5e6a..b42a2ba 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -412,7 +412,6 @@ typedef struct { statement_t *finally_statement; } try_statement_t; -HRESULT compiled_statement_eval(script_ctx_t*,statement_t*,return_type_t*,VARIANT*) DECLSPEC_HIDDEN; HRESULT continue_statement_eval(script_ctx_t*,statement_t*,return_type_t*,VARIANT*) DECLSPEC_HIDDEN; HRESULT break_statement_eval(script_ctx_t*,statement_t*,return_type_t*,VARIANT*) DECLSPEC_HIDDEN; HRESULT return_statement_eval(script_ctx_t*,statement_t*,return_type_t*,VARIANT*) DECLSPEC_HIDDEN; diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y index 5cf0412..a3fe42a 100644 --- a/dlls/jscript/parser.y +++ b/dlls/jscript/parser.y @@ -835,25 +835,6 @@ static BOOL allow_auto_semicolon(parser_ctx_t *ctx) return ctx->nl || ctx->ptr == ctx->end || *(ctx->ptr-1) == '}'; } -static const statement_eval_t stat_eval_table[] = { - compiled_statement_eval, - compiled_statement_eval, - compiled_statement_eval, - compiled_statement_eval, - compiled_statement_eval, - compiled_statement_eval, - compiled_statement_eval, - compiled_statement_eval, - compiled_statement_eval, - return_statement_eval, - compiled_statement_eval, - compiled_statement_eval, - compiled_statement_eval, - compiled_statement_eval, - compiled_statement_eval, - compiled_statement_eval -}; - static void *new_statement(parser_ctx_t *ctx, statement_type_t type, size_t size) { statement_t *stat; @@ -863,7 +844,7 @@ static void *new_statement(parser_ctx_t *ctx, statement_type_t type, size_t size return NULL; stat->type = type; - stat->eval = stat_eval_table[type]; + stat->eval = NULL; stat->instr_off = -1; stat->next = NULL;
1
0
0
0
Jacek Caban : jscript: Moved exec_source to the bottom of the file.
by Alexandre Julliard
29 Dec '11
29 Dec '11
Module: wine Branch: master Commit: f08fcff4fde3c1949d2563c17575aeab3b48cbcd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f08fcff4fde3c1949d2563c17…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Dec 29 11:08:07 2011 +0100 jscript: Moved exec_source to the bottom of the file. --- dlls/jscript/engine.c | 162 ++++++++++++++++++++++++------------------------ 1 files changed, 81 insertions(+), 81 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 781814a..c792a66 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -499,87 +499,6 @@ static BOOL lookup_global_members(script_ctx_t *ctx, BSTR identifier, exprval_t return FALSE; } -HRESULT exec_source(exec_ctx_t *ctx, parser_ctx_t *parser, source_elements_t *source, BOOL from_eval, - jsexcept_t *ei, VARIANT *retv) -{ - script_ctx_t *script = parser->script; - function_declaration_t *func; - parser_ctx_t *prev_parser; - var_list_t *var; - VARIANT val; - exec_ctx_t *prev_ctx; - return_type_t rt; - HRESULT hres = S_OK; - - for(func = source->functions; func; func = func->next) { - jsdisp_t *func_obj; - VARIANT var; - - hres = create_source_function(parser, func->expr->parameter_list, func->expr->source_elements, - ctx->scope_chain, func->expr->src_str, func->expr->src_len, &func_obj); - if(FAILED(hres)) - return hres; - - var_set_jsdisp(&var, func_obj); - hres = jsdisp_propput_name(ctx->var_disp, func->expr->identifier, &var, ei, NULL); - jsdisp_release(func_obj); - if(FAILED(hres)) - return hres; - } - - for(var = source->variables; var; var = var->next) { - DISPID id = 0; - BSTR name; - - name = SysAllocString(var->identifier); - if(!name) - return E_OUTOFMEMORY; - - if(!ctx->is_global || !lookup_global_members(parser->script, name, NULL)) - hres = jsdisp_get_id(ctx->var_disp, var->identifier, fdexNameEnsure, &id); - SysFreeString(name); - if(FAILED(hres)) - return hres; - } - - prev_ctx = script->exec_ctx; - script->exec_ctx = ctx; - - prev_parser = ctx->parser; - ctx->parser = parser; - - V_VT(&val) = VT_EMPTY; - memset(&rt, 0, sizeof(rt)); - rt.type = RT_NORMAL; - - if(source->statement) { - if(source->statement->instr_off == -1) - hres = compile_subscript_stat(ctx->parser, source->statement, TRUE, &source->statement->instr_off); - if(SUCCEEDED(hres)) - hres = compiled_statement_eval(script, source->statement, &rt, &val); - } - - script->exec_ctx = prev_ctx; - ctx->parser = prev_parser; - - if(rt.type != RT_NORMAL && rt.type != RT_RETURN) { - FIXME("wrong rt %d\n", rt.type); - hres = E_FAIL; - } - - *ei = rt.ei; - if(FAILED(hres)) { - VariantClear(&val); - return hres; - } - - if(!retv || (!from_eval && rt.type != RT_RETURN)) - VariantClear(&val); - if(retv) - *retv = val; - return S_OK; -} - /* ECMA-262 3rd Edition 10.1.4 */ static HRESULT identifier_eval(script_ctx_t *ctx, BSTR identifier, DWORD flags, jsexcept_t *ei, exprval_t *ret) { @@ -2787,3 +2706,84 @@ static HRESULT expr_eval(script_ctx_t *ctx, expression_t *expr, jsexcept_t *ei, *ret = *stack_pop(exec_ctx); return S_OK; } + +HRESULT exec_source(exec_ctx_t *ctx, parser_ctx_t *parser, source_elements_t *source, BOOL from_eval, + jsexcept_t *ei, VARIANT *retv) +{ + script_ctx_t *script = parser->script; + function_declaration_t *func; + parser_ctx_t *prev_parser; + var_list_t *var; + VARIANT val; + exec_ctx_t *prev_ctx; + return_type_t rt; + HRESULT hres = S_OK; + + for(func = source->functions; func; func = func->next) { + jsdisp_t *func_obj; + VARIANT var; + + hres = create_source_function(parser, func->expr->parameter_list, func->expr->source_elements, + ctx->scope_chain, func->expr->src_str, func->expr->src_len, &func_obj); + if(FAILED(hres)) + return hres; + + var_set_jsdisp(&var, func_obj); + hres = jsdisp_propput_name(ctx->var_disp, func->expr->identifier, &var, ei, NULL); + jsdisp_release(func_obj); + if(FAILED(hres)) + return hres; + } + + for(var = source->variables; var; var = var->next) { + DISPID id = 0; + BSTR name; + + name = SysAllocString(var->identifier); + if(!name) + return E_OUTOFMEMORY; + + if(!ctx->is_global || !lookup_global_members(parser->script, name, NULL)) + hres = jsdisp_get_id(ctx->var_disp, var->identifier, fdexNameEnsure, &id); + SysFreeString(name); + if(FAILED(hres)) + return hres; + } + + prev_ctx = script->exec_ctx; + script->exec_ctx = ctx; + + prev_parser = ctx->parser; + ctx->parser = parser; + + V_VT(&val) = VT_EMPTY; + memset(&rt, 0, sizeof(rt)); + rt.type = RT_NORMAL; + + if(source->statement) { + if(source->statement->instr_off == -1) + hres = compile_subscript_stat(ctx->parser, source->statement, TRUE, &source->statement->instr_off); + if(SUCCEEDED(hres)) + hres = compiled_statement_eval(script, source->statement, &rt, &val); + } + + script->exec_ctx = prev_ctx; + ctx->parser = prev_parser; + + if(rt.type != RT_NORMAL && rt.type != RT_RETURN) { + FIXME("wrong rt %d\n", rt.type); + hres = E_FAIL; + } + + *ei = rt.ei; + if(FAILED(hres)) { + VariantClear(&val); + return hres; + } + + if(!retv || (!from_eval && rt.type != RT_RETURN)) + VariantClear(&val); + if(retv) + *retv = val; + return S_OK; +}
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
81
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
74
75
76
77
78
79
80
81
Results per page:
10
25
50
100
200