Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
0b50c32c
Commit
0b50c32c
authored
13 years ago
by
Jacek Caban
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
jscript: Use bytecode for void expression.
parent
83667e74
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dlls/jscript/compile.c
+2
-0
2 additions, 0 deletions
dlls/jscript/compile.c
dlls/jscript/engine.c
+5
-18
5 additions, 18 deletions
dlls/jscript/engine.c
dlls/jscript/engine.h
+2
-2
2 additions, 2 deletions
dlls/jscript/engine.h
dlls/jscript/parser.y
+1
-1
1 addition, 1 deletion
dlls/jscript/parser.y
with
10 additions
and
21 deletions
dlls/jscript/compile.c
+
2
−
0
View file @
0b50c32c
...
...
@@ -225,6 +225,8 @@ static HRESULT compile_expression(compiler_ctx_t *ctx, expression_t *expr)
return
compile_unary_expression
(
ctx
,
(
unary_expression_t
*
)
expr
,
OP_tonum
);
case
EXPR_THIS
:
return
push_instr
(
ctx
,
OP_this
)
==
-
1
?
E_OUTOFMEMORY
:
S_OK
;
case
EXPR_VOID
:
return
compile_unary_expression
(
ctx
,
(
unary_expression_t
*
)
expr
,
OP_void
);
default:
assert
(
expr
->
eval
!=
compiled_expression_eval
);
return
compile_interp_fallback
(
ctx
,
expr
);
...
...
This diff is collapsed.
Click to expand it.
dlls/jscript/engine.c
+
5
−
18
View file @
0b50c32c
...
...
@@ -2459,29 +2459,16 @@ HRESULT delete_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD fla
}
/* ECMA-262 3rd Edition 11.4.2 */
HRESULT
void
_
ex
pression_eval
(
script_ctx_t
*
ctx
,
expression_t
*
_expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
HRESULT
interp_
void
(
ex
ec_ctx_t
*
ctx
)
{
unary_expression_t
*
expr
=
(
unary_expression_t
*
)
_expr
;
exprval_t
exprval
;
VARIANT
tmp
;
HRESULT
hres
;
VARIANT
v
;
TRACE
(
"
\n
"
);
hres
=
expr_eval
(
ctx
,
expr
->
expression
,
0
,
ei
,
&
exprval
);
if
(
FAILED
(
hres
))
return
hres
;
stack_popn
(
ctx
,
1
);
hres
=
exprval_to_value
(
ctx
,
&
exprval
,
ei
,
&
tmp
);
exprval_release
(
&
exprval
);
if
(
FAILED
(
hres
))
return
hres
;
VariantClear
(
&
tmp
);
ret
->
type
=
EXPRVAL_VARIANT
;
V_VT
(
&
ret
->
u
.
var
)
=
VT_EMPTY
;
return
S_OK
;
V_VT
(
&
v
)
=
VT_EMPTY
;
return
stack_push
(
ctx
,
&
v
);
}
/* ECMA-262 3rd Edition 11.4.3 */
...
...
This diff is collapsed.
Click to expand it.
dlls/jscript/engine.h
+
2
−
2
View file @
0b50c32c
...
...
@@ -57,7 +57,8 @@ typedef struct _func_stack {
X(this, 1, 0,0) \
X(tonum, 1, 0,0) \
X(tree, 1, ARG_EXPR, 0) \
X(ret, 0, 0,0)
X(ret, 0, 0,0) \
X(void, 1, 0,0)
typedef
enum
{
#define X(x,a,b,c) OP_##x,
...
...
@@ -545,7 +546,6 @@ HRESULT mul_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprva
HRESULT
div_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
mod_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
delete_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
void_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
typeof_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
minus_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
post_increment_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
...
...
This diff is collapsed.
Click to expand it.
dlls/jscript/parser.y
+
1
−
1
View file @
0b50c32c
...
...
@@ -1319,7 +1319,7 @@ static const expression_eval_t expression_eval_table[] = {
div_expression_eval,
mod_expression_eval,
delete_expression_eval,
voi
d_expression_eval,
compile
d_expression_eval,
typeof_expression_eval,
minus_expression_eval,
compiled_expression_eval,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment