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
dd7a5301
Commit
dd7a5301
authored
Dec 30, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Make compiler responsible for proper return from regular code vs. eval-interpreted code.
parent
11ccf0f3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
9 deletions
+6
-9
compile.c
dlls/jscript/compile.c
+3
-1
engine.c
dlls/jscript/engine.c
+2
-7
engine.h
dlls/jscript/engine.h
+1
-1
No files found.
dlls/jscript/compile.c
View file @
dd7a5301
...
...
@@ -1688,7 +1688,7 @@ HRESULT compile_subscript(parser_ctx_t *parser, expression_t *expr, unsigned *re
return
push_instr
(
parser
->
compiler
,
OP_ret
)
==
-
1
?
E_OUTOFMEMORY
:
S_OK
;
}
HRESULT
compile_subscript_stat
(
parser_ctx_t
*
parser
,
statement_t
*
stat
,
unsigned
*
ret_off
)
HRESULT
compile_subscript_stat
(
parser_ctx_t
*
parser
,
statement_t
*
stat
,
BOOL
from_eval
,
unsigned
*
ret_off
)
{
unsigned
off
;
HRESULT
hres
;
...
...
@@ -1709,6 +1709,8 @@ HRESULT compile_subscript_stat(parser_ctx_t *parser, statement_t *stat, unsigned
resolve_labels
(
parser
->
compiler
,
off
);
if
(
!
from_eval
&&
push_instr
(
parser
->
compiler
,
OP_pop
)
==
-
1
)
return
E_OUTOFMEMORY
;
if
(
push_instr
(
parser
->
compiler
,
OP_ret
)
==
-
1
)
return
E_OUTOFMEMORY
;
...
...
dlls/jscript/engine.c
View file @
dd7a5301
...
...
@@ -2740,7 +2740,7 @@ HRESULT exec_source(exec_ctx_t *ctx, parser_ctx_t *parser, source_elements_t *so
if
(
source
->
statement
)
{
if
(
source
->
instr_off
==
-
1
)
{
hres
=
compile_subscript_stat
(
ctx
->
parser
,
source
->
statement
,
&
source
->
instr_off
);
hres
=
compile_subscript_stat
(
ctx
->
parser
,
source
->
statement
,
from_eval
,
&
source
->
instr_off
);
if
(
FAILED
(
hres
)
&&
is_jscript_error
(
hres
))
hres
=
throw_syntax_error
(
script
,
&
rt
.
ei
,
hres
,
NULL
);
}
...
...
@@ -2751,18 +2751,13 @@ HRESULT exec_source(exec_ctx_t *ctx, parser_ctx_t *parser, source_elements_t *so
script
->
exec_ctx
=
prev_ctx
;
ctx
->
parser
=
prev_parser
;
if
(
rt
.
type
!=
RT_NORMAL
&&
rt
.
type
!=
RT_RETURN
)
{
FIXME
(
"wrong rt %d
\n
"
,
rt
.
type
);
hres
=
E_FAIL
;
}
*
ei
=
rt
.
ei
;
if
(
FAILED
(
hres
))
{
VariantClear
(
&
val
);
return
hres
;
}
if
(
!
retv
||
(
!
from_eval
&&
rt
.
type
!=
RT_RETURN
)
)
if
(
!
retv
)
VariantClear
(
&
val
);
if
(
retv
)
*
retv
=
val
;
...
...
dlls/jscript/engine.h
View file @
dd7a5301
...
...
@@ -591,4 +591,4 @@ typedef struct {
}
property_value_expression_t
;
HRESULT
compile_subscript
(
parser_ctx_t
*
,
expression_t
*
,
unsigned
*
)
DECLSPEC_HIDDEN
;
HRESULT
compile_subscript_stat
(
parser_ctx_t
*
,
statement_t
*
,
unsigned
*
)
DECLSPEC_HIDDEN
;
HRESULT
compile_subscript_stat
(
parser_ctx_t
*
,
statement_t
*
,
BOOL
,
unsigned
*
)
DECLSPEC_HIDDEN
;
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