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 2010
----- 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
1099 discussions
Start a n
N
ew thread
Jacek Caban : jscript: Added conditional compilation tests.
by Alexandre Julliard
28 Dec '10
28 Dec '10
Module: wine Branch: master Commit: 10b1a7edf61cd077198b58836d9943eebcd2d4c0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=10b1a7edf61cd077198b58836…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 28 15:40:39 2010 +0100 jscript: Added conditional compilation tests. --- dlls/jscript/tests/api.js | 4 ++ dlls/jscript/tests/cc.js | 75 ++++++++++++++++++++++++++++++++++++++++++++ dlls/jscript/tests/rsrc.rc | 3 ++ dlls/jscript/tests/run.c | 15 +++++++++ 4 files changed, 97 insertions(+), 0 deletions(-) diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 6c62276..482d8b2 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -1899,6 +1899,7 @@ var exception_array = { E_RBRACKET: { type: "SyntaxError", number: -2146827282 }, E_SEMICOLON: { type: "SyntaxError", number: -2146827284 }, E_UNTERMINATED_STR: { type: "SyntaxError", number: -2146827273 }, + E_DISABLED_CC: { type: "SyntaxError", number: -2146827258 }, E_ILLEGAL_ASSIGN: { type: "ReferenceError", number: -2146823280 }, @@ -1986,6 +1987,9 @@ testSyntaxError("while(", "E_SYNTAX_ERROR"); testSyntaxError("if(", "E_SYNTAX_ERROR"); testSyntaxError("'unterminated", "E_UNTERMINATED_STR"); testSyntaxError("*", "E_SYNTAX_ERROR"); +testSyntaxError("@_jscript_version", "E_DISABLED_CC"); +testSyntaxError("@a", "E_DISABLED_CC"); +testSyntaxError("/* @cc_on @*/ @_jscript_version", "E_DISABLED_CC"); // ReferenceError tests testException(function() {test = function() {}}, "E_ILLEGAL_ASSIGN"); diff --git a/dlls/jscript/tests/cc.js b/dlls/jscript/tests/cc.js new file mode 100644 index 0000000..1fee93f --- /dev/null +++ b/dlls/jscript/tests/cc.js @@ -0,0 +1,75 @@ +/* + * Copyright 2010 Jacek Caban for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +eval("@_jscript_version"); + +var tmp; + +/*@ */ +//@cc_on @*/ + +@_jscript_version; + +@cc_on +@*/ + +// Standard predefined variabled +if(isWin64) { + ok(@_win64 === true, "@_win64 = " + @_win64); + ok(@_amd64 === true, "@_amd64 = " + @_amd64); + ok(isNaN(@_win32), "@_win32 = " + @_win32); + ok(isNaN(@_x86), "@_x86 = " + @_x86); +}else { + ok(@_win32 === true, "@_win32 = " + @_win32); + ok(@_x86 === true, "@_x86 = " + @_x86); + ok(isNaN(@_win64), "@_win64 = " + @_win64); + ok(isNaN(@_amd64), "@_amd64 = " + @_amd64); +} + +ok(@_jscript === true, "@_jscript = " + @_jscript); +ok(@_jscript_build === ScriptEngineBuildVersion(), + "@_jscript_build = " + @_jscript_build + " expected " + ScriptEngineBuildVersion()); +tmp = ScriptEngineMajorVersion() + ScriptEngineMinorVersion()/10; +ok(@_jscript_version === tmp, "@_jscript_version = " + @_jscript_version + " expected " + tmp); +ok(isNaN(@_win16), "@_win16 = " + @_win16); +ok(isNaN(@_mac), "@_mac = " + @_mac); +ok(isNaN(@_alpha), "@_alpha = " + @_alpha); +ok(isNaN(@_mc680x0), "@_mc680x0 = " + @_mc680x0); +ok(isNaN(@_PowerPC), "@_PowerPC = " + @_PowerPC); + +// Undefined variable +ok(isNaN(@xxx), "@xxx = " + @xxx); +ok(isNaN(@x$_xx), "@x$_xx = " + @x$_xx); + +tmp = false; +try { + eval("/*@cc_on */"); +}catch(e) { + tmp = true; +} +ok(tmp, "expected syntax exception"); + +tmp = false; +try { + eval("/*@_jscript_version */"); +}catch(e) { + tmp = true; +} +ok(tmp, "expected syntax exception"); + +reportSuccess(); diff --git a/dlls/jscript/tests/rsrc.rc b/dlls/jscript/tests/rsrc.rc index ecb4212..457dc4f 100644 --- a/dlls/jscript/tests/rsrc.rc +++ b/dlls/jscript/tests/rsrc.rc @@ -19,6 +19,9 @@ /* @makedep: api.js */ api.js 40 "api.js" +/* @makedep: cc.js */ +cc.js 40 "cc.js" + /* @makedep: lang.js */ lang.js 40 "lang.js" diff --git a/dlls/jscript/tests/run.c b/dlls/jscript/tests/run.c index 61e371c..7b198df 100644 --- a/dlls/jscript/tests/run.c +++ b/dlls/jscript/tests/run.c @@ -87,6 +87,7 @@ DEFINE_EXPECT(invoke_func); #define DISPID_GLOBAL_CREATEARRAY 0x100c #define DISPID_GLOBAL_PROPGETFUNC 0x100d #define DISPID_GLOBAL_OBJECT_FLAG 0x100e +#define DISPID_GLOBAL_ISWIN64 0x100f #define DISPID_TESTOBJ_PROP 0x2000 @@ -387,6 +388,12 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD return S_OK; } + if(!strcmp_wa(bstrName, "isWin64")) { + test_grfdex(grfdex, fdexNameCaseSensitive); + *pid = DISPID_GLOBAL_ISWIN64; + return S_OK; + } + if(strict_dispid_check) ok(0, "unexpected call %s\n", wine_dbgstr_w(bstrName)); return DISP_E_UNKNOWNNAME; @@ -543,6 +550,13 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, } return S_OK; + case DISPID_GLOBAL_ISWIN64: + if(pvarRes) { + V_VT(pvarRes) = VT_BOOL; + V_BSTR(pvarRes) = sizeof(void*) == 8 ? VARIANT_TRUE : VARIANT_FALSE; + } + return S_OK; + case DISPID_GLOBAL_NULL_DISP: ok(wFlags == INVOKE_PROPERTYGET, "wFlags = %x\n", wFlags); ok(pdp != NULL, "pdp == NULL\n"); @@ -1420,6 +1434,7 @@ static void run_tests(void) run_from_res("lang.js"); run_from_res("api.js"); run_from_res("regexp.js"); + run_from_res("cc.js"); test_isvisible(FALSE); test_isvisible(TRUE);
1
0
0
0
Jacek Caban : jscript: Beginning support for conditional compilation.
by Alexandre Julliard
28 Dec '10
28 Dec '10
Module: wine Branch: master Commit: 45e33ec280f97d36d436fabd8b915c2be65f5d02 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=45e33ec280f97d36d436fabd8…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 28 15:40:00 2010 +0100 jscript: Beginning support for conditional compilation. --- dlls/jscript/jscript.c | 2 + dlls/jscript/jscript.h | 10 ++ dlls/jscript/jscript_En.rc | 1 + dlls/jscript/lex.c | 204 ++++++++++++++++++++++++++++++++++++++++++-- dlls/jscript/parser.y | 3 +- dlls/jscript/resource.h | 1 + 6 files changed, 212 insertions(+), 9 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=45e33ec280f97d36d436f…
1
0
0
0
Jacek Caban : jscript: Moved allocating double literal to separated function.
by Alexandre Julliard
28 Dec '10
28 Dec '10
Module: wine Branch: master Commit: 74416052cefe9fa176a89aaf885c371600220831 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74416052cefe9fa176a89aaf8…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 28 15:05:50 2010 +0100 jscript: Moved allocating double literal to separated function. --- dlls/jscript/lex.c | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/dlls/jscript/lex.c b/dlls/jscript/lex.c index 5ac92d9..135c1d1 100644 --- a/dlls/jscript/lex.c +++ b/dlls/jscript/lex.c @@ -364,7 +364,7 @@ static int parse_string_literal(parser_ctx_t *ctx, const WCHAR **ret, WCHAR endc return tStringLiteral; } -static literal_t *alloc_int_literal(parser_ctx_t *ctx, LONG l) +static literal_t *new_int_literal(parser_ctx_t *ctx, LONG l) { literal_t *ret = parser_alloc(ctx, sizeof(literal_t)); @@ -374,6 +374,15 @@ static literal_t *alloc_int_literal(parser_ctx_t *ctx, LONG l) return ret; } +static literal_t *new_double_literal(parser_ctx_t *ctx, DOUBLE d) +{ + literal_t *ret = parser_alloc(ctx, sizeof(literal_t)); + + ret->type = LT_DOUBLE; + ret->u.dval = d; + return ret; +} + literal_t *new_boolean_literal(parser_ctx_t *ctx, VARIANT_BOOL bval) { literal_t *ret = parser_alloc(ctx, sizeof(literal_t)); @@ -455,10 +464,7 @@ static int parse_double_literal(parser_ctx_t *ctx, LONG int_part, literal_t **li else exp += e; } - *literal = parser_alloc(ctx, sizeof(literal_t)); - (*literal)->type = LT_DOUBLE; - (*literal)->u.dval = (double)d*pow(10, exp); - + *literal = new_double_literal(ctx, (DOUBLE)d*pow(10, exp)); return tNumericLiteral; } @@ -468,7 +474,7 @@ static int parse_numeric_literal(parser_ctx_t *ctx, literal_t **literal) l = *ctx->ptr++ - '0'; if(ctx->ptr == ctx->end) { - *literal = alloc_int_literal(ctx, l); + *literal = new_int_literal(ctx, l); return tNumericLiteral; } @@ -489,7 +495,7 @@ static int parse_numeric_literal(parser_ctx_t *ctx, literal_t **literal) return lex_error(ctx, E_FAIL); } - *literal = alloc_int_literal(ctx, l); + *literal = new_int_literal(ctx, l); return tNumericLiteral; } @@ -498,7 +504,7 @@ static int parse_numeric_literal(parser_ctx_t *ctx, literal_t **literal) return lex_error(ctx, E_FAIL); } - *literal = alloc_int_literal(ctx, 0); + *literal = new_int_literal(ctx, 0); } while(ctx->ptr < ctx->end && isdigitW(*ctx->ptr)) @@ -523,7 +529,7 @@ static int parse_numeric_literal(parser_ctx_t *ctx, literal_t **literal) } } - *literal = alloc_int_literal(ctx, l); + *literal = new_int_literal(ctx, l); return tNumericLiteral; }
1
0
0
0
Jacek Caban : jscript: Moved new_boolean_literal to lex.c.
by Alexandre Julliard
28 Dec '10
28 Dec '10
Module: wine Branch: master Commit: 501cad6920e7e4bcb1edc73803b4b0dd09caa0e8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=501cad6920e7e4bcb1edc7380…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 28 15:05:36 2010 +0100 jscript: Moved new_boolean_literal to lex.c. --- dlls/jscript/engine.h | 1 + dlls/jscript/lex.c | 10 ++++++++++ dlls/jscript/parser.y | 11 ----------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index d5e2d33..2800c86 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -147,6 +147,7 @@ typedef struct { } literal_t; literal_t *parse_regexp(parser_ctx_t*); +literal_t *new_boolean_literal(parser_ctx_t*,VARIANT_BOOL); typedef struct _variable_declaration_t { const WCHAR *identifier; diff --git a/dlls/jscript/lex.c b/dlls/jscript/lex.c index 88fed07..5ac92d9 100644 --- a/dlls/jscript/lex.c +++ b/dlls/jscript/lex.c @@ -374,6 +374,16 @@ static literal_t *alloc_int_literal(parser_ctx_t *ctx, LONG l) return ret; } +literal_t *new_boolean_literal(parser_ctx_t *ctx, VARIANT_BOOL bval) +{ + literal_t *ret = parser_alloc(ctx, sizeof(literal_t)); + + ret->type = LT_BOOL; + ret->u.bval = bval; + + return ret; +} + static int parse_double_literal(parser_ctx_t *ctx, LONG int_part, literal_t **literal) { LONGLONG d, hlp; diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y index df7a070..dbbd682 100644 --- a/dlls/jscript/parser.y +++ b/dlls/jscript/parser.y @@ -38,7 +38,6 @@ typedef struct _statement_list_t { static literal_t *new_string_literal(parser_ctx_t*,const WCHAR*); static literal_t *new_null_literal(parser_ctx_t*); -static literal_t *new_boolean_literal(parser_ctx_t*,VARIANT_BOOL); typedef struct _property_list_t { prop_val_t *head; @@ -855,16 +854,6 @@ static literal_t *new_null_literal(parser_ctx_t *ctx) return ret; } -static literal_t *new_boolean_literal(parser_ctx_t *ctx, VARIANT_BOOL bval) -{ - literal_t *ret = parser_alloc(ctx, sizeof(literal_t)); - - ret->type = LT_BOOL; - ret->u.bval = bval; - - return ret; -} - static prop_val_t *new_prop_val(parser_ctx_t *ctx, literal_t *name, expression_t *value) { prop_val_t *ret = parser_alloc(ctx, sizeof(prop_val_t));
1
0
0
0
Jacek Caban : jscript: Ensure that the whole script is parsed.
by Alexandre Julliard
28 Dec '10
28 Dec '10
Module: wine Branch: master Commit: 0f36ef09b12e7c39c05b7def4d7c7fc87987dec2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0f36ef09b12e7c39c05b7def4…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 28 15:05:25 2010 +0100 jscript: Ensure that the whole script is parsed. --- dlls/jscript/lex.c | 2 +- dlls/jscript/parser.y | 3 ++- dlls/jscript/tests/api.js | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/jscript/lex.c b/dlls/jscript/lex.c index bfa3568..88fed07 100644 --- a/dlls/jscript/lex.c +++ b/dlls/jscript/lex.c @@ -526,7 +526,7 @@ int parser_lex(void *lval, parser_ctx_t *ctx) do { skip_spaces(ctx); if(ctx->ptr == ctx->end) - return 0; + return tEOF; }while(skip_comment(ctx) || skip_html_comment(ctx)); if(isalphaW(*ctx->ptr)) { diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y index 47fcc34..df7a070 100644 --- a/dlls/jscript/parser.y +++ b/dlls/jscript/parser.y @@ -180,6 +180,7 @@ static source_elements_t *source_elements_add_statement(source_elements_t*,state %token <ival> tAssignOper tEqOper tShiftOper tRelOper %token <literal> tNumericLiteral %token <wstr> tStringLiteral +%token tEOF %type <source_elements> SourceElements %type <source_elements> FunctionBody @@ -253,7 +254,7 @@ static source_elements_t *source_elements_add_statement(source_elements_t*,state /* ECMA-262 3rd Edition 14 */ Program - : SourceElements HtmlComment + : SourceElements HtmlComment tEOF { program_parsed(ctx, $1); } HtmlComment diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 4b9f160..6c62276 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -1985,6 +1985,7 @@ testSyntaxError("for(i=0;i<10", "E_SEMICOLON"); testSyntaxError("while(", "E_SYNTAX_ERROR"); testSyntaxError("if(", "E_SYNTAX_ERROR"); testSyntaxError("'unterminated", "E_UNTERMINATED_STR"); +testSyntaxError("*", "E_SYNTAX_ERROR"); // ReferenceError tests testException(function() {test = function() {}}, "E_ILLEGAL_ASSIGN");
1
0
0
0
Jacek Caban : jscript: Use HRESULTs instead of IDSs in parser.
by Alexandre Julliard
28 Dec '10
28 Dec '10
Module: wine Branch: master Commit: 5e469f4fff8890552513180178c5ad7d59546376 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e469f4fff889055251318017…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 28 15:05:13 2010 +0100 jscript: Use HRESULTs instead of IDSs in parser. --- dlls/jscript/lex.c | 4 ++-- dlls/jscript/parser.y | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/jscript/lex.c b/dlls/jscript/lex.c index 2db2d39..bfa3568 100644 --- a/dlls/jscript/lex.c +++ b/dlls/jscript/lex.c @@ -99,7 +99,7 @@ static const struct { static int lex_error(parser_ctx_t *ctx, HRESULT hres) { - ctx->hres = MAKE_JSERROR(hres); + ctx->hres = hres; ctx->lexer_error = TRUE; return -1; } @@ -346,7 +346,7 @@ static int parse_string_literal(parser_ctx_t *ctx, const WCHAR **ret, WCHAR endc } if(ctx->ptr == ctx->end) - return lex_error(ctx, IDS_UNTERMINATED_STR); + return lex_error(ctx, JS_E_UNTERMINATED_STRING); len = ctx->ptr-ptr; diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y index 340d515..47fcc34 100644 --- a/dlls/jscript/parser.y +++ b/dlls/jscript/parser.y @@ -496,7 +496,7 @@ Expression_opt Expression_err : Expression { $$ = $1; } - | error { set_error(ctx, IDS_SYNTAX_ERROR); YYABORT; } + | error { set_error(ctx, JS_E_SYNTAX); YYABORT; } /* ECMA-262 3rd Edition 11.14 */ Expression @@ -818,15 +818,15 @@ semicolon_opt left_bracket : '(' - | error { set_error(ctx, IDS_LBRACKET); YYABORT; } + | error { set_error(ctx, JS_E_MISSING_LBRACKET); YYABORT; } right_bracket : ')' - | error { set_error(ctx, IDS_RBRACKET); YYABORT; } + | error { set_error(ctx, JS_E_MISSING_RBRACKET); YYABORT; } semicolon : ';' - | error { set_error(ctx, IDS_SEMICOLON); YYABORT; } + | error { set_error(ctx, JS_E_MISSING_SEMICOLON); YYABORT; } %% @@ -1459,14 +1459,14 @@ static int parser_error(const char *str) static void set_error(parser_ctx_t *ctx, UINT error) { - ctx->hres = MAKE_JSERROR(error); + ctx->hres = error; } static BOOL explicit_error(parser_ctx_t *ctx, void *obj, WCHAR next) { if(obj || *(ctx->ptr-1)==next) return TRUE; - set_error(ctx, IDS_SYNTAX_ERROR); + set_error(ctx, JS_E_SYNTAX); return FALSE; }
1
0
0
0
Jacek Caban : jscript: Pass HRESULTs instead of IDSs to throw_* functions.
by Alexandre Julliard
28 Dec '10
28 Dec '10
Module: wine Branch: master Commit: 7774a0a4c1628be2a499dd67293f39eba75e41b7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7774a0a4c1628be2a499dd672…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 28 15:04:59 2010 +0100 jscript: Pass HRESULTs instead of IDSs to throw_* functions. --- dlls/jscript/activex.c | 2 +- dlls/jscript/array.c | 10 ++-- dlls/jscript/bool.c | 6 +- dlls/jscript/date.c | 120 +++++++++++++++++++++++----------------------- dlls/jscript/engine.c | 18 ++++---- dlls/jscript/error.c | 42 +++++++++-------- dlls/jscript/function.c | 6 +- dlls/jscript/global.c | 2 +- dlls/jscript/jscript.h | 53 +++++++++++++++++---- dlls/jscript/jsutils.c | 2 +- dlls/jscript/lex.c | 2 +- dlls/jscript/number.c | 8 ++-- dlls/jscript/object.c | 2 +- dlls/jscript/parser.y | 4 +- dlls/jscript/regexp.c | 4 +- dlls/jscript/string.c | 2 +- dlls/jscript/vbarray.c | 22 ++++---- 17 files changed, 170 insertions(+), 135 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=7774a0a4c1628be2a499d…
1
0
0
0
Jacek Caban : jscript: Better syntax error tests.
by Alexandre Julliard
28 Dec '10
28 Dec '10
Module: wine Branch: master Commit: aab8a1ba3ac72fe1295969589b720e8e4191447e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aab8a1ba3ac72fe1295969589…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 28 15:04:40 2010 +0100 jscript: Better syntax error tests. --- dlls/jscript/tests/api.js | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index e4dc7c4..4b9f160 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -1954,9 +1954,21 @@ testException(function() {new VBArray(new VBArray(createArray()));}, "E_NOT_VBAR testException(function() {VBArray.prototype.lbound.call(new Object());}, "E_NOT_VBARRAY"); // SyntaxError tests -function testSyntaxError(code, e) { - testException(function() { eval(code); }, e); +function testSyntaxError(code, id) { + var ex = exception_array[id]; + var ret = "", num = ""; + + try { + eval(code); + } catch(e) { + ret = e.name; + num = e.number; + } + + ok(ret === ex.type, "Syntax exception test, ret = " + ret + ", expected " + ex.type +". Executed code: " + code); + ok(num === ex.number, "Syntax exception test, num = " + num + ", expected " + ex.number + ". Executed code: " + code); } + testSyntaxError("for(i=0;) {}", "E_SYNTAX_ERROR"); testSyntaxError("function {};", "E_LBRACKET"); testSyntaxError("if", "E_LBRACKET");
1
0
0
0
Greg Geldorp : shell32/tests: Fix race conditions.
by Alexandre Julliard
28 Dec '10
28 Dec '10
Module: wine Branch: master Commit: 519c28894693bc2e597fc794d9114d5ccb1cd311 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=519c28894693bc2e597fc794d…
Author: Greg Geldorp <ggeldorp(a)vmware.com> Date: Tue Dec 28 13:34:11 2010 +0100 shell32/tests: Fix race conditions. --- dlls/shell32/tests/shlexec.c | 17 +++++++---------- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index c32a065..252aed7 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -57,6 +57,7 @@ static char tmpdir[MAX_PATH]; static char child_file[MAX_PATH]; static DLLVERSIONINFO dllver; static BOOL skip_noassoc_tests = FALSE; +static HANDLE dde_ready_event; /*** @@ -572,13 +573,14 @@ static void doChild(int argc, char** argv) timer = SetTimer(NULL, 0, 2500, childTimeout); - dde_ready = CreateEvent(NULL, FALSE, FALSE, "winetest_shlexec_dde_ready"); + dde_ready = OpenEvent(EVENT_MODIFY_STATE, FALSE, "winetest_shlexec_dde_ready"); SetEvent(dde_ready); CloseHandle(dde_ready); while (GetMessage(&msg, NULL, 0, 0)) DispatchMessage(&msg); + Sleep(500); KillTimer(NULL, timer); assert(DdeNameService(ddeInst, hszApplication, 0L, DNS_UNREGISTER)); assert(DdeFreeStringHandle(ddeInst, hszTopic)); @@ -587,7 +589,7 @@ static void doChild(int argc, char** argv) } else { - dde_ready = CreateEvent(NULL, FALSE, FALSE, "winetest_shlexec_dde_ready"); + dde_ready = OpenEvent(EVENT_MODIFY_STATE, FALSE, "winetest_shlexec_dde_ready"); SetEvent(dde_ready); CloseHandle(dde_ready); } @@ -1613,14 +1615,7 @@ static dde_tests_t dde_tests[] = static DWORD WINAPI hooked_WaitForInputIdle(HANDLE process, DWORD timeout) { - HANDLE dde_ready; - DWORD wait_result; - - dde_ready = CreateEventA(NULL, FALSE, FALSE, "winetest_shlexec_dde_ready"); - wait_result = WaitForSingleObject(dde_ready, timeout); - CloseHandle(dde_ready); - - return wait_result; + return WaitForSingleObject(dde_ready_event, timeout); } /* @@ -1732,7 +1727,9 @@ static void test_dde(void) } ddeExec[0] = 0; + dde_ready_event = CreateEventA(NULL, FALSE, FALSE, "winetest_shlexec_dde_ready"); rc = shell_execute_ex(SEE_MASK_FLAG_DDEWAIT | SEE_MASK_FLAG_NO_UI, NULL, filename, NULL, NULL); + CloseHandle(dde_ready_event); if ((test->todo & 0x1)==0) { ok(32 < rc, "%s failed: rc=%d err=%d\n", shell_call,
1
0
0
0
Rico Schüller : d3dcompiler: Implement ID3D11ReflectionInterface::GetDesc().
by Alexandre Julliard
28 Dec '10
28 Dec '10
Module: wine Branch: master Commit: ba9d311f0d176779495707b9efc890aa2eafe31c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ba9d311f0d176779495707b9e…
Author: Rico Schüller <kgbricola(a)web.de> Date: Tue Dec 28 11:50:16 2010 +0100 d3dcompiler: Implement ID3D11ReflectionInterface::GetDesc(). --- dlls/d3dcompiler_43/reflection.c | 51 ++++++++++++++++++++++++++++++++++++- 1 files changed, 49 insertions(+), 2 deletions(-) diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index b3b7055..4b0467a 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -137,9 +137,56 @@ static ULONG STDMETHODCALLTYPE d3dcompiler_shader_reflection_Release(ID3D11Shade static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetDesc(ID3D11ShaderReflection *iface, D3D11_SHADER_DESC *desc) { - FIXME("iface %p, desc %p stub!\n", iface, desc); + struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); - return E_NOTIMPL; + FIXME("iface %p, desc %p partial stub!\n", iface, desc); + + if (!desc) + { + WARN("Invalid argument specified\n"); + return E_FAIL; + } + + desc->Version = This->version; + desc->Creator = This->creator; + desc->Flags = This->flags; + desc->ConstantBuffers = This->constant_buffer_count; + desc->BoundResources = This->bound_resource_count; + desc->InputParameters = This->isgn ? This->isgn->element_count : 0; + desc->OutputParameters = This->osgn ? This->osgn->element_count : 0; + desc->InstructionCount = This->instruction_count; + desc->TempRegisterCount = This->temp_register_count; + desc->TempArrayCount = This->temp_array_count; + desc->DefCount = 0; + desc->DclCount = This->dcl_count; + desc->TextureNormalInstructions = This->texture_normal_instructions; + desc->TextureLoadInstructions = This->texture_load_instructions; + desc->TextureCompInstructions = This->texture_comp_instructions; + desc->TextureBiasInstructions = This->texture_bias_instructions; + desc->TextureGradientInstructions = This->texture_gradient_instructions; + desc->FloatInstructionCount = This->float_instruction_count; + desc->IntInstructionCount = This->int_instruction_count; + desc->UintInstructionCount = This->uint_instruction_count; + desc->StaticFlowControlCount = This->static_flow_control_count; + desc->DynamicFlowControlCount = This->dynamic_flow_control_count; + desc->MacroInstructionCount = 0; + desc->ArrayInstructionCount = This->array_instruction_count; + desc->CutInstructionCount = This->cut_instruction_count; + desc->EmitInstructionCount = This->emit_instruction_count; + desc->GSOutputTopology = This->gs_output_topology; + desc->GSMaxOutputVertexCount = This->gs_max_output_vertex_count; + desc->InputPrimitive = This->input_primitive; + desc->PatchConstantParameters = This->pcsg ? This->pcsg->element_count : 0; + desc->cGSInstanceCount = 0; + desc->cControlPoints = This->c_control_points; + desc->HSOutputPrimitive = This->hs_output_primitive; + desc->HSPartitioning = This->hs_prtitioning; + desc->TessellatorDomain = This->tessellator_domain; + desc->cBarrierInstructions = 0; + desc->cInterlockedInstructions = 0; + desc->cTextureStoreInstructions = 0; + + return S_OK; } static struct ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetConstantBufferByIndex(
1
0
0
0
← Newer
1
...
9
10
11
12
13
14
15
...
110
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Results per page:
10
25
50
100
200