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
026bbea6
Commit
026bbea6
authored
Sep 10, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added block statement implementation.
parent
e7786d1d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
3 deletions
+34
-3
engine.c
dlls/jscript/engine.c
+28
-3
lang.js
dlls/jscript/tests/lang.js
+6
-0
No files found.
dlls/jscript/engine.c
View file @
026bbea6
...
...
@@ -478,10 +478,35 @@ static HRESULT identifier_eval(exec_ctx_t *ctx, BSTR identifier, DWORD flags, ex
return
E_FAIL
;
}
HRESULT
block_statement_eval
(
exec_ctx_t
*
ctx
,
statement_t
*
stat
,
return_type_t
*
rt
,
VARIANT
*
ret
)
/* ECMA-262 3rd Edition 12.1 */
HRESULT
block_statement_eval
(
exec_ctx_t
*
ctx
,
statement_t
*
_stat
,
return_type_t
*
rt
,
VARIANT
*
ret
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
block_statement_t
*
stat
=
(
block_statement_t
*
)
_stat
;
VARIANT
val
,
tmp
;
statement_t
*
iter
;
HRESULT
hres
=
S_OK
;
TRACE
(
"
\n
"
);
V_VT
(
&
val
)
=
VT_EMPTY
;
for
(
iter
=
stat
->
stat_list
;
iter
;
iter
=
iter
->
next
)
{
hres
=
stat_eval
(
ctx
,
iter
,
rt
,
&
tmp
);
if
(
FAILED
(
hres
))
break
;
VariantClear
(
&
val
);
val
=
tmp
;
if
(
rt
->
type
!=
RT_NORMAL
)
break
;
}
if
(
FAILED
(
hres
))
{
VariantClear
(
&
val
);
return
hres
;
}
*
ret
=
val
;
return
S_OK
;
}
/* ECMA-262 3rd Edition 12.2 */
...
...
dlls/jscript/tests/lang.js
View file @
026bbea6
...
...
@@ -144,4 +144,10 @@ var obj3 = { prop1: 1, prop2: typeof(false) };
ok
(
obj3
.
prop1
===
1
,
"obj3.prop1 is not 1"
);
ok
(
obj3
.
prop2
===
"boolean"
,
"obj3.prop2 is not
\"
boolean
\"
"
);
{
var
blockVar
=
1
;
blockVar
=
2
;
}
ok
(
blockVar
===
2
,
"blockVar !== 2"
);
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