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
Alexandre Julliard : gdi32: Use the DIB engine and PutImage for the null driver triangular gradient implementation .
by Alexandre Julliard
05 Dec '11
05 Dec '11
Module: wine Branch: master Commit: 360d4bc548f5a73989a404d832ad4b6d39197e0d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=360d4bc548f5a73989a404d83…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 5 16:27:28 2011 +0100 gdi32: Use the DIB engine and PutImage for the null driver triangular gradient implementation. --- dlls/gdi32/bitblt.c | 211 +++++++++++++++----------------------------- dlls/gdi32/dibdrv/bitblt.c | 60 ++++++++++++- dlls/gdi32/gdi_private.h | 3 +- 3 files changed, 131 insertions(+), 143 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=360d4bc548f5a73989a40…
1
0
0
0
Alexandre Julliard : gdi32: Add more parameter checks in GdiGradientFill.
by Alexandre Julliard
05 Dec '11
05 Dec '11
Module: wine Branch: master Commit: 8e8cdc78e6af71398414df8416bb7013b00ece34 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8e8cdc78e6af71398414df841…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 1 18:08:09 2011 +0100 gdi32: Add more parameter checks in GdiGradientFill. --- dlls/gdi32/painting.c | 7 +++++-- dlls/gdi32/tests/bitmap.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/dlls/gdi32/painting.c b/dlls/gdi32/painting.c index 75c32c8..d721bd1 100644 --- a/dlls/gdi32/painting.c +++ b/dlls/gdi32/painting.c @@ -1219,11 +1219,12 @@ POINT *GDI_Bezier( const POINT *Points, INT count, INT *nPtsOut ) * GdiGradientFill (GDI32.@) */ BOOL WINAPI GdiGradientFill( HDC hdc, TRIVERTEX *vert_array, ULONG nvert, - void * grad_array, ULONG ngrad, ULONG mode ) + void *grad_array, ULONG ngrad, ULONG mode ) { DC *dc; PHYSDEV physdev; BOOL ret; + ULONG i; TRACE("%p vert_array:%p nvert:%d grad_array:%p ngrad:%d\n", hdc, vert_array, nvert, grad_array, ngrad); @@ -1232,12 +1233,14 @@ BOOL WINAPI GdiGradientFill( HDC hdc, TRIVERTEX *vert_array, ULONG nvert, SetLastError( ERROR_INVALID_PARAMETER ); return FALSE; } + for (i = 0; i < ngrad * (mode == GRADIENT_FILL_TRIANGLE ? 3 : 2); i++) + if (((ULONG *)grad_array)[i] >= nvert) return FALSE; + if (!(dc = get_dc_ptr( hdc ))) { SetLastError( ERROR_INVALID_PARAMETER ); return FALSE; } - update_dc( dc ); physdev = GET_DC_PHYSDEV( dc, pGradientFill ); ret = physdev->funcs->pGradientFill( physdev, vert_array, nvert, grad_array, ngrad, mode ); diff --git a/dlls/gdi32/tests/bitmap.c b/dlls/gdi32/tests/bitmap.c index 8b62be6..26c840b 100644 --- a/dlls/gdi32/tests/bitmap.c +++ b/dlls/gdi32/tests/bitmap.c @@ -3417,6 +3417,17 @@ static void test_GdiGradientFill(void) ok( !ret, "GdiGradientFill succeeded\n" ); ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); SetLastError( 0xdeadbeef ); + ret = pGdiGradientFill( hdc, vt, 3, rect, 3, GRADIENT_FILL_RECT_H ); + ok( !ret, "GdiGradientFill succeeded\n" ); + ok( GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError() ); + rect[2].UpperLeft = rect[2].LowerRight = 1; + SetLastError( 0xdeadbeef ); + ret = pGdiGradientFill( hdc, vt, 3, rect, 3, GRADIENT_FILL_RECT_H ); + ok( ret, "GdiGradientFill failed err %u\n", GetLastError() ); + SetLastError( 0xdeadbeef ); + ret = pGdiGradientFill( hdc, vt, 1, rect, 1, GRADIENT_FILL_RECT_H ); + ok( ret, "GdiGradientFill failed err %u\n", GetLastError() ); + SetLastError( 0xdeadbeef ); ret = pGdiGradientFill( hdc, vt, 1, tri, 0, GRADIENT_FILL_TRIANGLE ); ok( !ret, "GdiGradientFill succeeded\n" ); ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); @@ -3429,6 +3440,24 @@ static void test_GdiGradientFill(void) SetLastError( 0xdeadbeef ); ret = pGdiGradientFill( hdc, vt, 3, tri, 3, GRADIENT_FILL_TRIANGLE ); ok( ret, "GdiGradientFill failed err %u\n", GetLastError() ); + SetLastError( 0xdeadbeef ); + ret = pGdiGradientFill( hdc, vt, 3, tri, 4, GRADIENT_FILL_TRIANGLE ); + ok( !ret, "GdiGradientFill succeeded\n" ); + ok( GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError() ); + tri[3].Vertex3 = 1; + SetLastError( 0xdeadbeef ); + ret = pGdiGradientFill( hdc, vt, 3, tri, 4, GRADIENT_FILL_TRIANGLE ); + ok( !ret, "GdiGradientFill succeeded\n" ); + ok( GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError() ); + tri[3].Vertex3 = 0; + SetLastError( 0xdeadbeef ); + ret = pGdiGradientFill( hdc, vt, 3, tri, 4, GRADIENT_FILL_TRIANGLE ); + ok( !ret, "GdiGradientFill succeeded\n" ); + ok( GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError() ); + tri[3].Vertex1 = tri[3].Vertex2 = tri[3].Vertex3 = 1; + SetLastError( 0xdeadbeef ); + ret = pGdiGradientFill( hdc, vt, 3, tri, 4, GRADIENT_FILL_TRIANGLE ); + ok( ret, "GdiGradientFill failed err %u\n", GetLastError() ); DeleteDC( hdc ); DeleteObject( bmp );
1
0
0
0
Alexandre Julliard : gdi32: Use dithering also for 1-bpp gradients.
by Alexandre Julliard
05 Dec '11
05 Dec '11
Module: wine Branch: master Commit: 7ea59c107fec6ca020dffb500eaf5049109771d6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7ea59c107fec6ca020dffb500…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 5 13:46:23 2011 +0100 gdi32: Use dithering also for 1-bpp gradients. --- dlls/gdi32/dibdrv/primitives.c | 30 +++++++++++++++--------------- dlls/winex11.drv/graphics.c | 4 ++-- dlls/winex11.drv/xrender.c | 4 ++-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/dlls/gdi32/dibdrv/primitives.c b/dlls/gdi32/dibdrv/primitives.c index 47ba0e1..d0d838b 100644 --- a/dlls/gdi32/dibdrv/primitives.c +++ b/dlls/gdi32/dibdrv/primitives.c @@ -4491,27 +4491,28 @@ static BOOL gradient_rect_1( const dib_info *dib, const RECT *rc, const TRIVERTE switch (mode) { case GRADIENT_FILL_RECT_H: - for (x = rc->left; x < rc->right; x++) + for (y = rc->top; y < min( rc->top + 16, rc->bottom ); y++, ptr += dib->stride) { - DWORD val = gradient_rgb_24( v, x - v[0].x, v[1].x - v[0].x ); - val = rgb_to_pixel_colortable( dib, val >> 16, val >> 8, val ) ? 0xff : 0; - ptr[x / 8] = (ptr[x / 8] & ~pixel_masks_1[x % 8]) | (val & pixel_masks_1[x % 8]); + for (x = rc->left; x < rc->right; x++) + { + BYTE val = gradient_rgb_8( dib, v, x - v[0].x, v[1].x - v[0].x, x, y ) ? 0xff : 0; + ptr[x / 8] = (ptr[x / 8] & ~pixel_masks_1[x % 8]) | (val & pixel_masks_1[x % 8]); + } } - - for (y = rc->top + 1; y < rc->bottom; y++, ptr += dib->stride) + for ( ; y < rc->bottom; y++, ptr += dib->stride) for (x = rc->left; x < rc->right; x++) - ptr[dib->stride + x / 8] = (ptr[dib->stride + x / 8] & ~pixel_masks_1[x % 8]) | - (ptr[x / 8] & pixel_masks_1[x % 8]); + ptr[x / 8] = (ptr[x / 8] & ~pixel_masks_1[x % 8]) | + (ptr[x / 8 - 16 * dib->stride] & pixel_masks_1[x % 8]); break; case GRADIENT_FILL_RECT_V: - for (y = rc->top; y < rc->bottom; y++) + for (y = rc->top; y < rc->bottom; y++, ptr += dib->stride) { - DWORD val = gradient_rgb_24( v, y - v[0].y, v[1].y - v[0].y ); - val = rgb_to_pixel_colortable( dib, val >> 16, val >> 8, val ) ? 0xff : 0; + BYTE values[16]; + for (x = 0; x < 16; x++) + values[x] = gradient_rgb_8( dib, v, y - v[0].y, v[1].y - v[0].y, x, y ) ? 0xff : 0; for (x = rc->left; x < rc->right; x++) - ptr[x / 8] = (ptr[x / 8] & ~pixel_masks_1[x % 8]) | (val & pixel_masks_1[x % 8]); - ptr += dib->stride; + ptr[x / 8] = (ptr[x / 8] & ~pixel_masks_1[x % 8]) | (values[x % 16] & pixel_masks_1[x % 8]); } break; @@ -4522,8 +4523,7 @@ static BOOL gradient_rect_1( const dib_info *dib, const RECT *rc, const TRIVERTE triangle_coords( v, rc, y, &left, &right ); for (x = left; x < right; x++) { - DWORD val = gradient_triangle_24( v, x, y, det ); - val = rgb_to_pixel_colortable( dib, val >> 16, val >> 8, val ) ? 0xff : 0; + BYTE val = gradient_triangle_8( dib, v, x, y, det ) ? 0xff : 0; ptr[x / 8] = (ptr[x / 8] & ~pixel_masks_1[x % 8]) | (val & pixel_masks_1[x % 8]); } } diff --git a/dlls/winex11.drv/graphics.c b/dlls/winex11.drv/graphics.c index 88e9b0c..f2cf037 100644 --- a/dlls/winex11.drv/graphics.c +++ b/dlls/winex11.drv/graphics.c @@ -1506,8 +1506,8 @@ BOOL X11DRV_GradientFill( PHYSDEV dev, TRIVERTEX *vert_array, ULONG nvert, unsigned int i; XGCValues val; - /* 4, 8, and 16-bpp use dithering */ - if (physdev->depth >= 4 && physdev->depth <= 16) goto fallback; + /* <= 16-bpp use dithering */ + if (physdev->depth <= 16) goto fallback; switch (mode) { diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index bccbe4d..3853cd8 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -2543,8 +2543,8 @@ static BOOL xrenderdrv_GradientFill( PHYSDEV dev, TRIVERTEX *vert_array, ULONG n if (!X11DRV_XRender_Installed) goto fallback; if (!pXRenderCreateLinearGradient) goto fallback; - /* 16-bpp uses dithering */ - if (!physdev->pict_format || physdev->pict_format->depth == 16) goto fallback; + /* <= 16-bpp uses dithering */ + if (!physdev->pict_format || physdev->pict_format->depth <= 16) goto fallback; switch (mode) {
1
0
0
0
Alexandre Julliard : gdi32/tests: Add more gradient tests.
by Alexandre Julliard
05 Dec '11
05 Dec '11
Module: wine Branch: master Commit: 59f347b75c58ea22985f0b12f0ee619b65cb93d7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=59f347b75c58ea22985f0b12f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 5 13:33:05 2011 +0100 gdi32/tests: Add more gradient tests. --- dlls/gdi32/tests/dib.c | 132 +++++++++++++++++++++++++++++++---------------- 1 files changed, 87 insertions(+), 45 deletions(-) diff --git a/dlls/gdi32/tests/dib.c b/dlls/gdi32/tests/dib.c index e271ccf..79a62db 100644 --- a/dlls/gdi32/tests/dib.c +++ b/dlls/gdi32/tests/dib.c @@ -133,7 +133,8 @@ static const char *sha1_graphics_a8r8g8b8[] = "568f87f0194ca19b69a5b2bcdef795d89c5721ce", "257d114354a93e681225072bcde756f155b70496", "0cdf6fee6721d60d5d5ed26b1989eacddc16b14e", - "50f0d4252e700b0a29358ca6363e1c560d9c5f9b", + "e462052a03dbe4ec3814db7700e166d00d4d686f", + "a27917d4db49ce77989fae246015aeb2a28520ee", NULL }; @@ -193,7 +194,8 @@ static const char *sha1_graphics_a8r8g8b8_bitfields[] = "568f87f0194ca19b69a5b2bcdef795d89c5721ce", "257d114354a93e681225072bcde756f155b70496", "0cdf6fee6721d60d5d5ed26b1989eacddc16b14e", - "3692d0fe76bcd5622b567f524306d4df421aa450", + "0cda6b3297003b3ccd6d5baa17e1ca9bb7c56f08", + "b2c8e1ebb9435031fe068442f479d1304096e79f", NULL }; @@ -253,7 +255,8 @@ static const char *sha1_graphics_a8b8g8r8[] = "25675c30adfe24d6cae60793b156dfdaa36ac3ba", "2c4f116451b571106beba8b85da8e4b923937246", "9c8f3063504a81bbbfa8558e111c63d8bc36dbbf", - "d816ec7e95bd0d5ed336fa50efbadfcd63f20f9b", + "87f57a31253a38dbf3dc3070473328fa04b68a48", + "db64cc4d830fc35ed170b53943e722b2342954d4", NULL }; @@ -313,7 +316,8 @@ static const char *sha1_graphics_r10g10b10[] = "d3f08946300e1700865042aed121870e292d1095", "abb56db94becb64d663b51f0ea6b4bd535a88ba0", "3a81fe558c69ca0aea7e7191771ed86cf4321a5a", - "126c112d9c77826cbedddaee1ff96348c8f1e349", + "8ea5d7e4bebc40a1d91b04b12e1c11a42c188095", + "317521e576801acaea62c76fe16813cdfe20f4ad", NULL }; @@ -373,7 +377,8 @@ static const char *sha1_graphics_r6g6b6[] = "c3def160a1e847605ff0fc7edd30397fa90635a0", "50acb1597c4d53ad63225376d2aa36f64e8a229d", "796fd861474aa7861bd0384127df755458757ec3", - "d931b9b3e81b931826ea9dffdc7178ce87c422b5", + "aecb242c31f31a90f071b6455ea7d808d4ea22e3", + "77ea86e51a94b11a8081b29696cb4115687843e3", NULL }; @@ -433,7 +438,8 @@ static const char *sha1_graphics_24[] = "ee315634ed92da3a32c2675ecd1b369471c60936", "3491e2bd81e70dd203c8551cc2d39b19401caafe", "826de85271b67a11e7bd1a6596b58a045a96b69e", - "927d799714511eba2dd5876201a926d06a5677ce", + "354b92008a8409c62d0fa1dff1532c5943aa37a2", + "8dc9cb7deae5c24d1eae004d53893fa6caf4723c", NULL }; @@ -497,7 +503,8 @@ static const char *sha1_graphics_r5g5b5[] = "2daca4d26a086ed34894693be0b0374402232809", "bf0e0b74ce5686b73c527843e0d0df0cd10efefe", "517e32a8c0312b5676d498583ea092b0f198f2bc", - "be813b2206a9156c38b175e5ff009c44340ebfa9", + "295ec16530126046790fb734e99f86f5b3b74ed8", + "d98b0561010606b55a1b9b85fbc93640f681d256", NULL }; @@ -556,7 +563,8 @@ static const char *sha1_graphics_r4g4b4[] = "f7900e60347029876ba55e8f0c4c02e89deb36b6", "734d4a7836891d729f4a9ec6916ead78eecb2596", "d8ba2e556fd64c9c2f1746496e6e7dd7a487cd6d", - "5472bfe300268fb299987a04ff00db34b2007796", + "7587a9c87cab1eca827807f351bb67ca184d1ac5", + "b53ef0b5c674822e784903a9dbdd3b386d9f2350", NULL }; @@ -621,7 +629,8 @@ static const char *sha1_graphics_8_color[] = "2f7ba8803604c032cb1a1228bc021f0f1c03e245", "0204f06422a01787f7379d0edb51104bb023758a", "1f9a21eba2f2ce87768a5618d9cfefa7e48fb386", - "b61f2e6e2de63cb64b4ddcefd9f720dbf6ba8e93", + "e58d9c0acf0219d0839e1dbd162e08a765ed7f0f", + "34ca0f9660e1889f9f2c0deb80535d3c4f349fa4", NULL }; @@ -691,7 +700,8 @@ static const char *sha1_graphics_8_grayscale[] = "cb9ea8137eca1450e049879772f5c11a0e11ff0a", "a05e05b2e6e515baa59ea032d063ca11e70a72b5", "d908c86b7301666a8d7999b831841115a4938181", - "1f64da8432774f221fc3eb4bb66753bd92ede2da", + "0ca8775d9a61ccc251d1e6f2e3cfd26a24ae24a2", + "17ae603c199a5d6695d198a7f36e6d7263990951", NULL }; @@ -754,7 +764,8 @@ static const char *sha1_graphics_8[] = "600d6b2713d5e4c0d90c02660245ed26c7ae3033", "963d1fa8608c8b743e972eb9a4e9f3fc53c6c7e8", "ba49de83c4668fb08956221f465b93e7dd6a3383", - "d5fd38085d21bc27c388fb6702600ddcd935815a", + "bd28d77cd85b20a2384d6b25082cfd884bba683e", + "7e591ec8ae9bb61c3a443c93f071cab2b8978394", NULL }; @@ -813,7 +824,8 @@ static const char *sha1_graphics_4[] = "ec8e2aebfb4a1c28ebcd0e053b9e4d8638b50951", "da401c745421f6bdfaefd590ab99dee948dce412", "38a3b6edcba2a1fba6064f0b4d771aedae7f4673", - "0b504b6eb09907543174210272ee7763d67de2a9", + "28a6b9f7927e99e53cf46f0333d29168cb10e920", + "029552113292cc110fd6b7888e766628950aaeef", NULL }; @@ -872,7 +884,8 @@ static const char *sha1_graphics_4_grayscale[] = "d374d4d92c940ae42a9b42c14d744341b68a8c14", "25ec9fd2eeb1514ba4e0458a444149a5456cf63a", "2e4dc1e859350289575ffc2a47cd0033efca6c32", - "a0e8e78f3c082e2b674b5f5a592fb4be8324e843", + "ada3b7c34946e584dcdf4203e07cfa3dad02bc63", + "c2f61571b067a44b30f56b4658c9606f0edfc0f3", NULL }; @@ -946,7 +959,8 @@ static const char *sha1_graphics_1[] = "013cee26bac8f815eadad4bfc012d9b5d01c3b7f", "6b2cb2346b5820bdd0251cd6a4aeb5c22ee82e85", "6c4640b17e072efc682044c499e5a4f3481b7c87", - "7b739d8f9437c4893dddf3d2ff457db0803c924e", + "781d8c5cbc28591fd48fce06f984c502fdc6b363", + "df510792a7790cc699532b1420d43c6d4da2ae2f", NULL }; @@ -2090,37 +2104,65 @@ static void draw_graphics(HDC hdc, BITMAPINFO *bmi, BYTE *bits, const char ***sh if (pGdiGradientFill) { - TRIVERTEX vt[4]; - GRADIENT_RECT rect[1] = { { 0 , 1 } }; - vt[0].x = 1; - vt[0].y = 1; - vt[0].Red = 0; - vt[0].Green = 0x8000; - vt[0].Blue = 0; - vt[0].Alpha = 0x8000; - vt[1].x = 200; - vt[1].y = 200; - vt[1].Red = 0; - vt[1].Green = 0xff00; - vt[1].Blue = 0; - vt[1].Alpha = 0xff00; - pGdiGradientFill( hdc, vt, 2, rect, 1, GRADIENT_FILL_RECT_H ); - - vt[0].x = 180; - vt[0].y = 180; - vt[0].Red = 0; - vt[0].Green = 0; - vt[0].Blue = 0xff00; - vt[0].Alpha = 0xff00; - vt[1].x = 300; - vt[1].y = 300; - vt[1].Red = 0xff00; - vt[1].Green = 0xff00; - vt[1].Blue = 0xff00; - vt[1].Alpha = 0x00; - pGdiGradientFill( hdc, vt, 2, rect, 1, GRADIENT_FILL_RECT_V ); - if (bmi->bmiHeader.biBitCount == 8 || bmi->bmiHeader.biBitCount == 4) - /* Wine's 8-bit dithering isn't identical to Windows */ + TRIVERTEX vrect[] = + { + { 1, 1, 0xff00, 0x8000, 0x0000, 0x8000 }, + { 200, 200, 0x0000, 0x0000, 0xff00, 0xff00 }, + { 180, 180, 0x1234, 0x5678, 0x9abc, 0xdef0 }, + { 300, 300, 0xff00, 0xff00, 0xff00, 0x0000 } + }; + GRADIENT_RECT rect[] = { { 0, 1 }, { 2, 3 }, { 2, 1 } }; + + TRIVERTEX vtri[] = + { + { 250, 0, 0xff00, 0x0000, 0xff00, 0xff00 }, + { 500, 500, 0x0000, 0xff00, 0x0000, 0xff00 }, + { 0, 500, 0x0000, 0x0000, 0xff00, 0xff00 }, + + { 10, 0, 0x8000, 0x0000, 0x8000, 0x8000 }, + { 0, 20, 0xff00, 0xff00, 0xff00, 0x0000 }, + { 5, 30, 0x4000, 0xc000, 0x7000, 0x9000 }, + + { 30, 0, 0x9000, 0x8800, 0xcc00, 0xff00 }, + { 5, 12, 0x9900, 0xaa00, 0xbb00, 0xcc00 }, + { 0, 30, 0x5000, 0xd000, 0x9000, 0xbb00 }, + + { 35, 3, 0xaa00, 0x6500, 0x4300, 0x2100 }, + { 50, 6, 0x9800, 0x9800, 0x9800, 0x2000 }, + { 60, 10, 0x0100, 0x0200, 0x0300, 0x3000 }, + + { 60, 2, 0x0700, 0x0800, 0x0900, 0xff00 }, + { 73, 10, 0x9900, 0x8800, 0x7700, 0xff00 }, + { 66, 23, 0x1100, 0x2200, 0x3300, 0xff00 }, + + { 80, 1, 0xa000, 0x6000, 0x4000, 0x2000 }, + { 76, 9, 0x7000, 0x5000, 0x3000, 0x1000 }, + { 85, 23, 0x3300, 0x3300, 0x3300, 0x3300 }, + + { 90, 4, 0x4400, 0x5500, 0x6600, 0x9900 }, + { 95, 12, 0x4500, 0x5600, 0x6700, 0x9900 }, + { 85, 14, 0x4600, 0x5700, 0x6800, 0x9900 }, + }; + GRADIENT_TRIANGLE tri[] = + { + { 0, 1, 2 }, { 3, 4, 5 }, { 6, 7, 8 }, { 9, 10, 11 }, { 12, 13, 14 }, { 15, 16, 17 }, { 18, 19, 20 }, + { 2, 1, 0 }, { 3, 5, 4 }, { 7, 6, 8 }, { 10, 11, 9 }, { 14, 13, 12 }, { 17, 15, 16 }, { 19, 20, 18 } + }; + + pGdiGradientFill( hdc, vrect, 4, rect, 2, GRADIENT_FILL_RECT_H ); + for (i = 0; i < 4; i++) vrect[i].y += 250; + pGdiGradientFill( hdc, vrect, 4, rect, 2, GRADIENT_FILL_RECT_V ); + + if (bmi->bmiHeader.biBitCount <= 8) /* Wine's 8-bit dithering isn't identical to Windows */ + compare_hash_broken_todo( bmi, bits, sha1, "GdiGradientFill", 0, 1 ); + else + compare_hash(bmi, bits, sha1, "GdiGradientFill" ); + memset(bits, 0xcc, dib_size); + + pGdiGradientFill( hdc, vtri, 7*3, tri, 7, GRADIENT_FILL_TRIANGLE ); + for (i = 0; i < 7*3; i++) vtri[i].y += 100; + pGdiGradientFill( hdc, vtri, 7*3, tri + 7, 7, GRADIENT_FILL_TRIANGLE ); + if (bmi->bmiHeader.biBitCount <= 8) /* Wine's 8-bit dithering isn't identical to Windows */ compare_hash_broken_todo( bmi, bits, sha1, "GdiGradientFill", 0, 1 ); else compare_hash(bmi, bits, sha1, "GdiGradientFill" );
1
0
0
0
Alexandre Julliard : gdi32: Implement triangular gradients in the DIB engine.
by Alexandre Julliard
05 Dec '11
05 Dec '11
Module: wine Branch: master Commit: 743b37df3d09bedc4521cf01549a190000b89368 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=743b37df3d09bedc4521cf015…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sun Dec 4 17:10:30 2011 +0100 gdi32: Implement triangular gradients in the DIB engine. --- dlls/gdi32/dibdrv/bitblt.c | 189 +++++++++++++++++----- dlls/gdi32/dibdrv/dibdrv.h | 11 ++- dlls/gdi32/dibdrv/primitives.c | 343 +++++++++++++++++++++++++++++++-------- 3 files changed, 427 insertions(+), 116 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=743b37df3d09bedc4521c…
1
0
0
0
Akihiro Sagawa : po: Update Japanese translation.
by Alexandre Julliard
05 Dec '11
05 Dec '11
Module: wine Branch: master Commit: e97c454637d6c04f23bf5e5d19f1b0cf531ae51b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e97c454637d6c04f23bf5e5d1…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Fri Dec 2 21:36:56 2011 +0900 po: Update Japanese translation. --- po/ja.po | 256 +++++++++++++++++++++++++++----------------------------------- 1 files changed, 111 insertions(+), 145 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=e97c454637d6c04f23bf5…
1
0
0
0
Luca Bennati : po: Update Italian translation.
by Alexandre Julliard
05 Dec '11
05 Dec '11
Module: wine Branch: master Commit: ff2d66f5e6c1a9240d8a4946c94f3f2411efd139 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ff2d66f5e6c1a9240d8a4946c…
Author: Luca Bennati <lucak3(a)gmail.com> Date: Fri Dec 2 12:12:53 2011 +0100 po: Update Italian translation. --- po/it.po | 34 ++++++++++++++++------------------ 1 files changed, 16 insertions(+), 18 deletions(-) diff --git a/po/it.po b/po/it.po index 0878766..15a9230 100644 --- a/po/it.po +++ b/po/it.po @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: Wine\n" "Report-Msgid-Bugs-To:
http://bugs.winehq.org\n
" "POT-Creation-Date: N/A\n" -"PO-Revision-Date: 2011-11-29 22:07+0100\n" +"PO-Revision-Date: 2011-12-02 12:11+0100\n" "Last-Translator: Luca Bennati <lucak3(a)gmail.com>\n" "Language-Team: none\n" "Language: Italian\n" @@ -22,8 +22,8 @@ msgid "" "To install a new program from a floppy disk, CD-ROM drive, or your hard " "drive, click Install." msgstr "" -"Per installare un nuovo programma dal floppy disk, CD-ROM o dal tuo hard " -"disk, clicca Installa." +"Per installare un nuovo programma dal floppy disk, CD-ROM o dal tuo disco " +"rigido, clicca Installa." #: appwiz.rc:59 msgid "&Install..." @@ -113,7 +113,6 @@ msgid "Wine Gecko Installer" msgstr "Installer di Wine Gecko" #: appwiz.rc:100 -#, fuzzy msgid "" "Wine could not find a Gecko package which is needed for applications " "embedding HTML to work correctly. Wine can automatically download and " @@ -127,8 +126,9 @@ msgstr "" "incorporano HTML per funzionare correttamente. Wine lo può scaricare e " "installare automaticamente per te.\n" "\n" -"Nota: è raccomandato usare i pacchetti delle distribuzioni. Leggi http://" -"
wiki.winehq.org/Gecko
per i dettagli." +"Nota: è raccomandato usare i pacchetti delle distribuzioni. Leggi <a href=" +"\"
http://wiki.winehq.org/Gecko\
">
http://wiki.winehq.org/Gecko
</a> per i " +"dettagli." #: appwiz.rc:106 msgid "&Install" @@ -5851,11 +5851,11 @@ msgstr "&Attributi:" #: mshtml.rc:37 msgid "Hyperlink" -msgstr "Hyperlink" +msgstr "Iperlink" #: mshtml.rc:40 msgid "Hyperlink Information" -msgstr "Informazioni sull'hyperlink" +msgstr "Informazioni sull'iperlink" #: mshtml.rc:41 winecfg.rc:247 msgid "&Type:" @@ -6017,12 +6017,11 @@ msgstr "&Keyframe ogni" #: msvfw32.rc:50 msgid "&Data Rate" -msgstr "&Ritmo dati" +msgstr "&Rate di dati" #: msvfw32.rc:52 -#, fuzzy msgid "kB/sec" -msgstr "KBps" +msgstr "kB/sec" #: msvfw32.rc:25 msgid "Full Frames (Uncompressed)" @@ -6342,7 +6341,7 @@ msgstr "Visualizza come icona" #: oledlg.rc:68 setupapi.rc:58 msgid "Browse..." -msgstr "Scegli..." +msgstr "Sfoglia..." #: oledlg.rc:69 msgid "File:" @@ -6350,7 +6349,7 @@ msgstr "File:" #: oledlg.rc:75 msgid "Paste Special" -msgstr "Incolla Speciale" +msgstr "Incolla speciale" #: oledlg.rc:78 setupapi.rc:40 msgid "Source:" @@ -6505,13 +6504,12 @@ msgid "us" msgstr "µs" #: serialui.rc:25 -#, fuzzy msgid "Settings for %s" -msgstr "Proprietà di %s" +msgstr "Impostazioni di %s" #: serialui.rc:28 msgid "Baud Rate" -msgstr "Bit per secondo (baud)" +msgstr "Rate di bit (Baud)" #: serialui.rc:30 msgid "Parity" @@ -6539,7 +6537,7 @@ msgstr "Destinazione:" #: setupapi.rc:49 msgid "Files Needed" -msgstr "File Necessari" +msgstr "File necessari" #: setupapi.rc:52 msgid "" @@ -11006,7 +11004,7 @@ msgstr "Carico di lavore (K)" #: taskmgr.rc:380 msgid "Physical Memory (K)" -msgstr "Memoria Fisica (K)" +msgstr "Memoria fisica (K)" #: taskmgr.rc:381 msgid "Kernel Memory (K)"
1
0
0
0
Nikolay Sivov : msxml3: Added IDispatchEx support for IMXWriter.
by Alexandre Julliard
05 Dec '11
05 Dec '11
Module: wine Branch: master Commit: f9127ddc85f91b812368f695aed7326a80e1efba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f9127ddc85f91b812368f695a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Dec 5 11:07:26 2011 +0300 msxml3: Added IDispatchEx support for IMXWriter. --- dlls/msxml3/mxwriter.c | 83 +++++++++++++++++----------------------- dlls/msxml3/tests/saxreader.c | 22 +++++++++++ 2 files changed, 57 insertions(+), 48 deletions(-) diff --git a/dlls/msxml3/mxwriter.c b/dlls/msxml3/mxwriter.c index cc75d1d..b402259 100644 --- a/dlls/msxml3/mxwriter.c +++ b/dlls/msxml3/mxwriter.c @@ -59,6 +59,7 @@ typedef enum typedef struct _mxwriter { + DispatchEx dispex; IMXWriter IMXWriter_iface; ISAXContentHandler ISAXContentHandler_iface; @@ -209,6 +210,8 @@ static HRESULT WINAPI mxwriter_QueryInterface(IMXWriter *iface, REFIID riid, voi TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), obj); + *obj = NULL; + if ( IsEqualGUID( riid, &IID_IMXWriter ) || IsEqualGUID( riid, &IID_IDispatch ) || IsEqualGUID( riid, &IID_IUnknown ) ) @@ -219,6 +222,10 @@ static HRESULT WINAPI mxwriter_QueryInterface(IMXWriter *iface, REFIID riid, voi { *obj = &This->ISAXContentHandler_iface; } + else if (dispex_query_interface(&This->dispex, riid, obj)) + { + return *obj ? S_OK : E_NOINTERFACE; + } else { ERR("interface %s not implemented\n", debugstr_guid(riid)); @@ -257,6 +264,7 @@ static ULONG WINAPI mxwriter_Release(IMXWriter *iface) xmlOutputBufferClose(This->buffer); SysFreeString(This->element); + release_dispex(&This->dispex); heap_free(This); } @@ -266,12 +274,7 @@ static ULONG WINAPI mxwriter_Release(IMXWriter *iface) static HRESULT WINAPI mxwriter_GetTypeInfoCount(IMXWriter *iface, UINT* pctinfo) { mxwriter *This = impl_from_IMXWriter( iface ); - - TRACE("(%p)->(%p)\n", This, pctinfo); - - *pctinfo = 1; - - return S_OK; + return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo); } static HRESULT WINAPI mxwriter_GetTypeInfo( @@ -280,10 +283,8 @@ static HRESULT WINAPI mxwriter_GetTypeInfo( ITypeInfo** ppTInfo ) { mxwriter *This = impl_from_IMXWriter( iface ); - - TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo); - - return get_typeinfo(IMXWriter_tid, ppTInfo); + return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, + iTInfo, lcid, ppTInfo); } static HRESULT WINAPI mxwriter_GetIDsOfNames( @@ -292,23 +293,8 @@ static HRESULT WINAPI mxwriter_GetIDsOfNames( UINT cNames, LCID lcid, DISPID* rgDispId ) { mxwriter *This = impl_from_IMXWriter( iface ); - ITypeInfo *typeinfo; - HRESULT hr; - - TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, - lcid, rgDispId); - - if(!rgszNames || cNames == 0 || !rgDispId) - return E_INVALIDARG; - - hr = get_typeinfo(IMXWriter_tid, &typeinfo); - if(SUCCEEDED(hr)) - { - hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId); - ITypeInfo_Release(typeinfo); - } - - return hr; + return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, + riid, rgszNames, cNames, lcid, rgDispId); } static HRESULT WINAPI mxwriter_Invoke( @@ -318,21 +304,8 @@ static HRESULT WINAPI mxwriter_Invoke( EXCEPINFO* pExcepInfo, UINT* puArgErr ) { mxwriter *This = impl_from_IMXWriter( iface ); - ITypeInfo *typeinfo; - HRESULT hr; - - TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), - lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); - - hr = get_typeinfo(IMXWriter_tid, &typeinfo); - if(SUCCEEDED(hr)) - { - hr = ITypeInfo_Invoke(typeinfo, &This->IMXWriter_iface, dispIdMember, wFlags, - pDispParams, pVarResult, pExcepInfo, puArgErr); - ITypeInfo_Release(typeinfo); - } - - return hr; + return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, + dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } static HRESULT WINAPI mxwriter_put_output(IMXWriter *iface, VARIANT dest) @@ -575,7 +548,7 @@ static HRESULT WINAPI mxwriter_flush(IMXWriter *iface) return flush_output_buffer(This); } -static const struct IMXWriterVtbl mxwriter_vtbl = +static const struct IMXWriterVtbl MXWriterVtbl = { mxwriter_QueryInterface, mxwriter_AddRef, @@ -897,20 +870,32 @@ static const struct ISAXContentHandlerVtbl mxwriter_saxcontent_vtbl = mxwriter_saxcontent_skippedEntity }; -HRESULT MXWriter_create(MSXML_VERSION version, IUnknown *pUnkOuter, void **ppObj) +static const tid_t mxwriter_iface_tids[] = { + IMXWriter_tid, + 0 +}; + +static dispex_static_data_t mxwriter_dispex = { + NULL, + IMXWriter_tid, + NULL, + mxwriter_iface_tids +}; + +HRESULT MXWriter_create(MSXML_VERSION version, IUnknown *outer, void **ppObj) { static const WCHAR version10W[] = {'1','.','0',0}; mxwriter *This; - TRACE("(%p,%p)\n", pUnkOuter, ppObj); + TRACE("(%p, %p)\n", outer, ppObj); - if (pUnkOuter) FIXME("support aggregation, outer\n"); + if (outer) FIXME("support aggregation, outer\n"); This = heap_alloc( sizeof (*This) ); if(!This) return E_OUTOFMEMORY; - This->IMXWriter_iface.lpVtbl = &mxwriter_vtbl; + This->IMXWriter_iface.lpVtbl = &MXWriterVtbl; This->ISAXContentHandler_iface.lpVtbl = &mxwriter_saxcontent_vtbl; This->ref = 1; This->class_version = version; @@ -931,6 +916,8 @@ HRESULT MXWriter_create(MSXML_VERSION version, IUnknown *pUnkOuter, void **ppObj This->buffer = xmlAllocOutputBuffer(xmlGetCharEncodingHandler(This->encoding)); + init_dispex(&This->dispex, (IUnknown*)&This->IMXWriter_iface, &mxwriter_dispex); + *ppObj = &This->IMXWriter_iface; TRACE("returning iface %p\n", *ppObj); @@ -940,7 +927,7 @@ HRESULT MXWriter_create(MSXML_VERSION version, IUnknown *pUnkOuter, void **ppObj #else -HRESULT MXWriter_create(MSXML_VERSION version, IUnknown *pUnkOuter, void **obj) +HRESULT MXWriter_create(MSXML_VERSION version, IUnknown *outer, void **obj) { MESSAGE("This program tried to use a MXXMLWriter object, but\n" "libxml2 support was not present at compile time.\n"); diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c index fbb1bd2..e59c13b 100644 --- a/dlls/msxml3/tests/saxreader.c +++ b/dlls/msxml3/tests/saxreader.c @@ -2672,6 +2672,27 @@ static void test_dispex(void) ISAXXMLReader_Release(reader); } +static void test_mxwriter_dispex(void) +{ + IDispatchEx *dispex; + IMXWriter *writer; + IUnknown *unk; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_MXXMLWriter, NULL, CLSCTX_INPROC_SERVER, + &IID_IMXWriter, (void**)&writer); + EXPECT_HR(hr, S_OK); + + hr = IMXWriter_QueryInterface(writer, &IID_IDispatchEx, (void**)&dispex); + EXPECT_HR(hr, S_OK); + hr = IDispatchEx_QueryInterface(dispex, &IID_IUnknown, (void**)&unk); + test_obj_dispex(unk); + IUnknown_Release(unk); + IDispatchEx_Release(dispex); + + IMXWriter_Release(writer); +} + START_TEST(saxreader) { ISAXXMLReader *reader; @@ -2711,6 +2732,7 @@ START_TEST(saxreader) test_mxwriter_flush(); test_mxwriter_stream(); test_mxwriter_encoding(); + test_mxwriter_dispex(); } else win_skip("MXXMLWriter not supported\n");
1
0
0
0
Jacek Caban : jscript: Use bytecode for '-=' expression implementation.
by Alexandre Julliard
05 Dec '11
05 Dec '11
Module: wine Branch: master Commit: 7b022dbbb8e8323122ffbbfdcb2674421511b9fc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7b022dbbb8e8323122ffbbfdc…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Dec 5 11:13:14 2011 +0100 jscript: Use bytecode for '-=' expression implementation. --- dlls/jscript/compile.c | 2 ++ dlls/jscript/engine.c | 28 ---------------------------- dlls/jscript/engine.h | 1 - dlls/jscript/parser.y | 2 +- 4 files changed, 3 insertions(+), 30 deletions(-) diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c index 7c00cf9..2c6327e 100644 --- a/dlls/jscript/compile.c +++ b/dlls/jscript/compile.c @@ -479,6 +479,8 @@ static HRESULT compile_expression(compiler_ctx_t *ctx, expression_t *expr) return compile_assign_expression(ctx, (binary_expression_t*)expr, OP_LAST); case EXPR_ASSIGNADD: return compile_assign_expression(ctx, (binary_expression_t*)expr, OP_add); + case EXPR_ASSIGNSUB: + return compile_assign_expression(ctx, (binary_expression_t*)expr, OP_sub); case EXPR_BITNEG: return compile_unary_expression(ctx, (unary_expression_t*)expr, OP_bneg); case EXPR_BOR: diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 05dee4d..7627a5b 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -2402,24 +2402,6 @@ static HRESULT interp_add(exec_ctx_t *ctx) } /* ECMA-262 3rd Edition 11.6.2 */ -static HRESULT sub_eval(script_ctx_t *ctx, VARIANT *lval, VARIANT *rval, jsexcept_t *ei, VARIANT *retv) -{ - VARIANT lnum, rnum; - HRESULT hres; - - hres = to_number(ctx, lval, ei, &lnum); - if(FAILED(hres)) - return hres; - - hres = to_number(ctx, rval, ei, &rnum); - if(FAILED(hres)) - return hres; - - num_set_val(retv, num_val(&lnum) - num_val(&rnum)); - return S_OK; -} - -/* ECMA-262 3rd Edition 11.6.2 */ static HRESULT interp_sub(exec_ctx_t *ctx) { VARIANT l, r; @@ -3402,16 +3384,6 @@ HRESULT assign_rrshift_expression_eval(script_ctx_t *ctx, expression_t *_expr, D } /* ECMA-262 3rd Edition 11.13.2 */ -HRESULT assign_sub_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD flags, jsexcept_t *ei, exprval_t *ret) -{ - binary_expression_t *expr = (binary_expression_t*)_expr; - - TRACE("\n"); - - return assign_oper_eval(ctx, expr->expression1, expr->expression2, sub_eval, ei, ret); -} - -/* ECMA-262 3rd Edition 11.13.2 */ HRESULT assign_mul_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD flags, jsexcept_t *ei, exprval_t *ret) { binary_expression_t *expr = (binary_expression_t*)_expr; diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index f78c0bd..0f76eba 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -575,7 +575,6 @@ HRESULT right2_shift_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_ HRESULT assign_lshift_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; HRESULT assign_rshift_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; HRESULT assign_rrshift_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; -HRESULT assign_sub_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; HRESULT assign_mul_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; HRESULT assign_div_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; HRESULT assign_mod_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y index 783aad9..17c3b60 100644 --- a/dlls/jscript/parser.y +++ b/dlls/jscript/parser.y @@ -1345,7 +1345,7 @@ static const expression_eval_t expression_eval_table[] = { assign_rshift_expression_eval, assign_rrshift_expression_eval, compiled_expression_eval, - assign_sub_expression_eval, + compiled_expression_eval, assign_mul_expression_eval, assign_div_expression_eval, assign_mod_expression_eval,
1
0
0
0
Jacek Caban : jscript: Use bytecode for '+=' expression implementation.
by Alexandre Julliard
05 Dec '11
05 Dec '11
Module: wine Branch: master Commit: 087afe8b79a286ad074d89922653f9a40f861cb3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=087afe8b79a286ad074d89922…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Dec 5 11:13:02 2011 +0100 jscript: Use bytecode for '+=' expression implementation. --- dlls/jscript/compile.c | 14 ++++++++++++-- dlls/jscript/engine.c | 39 +++++++++++++++++++++++++++++---------- dlls/jscript/engine.h | 2 +- dlls/jscript/parser.y | 2 +- 4 files changed, 43 insertions(+), 14 deletions(-) diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c index 73f57ee..7c00cf9 100644 --- a/dlls/jscript/compile.c +++ b/dlls/jscript/compile.c @@ -357,7 +357,7 @@ static HRESULT compile_delete_expression(compiler_ctx_t *ctx, unary_expression_t return S_OK; } -static HRESULT compile_assign_expression(compiler_ctx_t *ctx, binary_expression_t *expr) +static HRESULT compile_assign_expression(compiler_ctx_t *ctx, binary_expression_t *expr, jsop_t op) { HRESULT hres; @@ -410,14 +410,22 @@ static HRESULT compile_assign_expression(compiler_ctx_t *ctx, binary_expression_ if(FAILED(hres)) return hres; + if(op != OP_LAST && push_instr(ctx, op) == -1) + return E_OUTOFMEMORY; + return push_instr_uint(ctx, OP_throw, JS_E_ILLEGAL_ASSIGN); } + if(op != OP_LAST && push_instr(ctx, OP_refval) == -1) + return E_OUTOFMEMORY; hres = compile_expression(ctx, expr->expression2); if(FAILED(hres)) return hres; + if(op != OP_LAST && push_instr(ctx, op) == -1) + return E_OUTOFMEMORY; + if(push_instr(ctx, OP_assign) == -1) return E_OUTOFMEMORY; @@ -468,7 +476,9 @@ static HRESULT compile_expression(compiler_ctx_t *ctx, expression_t *expr) case EXPR_AND: return compile_logical_expression(ctx, (binary_expression_t*)expr, OP_jmp_z); case EXPR_ASSIGN: - return compile_assign_expression(ctx, (binary_expression_t*)expr); + return compile_assign_expression(ctx, (binary_expression_t*)expr, OP_LAST); + case EXPR_ASSIGNADD: + return compile_assign_expression(ctx, (binary_expression_t*)expr, OP_add); case EXPR_BITNEG: return compile_unary_expression(ctx, (unary_expression_t*)expr, OP_bneg); case EXPR_BOR: diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 124b7b0..05dee4d 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -166,6 +166,14 @@ static inline IDispatch *stack_pop_objid(exec_ctx_t *ctx, DISPID *id) return V_DISPATCH(stack_pop(ctx)); } +static inline IDispatch *stack_top_objid(exec_ctx_t *ctx, DISPID *id) +{ + assert(V_VT(stack_top(ctx)) == VT_INT && V_VT(stack_topn(ctx, 1)) == VT_DISPATCH); + + *id = V_INT(stack_top(ctx)); + return V_DISPATCH(stack_topn(ctx, 1)); +} + static void exprval_release(exprval_t *val) { switch(val->type) { @@ -1617,6 +1625,27 @@ static HRESULT interp_memberid(exec_ctx_t *ctx) return stack_push_objid(ctx, obj, id); } +/* ECMA-262 3rd Edition 11.2.1 */ +static HRESULT interp_refval(exec_ctx_t *ctx) +{ + IDispatch *disp; + VARIANT v; + DISPID id; + HRESULT hres; + + TRACE("\n"); + + disp = stack_top_objid(ctx, &id); + if(!disp) + return throw_reference_error(ctx->parser->script, &ctx->ei, JS_E_ILLEGAL_ASSIGN, NULL); + + hres = disp_propget(ctx->parser->script, disp, id, &v, &ctx->ei, NULL/*FIXME*/); + if(FAILED(hres)) + return hres; + + return stack_push(ctx, &v); +} + static void free_dp(DISPPARAMS *dp) { DWORD i; @@ -3373,16 +3402,6 @@ HRESULT assign_rrshift_expression_eval(script_ctx_t *ctx, expression_t *_expr, D } /* ECMA-262 3rd Edition 11.13.2 */ -HRESULT assign_add_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD flags, jsexcept_t *ei, exprval_t *ret) -{ - binary_expression_t *expr = (binary_expression_t*)_expr; - - TRACE("\n"); - - return assign_oper_eval(ctx, expr->expression1, expr->expression2, add_eval, ei, ret); -} - -/* ECMA-262 3rd Edition 11.13.2 */ HRESULT assign_sub_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD flags, jsexcept_t *ei, exprval_t *ret) { binary_expression_t *expr = (binary_expression_t*)_expr; diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index 0825649..f78c0bd 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -79,6 +79,7 @@ typedef struct _func_stack { X(throw, 0, ARG_UINT, 0) \ X(tonum, 1, 0,0) \ X(tree, 1, ARG_EXPR, 0) \ + X(refval, 1, 0,0) \ X(ret, 0, 0,0) \ X(sub, 1, 0,0) \ X(void, 1, 0,0) \ @@ -574,7 +575,6 @@ HRESULT right2_shift_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_ HRESULT assign_lshift_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; HRESULT assign_rshift_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; HRESULT assign_rrshift_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; -HRESULT assign_add_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; HRESULT assign_sub_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; HRESULT assign_mul_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; HRESULT assign_div_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y index 55f8aac..783aad9 100644 --- a/dlls/jscript/parser.y +++ b/dlls/jscript/parser.y @@ -1344,7 +1344,7 @@ static const expression_eval_t expression_eval_table[] = { assign_lshift_expression_eval, assign_rshift_expression_eval, assign_rrshift_expression_eval, - assign_add_expression_eval, + compiled_expression_eval, assign_sub_expression_eval, assign_mul_expression_eval, assign_div_expression_eval,
1
0
0
0
← Newer
1
...
69
70
71
72
73
74
75
...
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