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
e5a31cc2
Commit
e5a31cc2
authored
Dec 01, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Use bytecode for '<' expression implementation.
parent
39b7e6e5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
compile.c
dlls/jscript/compile.c
+2
-0
engine.c
dlls/jscript/engine.c
+9
-11
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 @
e5a31cc2
...
@@ -408,6 +408,8 @@ static HRESULT compile_expression(compiler_ctx_t *ctx, expression_t *expr)
...
@@ -408,6 +408,8 @@ static HRESULT compile_expression(compiler_ctx_t *ctx, expression_t *expr)
return
push_instr_bstr
(
ctx
,
OP_ident
,
((
identifier_expression_t
*
)
expr
)
->
identifier
);
return
push_instr_bstr
(
ctx
,
OP_ident
,
((
identifier_expression_t
*
)
expr
)
->
identifier
);
case
EXPR_IN
:
case
EXPR_IN
:
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_in
);
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_in
);
case
EXPR_LESS
:
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_lt
);
case
EXPR_LITERAL
:
case
EXPR_LITERAL
:
return
compile_literal
(
ctx
,
((
literal_expression_t
*
)
expr
)
->
literal
);
return
compile_literal
(
ctx
,
((
literal_expression_t
*
)
expr
)
->
literal
);
case
EXPR_LOGNEG
:
case
EXPR_LOGNEG
:
...
...
dlls/jscript/engine.c
View file @
e5a31cc2
...
@@ -3016,26 +3016,24 @@ static HRESULT less_eval(script_ctx_t *ctx, VARIANT *lval, VARIANT *rval, BOOL g
...
@@ -3016,26 +3016,24 @@ static HRESULT less_eval(script_ctx_t *ctx, VARIANT *lval, VARIANT *rval, BOOL g
}
}
/* ECMA-262 3rd Edition 11.8.1 */
/* ECMA-262 3rd Edition 11.8.1 */
HRESULT
less_expression_eval
(
script_ctx_t
*
ctx
,
expression_t
*
_expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
static
HRESULT
interp_lt
(
exec_ctx_t
*
ctx
)
{
{
binary_expression_t
*
expr
=
(
binary_expression_t
*
)
_expr
;
VARIANT
*
l
,
*
r
;
VARIANT
rval
,
lval
;
BOOL
b
;
BOOL
b
;
HRESULT
hres
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
r
=
stack_pop
(
ctx
);
l
=
stack_pop
(
ctx
);
hres
=
get_binary_expr_values
(
ctx
,
expr
,
ei
,
&
lval
,
&
rval
);
TRACE
(
"%s < %s
\n
"
,
debugstr_variant
(
l
),
debugstr_variant
(
r
));
if
(
FAILED
(
hres
))
return
hres
;
hres
=
less_eval
(
ctx
,
&
lval
,
&
rval
,
FALSE
,
ei
,
&
b
);
hres
=
less_eval
(
ctx
->
parser
->
script
,
l
,
r
,
FALSE
,
&
ctx
->
ei
,
&
b
);
VariantClear
(
&
lva
l
);
VariantClear
(
l
);
VariantClear
(
&
rval
);
VariantClear
(
r
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
return
return_bool
(
ret
,
b
);
return
stack_push_bool
(
ctx
,
b
);
}
}
/* ECMA-262 3rd Edition 11.8.3 */
/* ECMA-262 3rd Edition 11.8.3 */
...
...
dlls/jscript/engine.h
View file @
e5a31cc2
...
@@ -56,6 +56,7 @@ typedef struct _func_stack {
...
@@ -56,6 +56,7 @@ typedef struct _func_stack {
X(jmp, 0, ARG_ADDR, 0) \
X(jmp, 0, ARG_ADDR, 0) \
X(jmp_nz, 0, ARG_ADDR, 0) \
X(jmp_nz, 0, ARG_ADDR, 0) \
X(jmp_z, 0, ARG_ADDR, 0) \
X(jmp_z, 0, ARG_ADDR, 0) \
X(lt, 1, 0,0) \
X(minus, 1, 0,0) \
X(minus, 1, 0,0) \
X(mod, 1, 0,0) \
X(mod, 1, 0,0) \
X(mul, 1, 0,0) \
X(mul, 1, 0,0) \
...
@@ -560,7 +561,6 @@ HRESULT post_increment_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcep
...
@@ -560,7 +561,6 @@ HRESULT post_increment_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcep
HRESULT
post_decrement_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
post_decrement_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
pre_increment_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
pre_increment_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
pre_decrement_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
pre_decrement_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
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
;
HRESULT
greater_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
greatereq_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
greatereq_expression_eval
(
script_ctx_t
*
,
expression_t
*
,
DWORD
,
jsexcept_t
*
,
exprval_t
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/jscript/parser.y
View file @
e5a31cc2
...
@@ -1331,7 +1331,7 @@ static const expression_eval_t expression_eval_table[] = {
...
@@ -1331,7 +1331,7 @@ static const expression_eval_t expression_eval_table[] = {
compiled_expression_eval,
compiled_expression_eval,
compiled_expression_eval,
compiled_expression_eval,
compiled_expression_eval,
compiled_expression_eval,
less
_expression_eval,
compiled
_expression_eval,
lesseq_expression_eval,
lesseq_expression_eval,
greater_expression_eval,
greater_expression_eval,
greatereq_expression_eval,
greatereq_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