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
53ecdb65
Commit
53ecdb65
authored
Mar 25, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added new helpers for jumps.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
132ff14d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
12 deletions
+22
-12
engine.c
dlls/jscript/engine.c
+22
-12
No files found.
dlls/jscript/engine.c
View file @
53ecdb65
...
...
@@ -587,6 +587,16 @@ static inline double get_op_double(exec_ctx_t *ctx){
return
ctx
->
script
->
call_ctx
->
bytecode
->
instrs
[
ctx
->
ip
].
u
.
dbl
;
}
static
inline
void
jmp_next
(
exec_ctx_t
*
ctx
)
{
ctx
->
ip
++
;
}
static
inline
void
jmp_abs
(
exec_ctx_t
*
ctx
,
unsigned
dst
)
{
ctx
->
ip
=
dst
;
}
/* ECMA-262 3rd Edition 12.2 */
static
HRESULT
interp_var_set
(
exec_ctx_t
*
ctx
)
{
...
...
@@ -656,10 +666,10 @@ static HRESULT interp_forin(exec_ctx_t *ctx)
if
(
FAILED
(
hres
))
return
hres
;
ctx
->
ip
++
;
jmp_next
(
ctx
)
;
}
else
{
stack_popn
(
ctx
,
4
);
ctx
->
ip
=
arg
;
jmp_abs
(
ctx
,
arg
)
;
}
return
S_OK
;
}
...
...
@@ -711,9 +721,9 @@ static HRESULT interp_case(exec_ctx_t *ctx)
if
(
b
)
{
stack_popn
(
ctx
,
1
);
ctx
->
ip
=
arg
;
jmp_abs
(
ctx
,
arg
)
;
}
else
{
ctx
->
ip
++
;
jmp_next
(
ctx
)
;
}
return
S_OK
;
}
...
...
@@ -1260,10 +1270,10 @@ static HRESULT interp_cnd_nz(exec_ctx_t *ctx)
return
hres
;
if
(
b
)
{
ctx
->
ip
=
arg
;
jmp_abs
(
ctx
,
arg
)
;
}
else
{
stack_popn
(
ctx
,
1
);
ctx
->
ip
++
;
jmp_next
(
ctx
)
;
}
return
S_OK
;
}
...
...
@@ -1283,9 +1293,9 @@ static HRESULT interp_cnd_z(exec_ctx_t *ctx)
if
(
b
)
{
stack_popn
(
ctx
,
1
);
ctx
->
ip
++
;
jmp_next
(
ctx
)
;
}
else
{
ctx
->
ip
=
arg
;
jmp_abs
(
ctx
,
arg
)
;
}
return
S_OK
;
}
...
...
@@ -2327,7 +2337,7 @@ static HRESULT interp_jmp(exec_ctx_t *ctx)
TRACE
(
"%u
\n
"
,
arg
);
ctx
->
ip
=
arg
;
jmp_abs
(
ctx
,
arg
)
;
return
S_OK
;
}
...
...
@@ -2347,9 +2357,9 @@ static HRESULT interp_jmp_z(exec_ctx_t *ctx)
return
hres
;
if
(
b
)
ctx
->
ip
++
;
jmp_next
(
ctx
)
;
else
ctx
->
ip
=
arg
;
jmp_abs
(
ctx
,
arg
)
;
return
S_OK
;
}
...
...
@@ -2367,7 +2377,7 @@ static HRESULT interp_ret(exec_ctx_t *ctx)
{
TRACE
(
"
\n
"
);
ctx
->
ip
=
-
1
;
jmp_abs
(
ctx
,
-
1
)
;
return
S_OK
;
}
...
...
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