Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a0467ef1
Commit
a0467ef1
authored
Dec 21, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Make undefined a property of global object.
parent
68453a52
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
17 deletions
+12
-17
engine.c
dlls/jscript/engine.c
+0
-3
engine.h
dlls/jscript/engine.h
+0
-1
global.c
dlls/jscript/global.c
+5
-0
lex.c
dlls/jscript/lex.c
+0
-1
parser.y
dlls/jscript/parser.y
+1
-12
lang.js
dlls/jscript/tests/lang.js
+6
-0
No files found.
dlls/jscript/engine.c
View file @
a0467ef1
...
...
@@ -350,9 +350,6 @@ static HRESULT equal2_values(VARIANT *lval, VARIANT *rval, BOOL *ret)
static
HRESULT
literal_to_var
(
script_ctx_t
*
ctx
,
literal_t
*
literal
,
VARIANT
*
v
)
{
switch
(
literal
->
type
)
{
case
LT_UNDEFINED
:
V_VT
(
v
)
=
VT_EMPTY
;
break
;
case
LT_NULL
:
V_VT
(
v
)
=
VT_NULL
;
break
;
...
...
dlls/jscript/engine.h
View file @
a0467ef1
...
...
@@ -131,7 +131,6 @@ typedef enum {
LT_DOUBLE
,
LT_STRING
,
LT_BOOL
,
LT_UNDEFINED
,
LT_NULL
,
LT_REGEXP
}
literal_type_t
;
...
...
dlls/jscript/global.c
View file @
a0467ef1
...
...
@@ -1176,6 +1176,11 @@ HRESULT init_global(script_ctx_t *ctx)
if
(
FAILED
(
hres
))
return
hres
;
V_VT
(
&
var
)
=
VT_EMPTY
;
hres
=
jsdisp_propput_name
(
ctx
->
global
,
undefinedW
,
&
var
,
NULL
/*FIXME*/
,
NULL
/*FIXME*/
);
if
(
FAILED
(
hres
))
return
hres
;
V_VT
(
&
var
)
=
VT_DISPATCH
;
V_DISPATCH
(
&
var
)
=
(
IDispatch
*
)
_IDispatchEx_
(
math
);
hres
=
jsdisp_propput_name
(
ctx
->
global
,
MathW
,
&
var
,
NULL
/*FIXME*/
,
NULL
/*FIXME*/
);
...
...
dlls/jscript/lex.c
View file @
a0467ef1
...
...
@@ -91,7 +91,6 @@ static const struct {
{
trueW
,
kTRUE
},
{
tryW
,
kTRY
},
{
typeofW
,
kTYPEOF
},
{
undefinedW
,
kUNDEFINED
},
{
varW
,
kVAR
},
{
voidW
,
kVOID
},
{
whileW
,
kWHILE
},
...
...
dlls/jscript/parser.y
View file @
a0467ef1
...
...
@@ -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_undefined_literal(parser_ctx_t*);
static literal_t *new_boolean_literal(parser_ctx_t*,VARIANT_BOOL);
typedef struct _property_list_t {
...
...
@@ -171,7 +170,7 @@ static source_elements_t *source_elements_add_statement(source_elements_t*,state
/* keywords */
%token kBREAK kCASE kCATCH kCONTINUE kDEFAULT kDELETE kDO kELSE kIF kFINALLY kFOR kIN
%token kINSTANCEOF kNEW kNULL k
UNDEFINED k
RETURN kSWITCH kTHIS kTHROW kTRUE kFALSE kTRY kTYPEOF kVAR kVOID kWHILE kWITH
%token kINSTANCEOF kNEW kNULL kRETURN kSWITCH kTHIS kTHROW kTRUE kFALSE kTRY kTYPEOF kVAR kVOID kWHILE kWITH
%token tANDAND tOROR tINC tDEC tHTMLCOMMENT kDIVEQ
%token <srcptr> kFUNCTION '}'
...
...
@@ -800,7 +799,6 @@ Identifier_opt
/* ECMA-262 3rd Edition 7.8 */
Literal
: kNULL { $$ = new_null_literal(ctx); }
| kUNDEFINED { $$ = new_undefined_literal(ctx); }
| BooleanLiteral { $$ = $1; }
| tNumericLiteral { $$ = $1; }
| tStringLiteral { $$ = new_string_literal(ctx, $1); }
...
...
@@ -856,15 +854,6 @@ static literal_t *new_null_literal(parser_ctx_t *ctx)
return ret;
}
static literal_t *new_undefined_literal(parser_ctx_t *ctx)
{
literal_t *ret = parser_alloc(ctx, sizeof(literal_t));
ret->type = LT_UNDEFINED;
return ret;
}
static literal_t *new_boolean_literal(parser_ctx_t *ctx, VARIANT_BOOL bval)
{
literal_t *ret = parser_alloc(ctx, sizeof(literal_t));
...
...
dlls/jscript/tests/lang.js
View file @
a0467ef1
...
...
@@ -1013,4 +1013,10 @@ ok(typeof(doesnotexist) === "undefined", "typeof(doesnotexist) = " + typeof(does
(
function
()
{
newValue
=
1
;
})();
ok
(
newValue
===
1
,
"newValue = "
+
newValue
);
obj
=
{
undefined
:
3
};
/* Keep this test in the end of file */
undefined
=
6
;
ok
(
undefined
===
6
,
"undefined = "
+
undefined
);
reportSuccess
();
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment