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
dc5a75a7
Commit
dc5a75a7
authored
Jan 10, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 10, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Fixed continue inside for..in statement.
parent
9575b906
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
7 deletions
+24
-7
compile.c
dlls/jscript/compile.c
+3
-6
lang.js
dlls/jscript/tests/lang.js
+21
-1
No files found.
dlls/jscript/compile.c
View file @
dc5a75a7
...
...
@@ -1237,18 +1237,15 @@ static HRESULT compile_forin_statement(compiler_ctx_t *ctx, forin_statement_t *s
static
HRESULT
pop_to_stat
(
compiler_ctx_t
*
ctx
,
statement_ctx_t
*
stat_ctx
)
{
statement_ctx_t
*
iter
=
ctx
->
stat_ctx
;
unsigned
stack_pop
=
0
;
statement_ctx_t
*
iter
;
while
(
iter
)
{
for
(
iter
=
ctx
->
stat_ctx
;
iter
!=
stat_ctx
;
iter
=
iter
->
next
)
{
if
(
iter
->
using_scope
&&
!
push_instr
(
ctx
,
OP_pop_scope
))
return
E_OUTOFMEMORY
;
if
(
iter
->
using_except
&&
!
push_instr
(
ctx
,
OP_pop_except
))
return
E_OUTOFMEMORY
;
stack_pop
+=
iter
->
stack_use
;
if
(
iter
==
stat_ctx
)
break
;
iter
=
iter
->
next
;
}
/* FIXME: optimize */
...
...
@@ -1308,7 +1305,7 @@ static HRESULT compile_break_statement(compiler_ctx_t *ctx, branch_statement_t *
if
(
stat
->
identifier
)
return
push_instr
(
ctx
,
OP_label
)
?
S_OK
:
E_OUTOFMEMORY
;
/* FIXME */
hres
=
pop_to_stat
(
ctx
,
pop_ctx
);
hres
=
pop_to_stat
(
ctx
,
pop_ctx
->
next
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/jscript/tests/lang.js
View file @
dc5a75a7
...
...
@@ -839,8 +839,8 @@ for(tmp in obj1.nonexistent)
ok
(
false
,
"for(tmp in obj1.nonexistent) called with tmp = "
+
tmp
);
ok
(
!
(
"nonexistent"
in
obj1
),
"nonexistent added to obj1 by for..in loop"
);
var
i
,
j
;
var
i
,
j
;
tmp
=
""
;
i
=
0
;
...
...
@@ -896,6 +896,26 @@ for(j in [1,2,3]) {
}
ok
(
tmp
===
"1234"
,
"tmp = "
+
tmp
);
tmp
=
0
;
for
(
var
iter
in
[
1
,
2
,
3
])
{
tmp
+=
+
iter
;
continue
;
}
ok
(
tmp
===
3
,
"tmp = "
+
tmp
);
tmp
=
false
;
for
(
var
iter
in
[
1
,
2
,
3
])
{
switch
(
+
iter
)
{
case
1
:
tmp
=
true
;
try
{
continue
;
}
finally
{}
default
:
continue
;
}
}
ok
(
tmp
,
"tmp = "
+
tmp
);
ok
((
void
1
)
===
undefined
,
"(void 1) !== undefined"
);
...
...
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