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
2f3e27f0
Commit
2f3e27f0
authored
Dec 19, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Use bytecode for execution main code block in exec_source.
parent
f6023c42
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
compile.c
dlls/jscript/compile.c
+5
-2
engine.c
dlls/jscript/engine.c
+7
-12
engine.h
dlls/jscript/engine.h
+1
-1
No files found.
dlls/jscript/compile.c
View file @
2f3e27f0
...
...
@@ -931,7 +931,7 @@ HRESULT compile_subscript(parser_ctx_t *parser, expression_t *expr, BOOL do_ret,
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
compile_block
,
unsigned
*
ret_off
)
{
HRESULT
hres
;
...
...
@@ -942,7 +942,10 @@ HRESULT compile_subscript_stat(parser_ctx_t *parser, statement_t *stat, unsigned
return
hres
;
*
ret_off
=
parser
->
compiler
->
code_off
;
hres
=
compile_statement
(
parser
->
compiler
,
stat
);
if
(
compile_block
&&
stat
->
next
)
hres
=
compile_block_statement
(
parser
->
compiler
,
stat
);
else
hres
=
compile_statement
(
parser
->
compiler
,
stat
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/jscript/engine.c
View file @
2f3e27f0
...
...
@@ -513,8 +513,7 @@ HRESULT exec_source(exec_ctx_t *ctx, parser_ctx_t *parser, source_elements_t *so
function_declaration_t
*
func
;
parser_ctx_t
*
prev_parser
;
var_list_t
*
var
;
VARIANT
val
,
tmp
;
statement_t
*
stat
;
VARIANT
val
;
exec_ctx_t
*
prev_ctx
;
return_type_t
rt
;
HRESULT
hres
=
S_OK
;
...
...
@@ -560,15 +559,11 @@ HRESULT exec_source(exec_ctx_t *ctx, parser_ctx_t *parser, source_elements_t *so
memset
(
&
rt
,
0
,
sizeof
(
rt
));
rt
.
type
=
RT_NORMAL
;
for
(
stat
=
source
->
statement
;
stat
;
stat
=
stat
->
next
)
{
hres
=
stat_eval
(
script
,
stat
,
&
rt
,
&
tmp
);
if
(
FAILED
(
hres
))
break
;
VariantClear
(
&
val
);
val
=
tmp
;
if
(
rt
.
type
!=
RT_NORMAL
)
break
;
if
(
source
->
statement
)
{
if
(
source
->
statement
->
instr_off
==
-
1
)
hres
=
compile_subscript_stat
(
ctx
->
parser
,
source
->
statement
,
TRUE
,
&
source
->
statement
->
instr_off
);
if
(
SUCCEEDED
(
hres
))
hres
=
compiled_statement_eval
(
script
,
source
->
statement
,
&
rt
,
&
val
);
}
script
->
exec_ctx
=
prev_ctx
;
...
...
@@ -3005,7 +3000,7 @@ HRESULT compiled_statement_eval(script_ctx_t *ctx, statement_t *stat, return_typ
TRACE
(
"
\n
"
);
if
(
stat
->
instr_off
==
-
1
)
{
hres
=
compile_subscript_stat
(
exec_ctx
->
parser
,
stat
,
&
stat
->
instr_off
);
hres
=
compile_subscript_stat
(
exec_ctx
->
parser
,
stat
,
FALSE
,
&
stat
->
instr_off
);
if
(
FAILED
(
hres
))
return
hres
;
}
...
...
dlls/jscript/engine.h
View file @
2f3e27f0
...
...
@@ -590,4 +590,4 @@ typedef struct {
}
property_value_expression_t
;
HRESULT
compile_subscript
(
parser_ctx_t
*
,
expression_t
*
,
BOOL
,
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