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
50c7c4b7
Commit
50c7c4b7
authored
Sep 11, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added '+=' expression implementation.
parent
7dddf097
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
3 deletions
+52
-3
engine.c
dlls/jscript/engine.c
+48
-3
lang.js
dlls/jscript/tests/lang.js
+4
-0
No files found.
dlls/jscript/engine.c
View file @
50c7c4b7
...
@@ -785,6 +785,47 @@ static HRESULT binary_expr_eval(exec_ctx_t *ctx, binary_expression_t *expr, oper
...
@@ -785,6 +785,47 @@ static HRESULT binary_expr_eval(exec_ctx_t *ctx, binary_expression_t *expr, oper
return
S_OK
;
return
S_OK
;
}
}
/* ECMA-262 3rd Edition 11.13.2 */
static
HRESULT
assign_oper_eval
(
exec_ctx_t
*
ctx
,
expression_t
*
lexpr
,
expression_t
*
rexpr
,
oper_t
oper
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
{
VARIANT
retv
,
lval
,
rval
;
exprval_t
exprval
,
exprvalr
;
HRESULT
hres
;
hres
=
expr_eval
(
ctx
,
lexpr
,
EXPR_NEWREF
,
ei
,
&
exprval
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
exprval_value
(
ctx
->
parser
->
script
,
&
exprval
,
ei
,
&
lval
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
expr_eval
(
ctx
,
rexpr
,
0
,
ei
,
&
exprvalr
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
exprval_value
(
ctx
->
parser
->
script
,
&
exprvalr
,
ei
,
&
rval
);
exprval_release
(
&
exprvalr
);
}
if
(
SUCCEEDED
(
hres
))
{
hres
=
oper
(
ctx
,
&
lval
,
&
rval
,
ei
,
&
retv
);
VariantClear
(
&
rval
);
}
VariantClear
(
&
lval
);
}
if
(
SUCCEEDED
(
hres
))
{
hres
=
put_value
(
ctx
->
parser
->
script
,
&
exprval
,
&
retv
,
ei
);
if
(
FAILED
(
hres
))
VariantClear
(
&
retv
);
}
exprval_release
(
&
exprval
);
if
(
FAILED
(
hres
))
return
hres
;
ret
->
type
=
EXPRVAL_VARIANT
;
ret
->
u
.
var
=
retv
;
return
S_OK
;
}
/* ECMA-262 3rd Edition 13 */
/* ECMA-262 3rd Edition 13 */
HRESULT
function_expression_eval
(
exec_ctx_t
*
ctx
,
expression_t
*
_expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
HRESULT
function_expression_eval
(
exec_ctx_t
*
ctx
,
expression_t
*
_expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
{
{
...
@@ -1624,10 +1665,14 @@ HRESULT assign_rrshift_expression_eval(exec_ctx_t *ctx, expression_t *expr, DWOR
...
@@ -1624,10 +1665,14 @@ HRESULT assign_rrshift_expression_eval(exec_ctx_t *ctx, expression_t *expr, DWOR
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
HRESULT
assign_add_expression_eval
(
exec_ctx_t
*
ctx
,
expression_t
*
expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
/* ECMA-262 3rd Edition 11.13.2 */
HRESULT
assign_add_expression_eval
(
exec_ctx_t
*
ctx
,
expression_t
*
_expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
{
{
FIXME
(
"
\n
"
);
binary_expression_t
*
expr
=
(
binary_expression_t
*
)
_expr
;
return
E_NOTIMPL
;
TRACE
(
"
\n
"
);
return
assign_oper_eval
(
ctx
,
expr
->
expression1
,
expr
->
expression2
,
add_eval
,
ei
,
ret
);
}
}
HRESULT
assign_sub_expression_eval
(
exec_ctx_t
*
ctx
,
expression_t
*
expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
HRESULT
assign_sub_expression_eval
(
exec_ctx_t
*
ctx
,
expression_t
*
expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
...
...
dlls/jscript/tests/lang.js
View file @
50c7c4b7
...
@@ -176,4 +176,8 @@ ok(getVT(tmp) === "VT_I4", "getVT(1.5+2.5) !== VT_I4");
...
@@ -176,4 +176,8 @@ ok(getVT(tmp) === "VT_I4", "getVT(1.5+2.5) !== VT_I4");
tmp
=
"ab"
+
"cd"
;
tmp
=
"ab"
+
"cd"
;
ok
(
tmp
===
"abcd"
,
"
\"
ab
\"
+
\"
cd
\"
!==
\"
abcd
\"
"
);
ok
(
tmp
===
"abcd"
,
"
\"
ab
\"
+
\"
cd
\"
!==
\"
abcd
\"
"
);
tmp
=
1
;
ok
((
tmp
+=
1
)
===
2
,
"tmp += 1 !== 2"
);
ok
(
tmp
===
2
,
"tmp !== 2"
);
reportSuccess
();
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