Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
b6b520e0
Commit
b6b520e0
authored
Jul 14, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 14, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added call_expression_eval implementation for EXPRVAL_VARIANT values.
parent
75cce3cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
6 deletions
+20
-6
engine.c
dlls/jscript/engine.c
+18
-6
lang.js
dlls/jscript/tests/lang.js
+2
-0
No files found.
dlls/jscript/engine.c
View file @
b6b520e0
...
...
@@ -1536,11 +1536,19 @@ HRESULT call_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD flags,
hres
=
args_to_param
(
ctx
,
expr
->
argument_list
,
ei
,
&
dp
);
if
(
SUCCEEDED
(
hres
))
{
switch
(
exprval
.
type
)
{
case
EXPRVAL_VARIANT
:
if
(
V_VT
(
&
exprval
.
u
.
var
)
!=
VT_DISPATCH
)
{
FIXME
(
"throw TypeError
\n
"
);
hres
=
E_NOTIMPL
;
break
;
}
hres
=
disp_call
(
V_DISPATCH
(
&
exprval
.
u
.
var
),
DISPID_VALUE
,
ctx
->
parser
->
script
->
lcid
,
DISPATCH_METHOD
,
&
dp
,
flags
&
EXPR_NOVAL
?
NULL
:
&
var
,
ei
,
NULL
/*FIXME*/
);
break
;
case
EXPRVAL_IDREF
:
hres
=
disp_call
(
exprval
.
u
.
idref
.
disp
,
exprval
.
u
.
idref
.
id
,
ctx
->
parser
->
script
->
lcid
,
DISPATCH_METHOD
,
&
dp
,
flags
&
EXPR_NOVAL
?
NULL
:
&
var
,
ei
,
NULL
/*FIXME*/
);
if
(
flags
&
EXPR_NOVAL
)
V_VT
(
&
var
)
=
VT_EMPTY
;
hres
=
disp_call
(
exprval
.
u
.
idref
.
disp
,
exprval
.
u
.
idref
.
id
,
ctx
->
parser
->
script
->
lcid
,
DISPATCH_METHOD
,
&
dp
,
flags
&
EXPR_NOVAL
?
NULL
:
&
var
,
ei
,
NULL
/*FIXME*/
);
break
;
default:
FIXME
(
"unimplemented type %d
\n
"
,
exprval
.
type
);
...
...
@@ -1554,9 +1562,13 @@ HRESULT call_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD flags,
if
(
FAILED
(
hres
))
return
hres
;
TRACE
(
"= %s
\n
"
,
debugstr_variant
(
&
var
));
ret
->
type
=
EXPRVAL_VARIANT
;
ret
->
u
.
var
=
var
;
if
(
flags
&
EXPR_NOVAL
)
{
V_VT
(
&
ret
->
u
.
var
)
=
VT_EMPTY
;
}
else
{
TRACE
(
"= %s
\n
"
,
debugstr_variant
(
&
var
));
ret
->
u
.
var
=
var
;
}
return
S_OK
;
}
...
...
dlls/jscript/tests/lang.js
View file @
b6b520e0
...
...
@@ -894,4 +894,6 @@ ok(""+str === "valueOf", "''+str = " + str);
str
.
valueOf
=
function
()
{
return
new
Date
();
}
ok
(
""
+
str
===
"test"
,
"''+str = "
+
str
);
ok
((
function
(){
return
1
;})()
===
1
,
"(function (){return 1;})() = "
+
(
function
(){
return
1
;})());
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