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
6b1077e2
Commit
6b1077e2
authored
Dec 16, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Invoke bytecode directly from expr_eval.
parent
fecc2fcb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
22 deletions
+8
-22
engine.c
dlls/jscript/engine.c
+8
-20
engine.h
dlls/jscript/engine.h
+0
-2
No files found.
dlls/jscript/engine.c
View file @
6b1077e2
...
...
@@ -54,10 +54,7 @@ static inline HRESULT stat_eval(script_ctx_t *ctx, statement_t *stat, return_typ
return
stat
->
eval
(
ctx
,
stat
,
rt
,
ret
);
}
static
inline
HRESULT
expr_eval
(
script_ctx_t
*
ctx
,
expression_t
*
expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
{
return
compiled_expression_eval
(
ctx
,
expr
,
flags
,
ei
,
ret
);
}
static
HRESULT
expr_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
);
static
HRESULT
stack_push
(
exec_ctx_t
*
ctx
,
VARIANT
*
v
)
{
...
...
@@ -3122,7 +3119,7 @@ OP_LIST
#undef X
};
static
HRESULT
interp_expression
_eval
(
script_ctx_t
*
ctx
,
expression_t
*
expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
static
HRESULT
expr
_eval
(
script_ctx_t
*
ctx
,
expression_t
*
expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
{
exec_ctx_t
*
exec_ctx
=
ctx
->
exec_ctx
;
unsigned
prev_ip
,
prev_top
;
...
...
@@ -3131,6 +3128,12 @@ static HRESULT interp_expression_eval(script_ctx_t *ctx, expression_t *expr, DWO
TRACE
(
"
\n
"
);
if
(
expr
->
instr_off
==
-
1
)
{
hres
=
compile_subscript
(
ctx
->
exec_ctx
->
parser
,
expr
,
!
(
flags
&
EXPR_NOVAL
),
&
expr
->
instr_off
);
if
(
FAILED
(
hres
))
return
hres
;
}
prev_top
=
exec_ctx
->
top
;
prev_ip
=
exec_ctx
->
ip
;
exec_ctx
->
ip
=
expr
->
instr_off
;
...
...
@@ -3161,18 +3164,3 @@ static HRESULT interp_expression_eval(script_ctx_t *ctx, expression_t *expr, DWO
ret
->
u
.
var
=
*
stack_pop
(
exec_ctx
);
return
S_OK
;
}
HRESULT
compiled_expression_eval
(
script_ctx_t
*
ctx
,
expression_t
*
expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
{
HRESULT
hres
;
TRACE
(
"
\n
"
);
if
(
expr
->
instr_off
==
-
1
)
{
hres
=
compile_subscript
(
ctx
->
exec_ctx
->
parser
,
expr
,
!
(
flags
&
EXPR_NOVAL
),
&
expr
->
instr_off
);
if
(
FAILED
(
hres
))
return
hres
;
}
return
interp_expression_eval
(
ctx
,
expr
,
flags
,
ei
,
ret
);
}
dlls/jscript/engine.h
View file @
6b1077e2
...
...
@@ -567,6 +567,4 @@ typedef struct {
prop_val_t
*
property_list
;
}
property_value_expression_t
;
HRESULT
compiled_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
compile_subscript
(
parser_ctx_t
*
,
expression_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