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
d55aa556
Commit
d55aa556
authored
Sep 22, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added interp_step implementation.
parent
aad75892
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
2 deletions
+39
-2
interp.c
dlls/vbscript/interp.c
+39
-2
No files found.
dlls/vbscript/interp.c
View file @
d55aa556
...
...
@@ -245,6 +245,12 @@ static inline VARIANT *stack_pop(exec_ctx_t *ctx)
return
ctx
->
stack
+
--
ctx
->
top
;
}
static
inline
VARIANT
*
stack_top
(
exec_ctx_t
*
ctx
,
unsigned
n
)
{
assert
(
ctx
->
top
>=
n
);
return
ctx
->
stack
+
(
ctx
->
top
-
n
-
1
);
}
static
HRESULT
stack_push
(
exec_ctx_t
*
ctx
,
VARIANT
*
v
)
{
if
(
ctx
->
stack_size
==
ctx
->
top
)
{
...
...
@@ -745,8 +751,39 @@ static HRESULT interp_new(exec_ctx_t *ctx)
static
HRESULT
interp_step
(
exec_ctx_t
*
ctx
)
{
const
BSTR
ident
=
ctx
->
instr
->
arg2
.
bstr
;
FIXME
(
"%s
\n
"
,
debugstr_w
(
ident
));
return
E_NOTIMPL
;
BOOL
gteq_zero
;
VARIANT
zero
;
ref_t
ref
;
HRESULT
hres
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
ident
));
V_VT
(
&
zero
)
=
VT_I2
;
V_I2
(
&
zero
)
=
0
;
hres
=
VarCmp
(
stack_top
(
ctx
,
0
),
&
zero
,
ctx
->
script
->
lcid
,
0
);
if
(
FAILED
(
hres
))
return
hres
;
gteq_zero
=
hres
==
VARCMP_GT
||
hres
==
VARCMP_EQ
;
hres
=
lookup_identifier
(
ctx
,
ident
,
VBDISP_ANY
,
&
ref
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
ref
.
type
!=
REF_VAR
)
{
FIXME
(
"%s is not REF_VAR
\n
"
,
debugstr_w
(
ident
));
return
E_FAIL
;
}
hres
=
VarCmp
(
ref
.
u
.
v
,
stack_top
(
ctx
,
1
),
ctx
->
script
->
lcid
,
0
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
hres
==
VARCMP_EQ
||
hres
==
(
gteq_zero
?
VARCMP_LT
:
VARCMP_GT
))
ctx
->
instr
++
;
else
instr_jmp
(
ctx
,
ctx
->
instr
->
arg1
.
uint
);
return
S_OK
;
}
static
HRESULT
interp_jmp
(
exec_ctx_t
*
ctx
)
...
...
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