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
e5baa750
Commit
e5baa750
authored
Jan 18, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Simplify identifier_eval function.
parent
9336c106
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
engine.c
dlls/jscript/engine.c
+15
-14
No files found.
dlls/jscript/engine.c
View file @
e5baa750
...
...
@@ -488,7 +488,7 @@ static BOOL lookup_global_members(script_ctx_t *ctx, BSTR identifier, exprval_t
}
/* 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
)
static
HRESULT
identifier_eval
(
script_ctx_t
*
ctx
,
BSTR
identifier
,
exprval_t
*
ret
)
{
scope_chain_t
*
scope
;
named_item_t
*
item
;
...
...
@@ -545,15 +545,6 @@ static HRESULT identifier_eval(script_ctx_t *ctx, BSTR identifier, DWORD flags,
if
(
lookup_global_members
(
ctx
,
identifier
,
ret
))
return
S_OK
;
if
(
flags
&
fdexNameEnsure
)
{
hres
=
jsdisp_get_id
(
ctx
->
global
,
identifier
,
fdexNameEnsure
,
&
id
);
if
(
FAILED
(
hres
))
return
hres
;
exprval_set_idref
(
ret
,
to_disp
(
ctx
->
global
),
id
);
return
S_OK
;
}
ret
->
type
=
EXPRVAL_INVALID
;
return
S_OK
;
}
...
...
@@ -1083,7 +1074,7 @@ static HRESULT interp_ident(exec_ctx_t *ctx)
TRACE
(
"%s
\n
"
,
debugstr_w
(
arg
));
hres
=
identifier_eval
(
ctx
->
parser
->
script
,
arg
,
0
,
ctx
->
ei
,
&
exprval
);
hres
=
identifier_eval
(
ctx
->
parser
->
script
,
arg
,
&
exprval
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -1108,10 +1099,20 @@ static HRESULT interp_identid(exec_ctx_t *ctx)
TRACE
(
"%s %x
\n
"
,
debugstr_w
(
arg
),
flags
);
hres
=
identifier_eval
(
ctx
->
parser
->
script
,
arg
,
flags
,
ctx
->
ei
,
&
exprval
);
hres
=
identifier_eval
(
ctx
->
parser
->
script
,
arg
,
&
exprval
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
exprval
.
type
==
EXPRVAL_INVALID
&&
(
flags
&
fdexNameEnsure
))
{
DISPID
id
;
hres
=
jsdisp_get_id
(
ctx
->
parser
->
script
->
global
,
arg
,
fdexNameEnsure
,
&
id
);
if
(
FAILED
(
hres
))
return
hres
;
exprval_set_idref
(
&
exprval
,
to_disp
(
ctx
->
parser
->
script
->
global
),
id
);
}
if
(
exprval
.
type
!=
EXPRVAL_IDREF
)
{
WARN
(
"invalid ref
\n
"
);
exprval_release
(
&
exprval
);
...
...
@@ -1686,7 +1687,7 @@ static HRESULT interp_delete_ident(exec_ctx_t *ctx)
TRACE
(
"%s
\n
"
,
debugstr_w
(
arg
));
hres
=
identifier_eval
(
ctx
->
parser
->
script
,
arg
,
0
,
ctx
->
ei
,
&
exprval
);
hres
=
identifier_eval
(
ctx
->
parser
->
script
,
arg
,
&
exprval
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -1804,7 +1805,7 @@ static HRESULT interp_typeofident(exec_ctx_t *ctx)
TRACE
(
"%s
\n
"
,
debugstr_w
(
arg
));
hres
=
identifier_eval
(
ctx
->
parser
->
script
,
arg
,
0
,
ctx
->
ei
,
&
exprval
);
hres
=
identifier_eval
(
ctx
->
parser
->
script
,
arg
,
&
exprval
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
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