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
13d96df4
Commit
13d96df4
authored
Nov 23, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Use bytecode for bool literal implementation.
parent
b3feafab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
compile.c
dlls/jscript/compile.c
+2
-0
engine.c
dlls/jscript/engine.c
+10
-0
engine.h
dlls/jscript/engine.h
+1
-0
No files found.
dlls/jscript/compile.c
View file @
13d96df4
...
...
@@ -121,6 +121,8 @@ static HRESULT compile_literal(compiler_ctx_t *ctx, literal_expression_t *expr)
literal_t
*
literal
=
expr
->
literal
;
switch
(
literal
->
type
)
{
case
LT_BOOL
:
return
push_instr_int
(
ctx
,
OP_bool
,
literal
->
u
.
bval
);
case
LT_INT
:
return
push_instr_int
(
ctx
,
OP_int
,
literal
->
u
.
lval
);
default:
...
...
dlls/jscript/engine.c
View file @
13d96df4
...
...
@@ -1724,6 +1724,16 @@ HRESULT identifier_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD
return
hres
;
}
/* ECMA-262 3rd Edition 7.8.2 */
HRESULT
interp_bool
(
exec_ctx_t
*
ctx
)
{
const
LONG
arg
=
ctx
->
parser
->
code
->
instrs
[
ctx
->
ip
].
arg1
.
lng
;
TRACE
(
"%s
\n
"
,
arg
?
"true"
:
"false"
);
return
stack_push_bool
(
ctx
,
arg
);
}
/* ECMA-262 3rd Edition 7.8.3 */
HRESULT
interp_int
(
exec_ctx_t
*
ctx
)
{
...
...
dlls/jscript/engine.h
View file @
13d96df4
...
...
@@ -43,6 +43,7 @@ typedef struct _func_stack {
#define OP_LIST \
X(add, 1, 0) \
X(bool, 1, 0) \
X(bneg, 1, 0) \
X(eq2, 1, 0) \
X(in, 1, 0) \
...
...
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