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
32602170
Commit
32602170
authored
Nov 18, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Use bytecode interpreter for '!==' expressions.
parent
b473f5d5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
12 deletions
+13
-12
compile.c
dlls/jscript/compile.c
+3
-0
engine.c
dlls/jscript/engine.c
+8
-10
engine.h
dlls/jscript/engine.h
+1
-1
parser.y
dlls/jscript/parser.y
+1
-1
No files found.
dlls/jscript/compile.c
View file @
32602170
...
...
@@ -98,7 +98,10 @@ static HRESULT compile_expression(compiler_ctx_t *ctx, expression_t *expr)
switch
(
expr
->
type
)
{
case
EXPR_EQEQ
:
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_eq2
);
case
EXPR_NOTEQEQ
:
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_neq2
);
default:
assert
(
expr
->
eval
!=
compiled_expression_eval
);
return
compile_interp_fallback
(
ctx
,
expr
);
}
...
...
dlls/jscript/engine.c
View file @
32602170
...
...
@@ -2864,26 +2864,24 @@ HRESULT not_equal_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD
}
/* ECMA-262 3rd Edition 11.9.5 */
HRESULT
not_equal2_expression_eval
(
script_ctx_t
*
ctx
,
expression_t
*
_expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
static
HRESULT
interp_neq2
(
exec_ctx_t
*
ctx
)
{
binary_expression_t
*
expr
=
(
binary_expression_t
*
)
_expr
;
VARIANT
rval
,
lval
;
VARIANT
*
l
,
*
r
;
BOOL
b
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
hres
=
get_binary_expr_values
(
ctx
,
expr
,
ei
,
&
lval
,
&
rval
);
if
(
FAILED
(
hres
))
return
hres
;
r
=
stack_pop
(
ctx
);
l
=
stack_pop
(
ctx
);
hres
=
equal2_values
(
&
lval
,
&
rva
l
,
&
b
);
VariantClear
(
&
lva
l
);
VariantClear
(
&
rval
);
hres
=
equal2_values
(
r
,
l
,
&
b
);
VariantClear
(
l
);
VariantClear
(
r
);
if
(
FAILED
(
hres
))
return
hres
;
return
return_bool
(
ret
,
!
b
);
return
stack_push_bool
(
ctx
,
!
b
);
}
/* ECMA-262 3rd Edition 11.8.5 */
...
...
dlls/jscript/engine.h
View file @
32602170
...
...
@@ -43,6 +43,7 @@ typedef struct _func_stack {
#define OP_LIST \
X(eq2, 1, 0) \
X(neq2, 1, 0) \
X(tree, 1, ARG_EXPR) \
X(ret, 0, 0)
...
...
@@ -541,7 +542,6 @@ HRESULT pre_increment_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept
HRESULT
pre_decrement_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
equal_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
not_equal_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
not_equal2_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
less_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
lesseq_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
greater_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/jscript/parser.y
View file @
32602170
...
...
@@ -1330,7 +1330,7 @@ static const expression_eval_t expression_eval_table[] = {
equal_expression_eval,
compiled_expression_eval,
not_equal_expression_eval,
not_equal2
_expression_eval,
compiled
_expression_eval,
less_expression_eval,
lesseq_expression_eval,
greater_expression_eval,
...
...
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