Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b1b0aada
Commit
b1b0aada
authored
Nov 22, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Use bytecode for '+' expression implementation.
parent
dcca57fd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
6 deletions
+16
-6
compile.c
dlls/jscript/compile.c
+2
-0
engine.c
dlls/jscript/engine.c
+12
-4
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 @
b1b0aada
...
...
@@ -107,6 +107,8 @@ static HRESULT compile_interp_fallback(compiler_ctx_t *ctx, expression_t *expr)
static
HRESULT
compile_expression
(
compiler_ctx_t
*
ctx
,
expression_t
*
expr
)
{
switch
(
expr
->
type
)
{
case
EXPR_ADD
:
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_add
);
case
EXPR_BITNEG
:
return
compile_unary_expression
(
ctx
,
(
unary_expression_t
*
)
expr
,
OP_bneg
);
case
EXPR_EQEQ
:
...
...
dlls/jscript/engine.c
View file @
b1b0aada
...
...
@@ -2213,13 +2213,21 @@ static HRESULT add_eval(script_ctx_t *ctx, VARIANT *lval, VARIANT *rval, jsexcep
}
/* ECMA-262 3rd Edition 11.6.1 */
HRESULT
add_expression_eval
(
script_ctx_t
*
ctx
,
expression_t
*
_expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
HRESULT
interp_add
(
exec_ctx_t
*
ctx
)
{
binary_expression_t
*
expr
=
(
binary_expression_t
*
)
_expr
;
VARIANT
*
l
,
*
r
,
ret
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
r
=
stack_pop
(
ctx
);
l
=
stack_pop
(
ctx
);
TRACE
(
"%s + %s
\n
"
,
debugstr_variant
(
l
),
debugstr_variant
(
r
));
hres
=
add_eval
(
ctx
->
parser
->
script
,
l
,
r
,
&
ctx
->
ei
,
&
ret
);
if
(
FAILED
(
hres
))
return
hres
;
return
binary_expr_eval
(
ctx
,
expr
,
add_eval
,
ei
,
ret
);
return
stack_push
(
ctx
,
&
ret
);
}
/* ECMA-262 3rd Edition 11.6.2 */
...
...
dlls/jscript/engine.h
View file @
b1b0aada
...
...
@@ -42,6 +42,7 @@ typedef struct _func_stack {
}
func_stack_t
;
#define OP_LIST \
X(add, 1, 0) \
X(bneg, 1, 0) \
X(eq2, 1, 0) \
X(neg, 1, 0) \
...
...
@@ -529,7 +530,6 @@ HRESULT binary_xor_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*
HRESULT
binary_and_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
instanceof_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
in_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
add_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
sub_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
mul_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
div_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/jscript/parser.y
View file @
b1b0aada
...
...
@@ -1313,7 +1313,7 @@ static const expression_eval_t expression_eval_table[] = {
binary_and_expression_eval,
instanceof_expression_eval,
in_expression_eval,
ad
d_expression_eval,
compile
d_expression_eval,
sub_expression_eval,
mul_expression_eval,
div_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