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
edd5ca71
Commit
edd5ca71
authored
Dec 27, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added compiler support for parametrized assignment statements.
parent
b54f3e71
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
12 deletions
+37
-12
compile.c
dlls/vbscript/compile.c
+9
-8
interp.c
dlls/vbscript/interp.c
+24
-0
vbscript.h
dlls/vbscript/vbscript.h
+4
-4
No files found.
dlls/vbscript/compile.c
View file @
edd5ca71
...
...
@@ -687,28 +687,29 @@ static HRESULT compile_forto_statement(compile_ctx_t *ctx, forto_statement_t *st
static
HRESULT
compile_assign_statement
(
compile_ctx_t
*
ctx
,
assign_statement_t
*
stat
,
BOOL
is_set
)
{
unsigned
args_cnt
;
vbsop_t
op
;
HRESULT
hres
;
hres
=
compile_expression
(
ctx
,
stat
->
value_expr
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
stat
->
member_expr
->
args
)
{
FIXME
(
"arguments support not implemented
\n
"
);
return
E_NOTIMPL
;
}
if
(
stat
->
member_expr
->
obj_expr
)
{
hres
=
compile_expression
(
ctx
,
stat
->
member_expr
->
obj_expr
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
push_instr_bstr
(
ctx
,
is_set
?
OP_set_member
:
OP_assign_member
,
stat
->
member_expr
->
identifier
)
;
op
=
is_set
?
OP_set_member
:
OP_assign_member
;
}
else
{
hres
=
push_instr_bstr
(
ctx
,
is_set
?
OP_set_ident
:
OP_assign_ident
,
stat
->
member_expr
->
identifier
)
;
op
=
is_set
?
OP_set_ident
:
OP_assign_ident
;
}
return
hres
;
hres
=
compile_args
(
ctx
,
stat
->
member_expr
->
args
,
&
args_cnt
);
if
(
FAILED
(
hres
))
return
hres
;
return
push_instr_bstr_uint
(
ctx
,
op
,
stat
->
member_expr
->
identifier
,
args_cnt
);
}
static
BOOL
lookup_dim_decls
(
compile_ctx_t
*
ctx
,
const
WCHAR
*
name
)
...
...
dlls/vbscript/interp.c
View file @
edd5ca71
...
...
@@ -562,11 +562,17 @@ static HRESULT assign_ident(exec_ctx_t *ctx, BSTR name, VARIANT *val, BOOL own_v
static
HRESULT
interp_assign_ident
(
exec_ctx_t
*
ctx
)
{
const
BSTR
arg
=
ctx
->
instr
->
arg1
.
bstr
;
const
unsigned
arg_cnt
=
ctx
->
instr
->
arg2
.
uint
;
variant_val_t
v
;
HRESULT
hres
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
arg
));
if
(
arg_cnt
)
{
FIXME
(
"arguments not supported
\n
"
);
return
E_NOTIMPL
;
}
hres
=
stack_pop_val
(
ctx
,
&
v
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -577,12 +583,18 @@ static HRESULT interp_assign_ident(exec_ctx_t *ctx)
static
HRESULT
interp_set_ident
(
exec_ctx_t
*
ctx
)
{
const
BSTR
arg
=
ctx
->
instr
->
arg1
.
bstr
;
const
unsigned
arg_cnt
=
ctx
->
instr
->
arg2
.
uint
;
IDispatch
*
disp
;
VARIANT
v
;
HRESULT
hres
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
arg
));
if
(
arg_cnt
)
{
FIXME
(
"arguments not supported
\n
"
);
return
E_NOTIMPL
;
}
hres
=
stack_pop_disp
(
ctx
,
&
disp
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -595,6 +607,7 @@ static HRESULT interp_set_ident(exec_ctx_t *ctx)
static
HRESULT
interp_assign_member
(
exec_ctx_t
*
ctx
)
{
BSTR
identifier
=
ctx
->
instr
->
arg1
.
bstr
;
const
unsigned
arg_cnt
=
ctx
->
instr
->
arg2
.
uint
;
variant_val_t
val
;
IDispatch
*
obj
;
DISPID
id
;
...
...
@@ -602,6 +615,11 @@ static HRESULT interp_assign_member(exec_ctx_t *ctx)
TRACE
(
"%s
\n
"
,
debugstr_w
(
identifier
));
if
(
arg_cnt
)
{
FIXME
(
"arguments not supported
\n
"
);
return
E_NOTIMPL
;
}
hres
=
stack_pop_disp
(
ctx
,
&
obj
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -629,12 +647,18 @@ static HRESULT interp_assign_member(exec_ctx_t *ctx)
static
HRESULT
interp_set_member
(
exec_ctx_t
*
ctx
)
{
BSTR
identifier
=
ctx
->
instr
->
arg1
.
bstr
;
const
unsigned
arg_cnt
=
ctx
->
instr
->
arg2
.
uint
;
IDispatch
*
obj
,
*
val
;
DISPID
id
;
HRESULT
hres
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
identifier
));
if
(
arg_cnt
)
{
FIXME
(
"arguments not supported
\n
"
);
return
E_NOTIMPL
;
}
hres
=
stack_pop_disp
(
ctx
,
&
obj
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/vbscript/vbscript.h
View file @
edd5ca71
...
...
@@ -186,8 +186,8 @@ typedef enum {
#define OP_LIST \
X(add, 1, 0, 0) \
X(and, 1, 0, 0) \
X(assign_ident, 1, ARG_BSTR,
0)
\
X(assign_member, 1, ARG_BSTR,
0)
\
X(assign_ident, 1, ARG_BSTR,
ARG_UINT)
\
X(assign_member, 1, ARG_BSTR,
ARG_UINT)
\
X(bool, 1, ARG_INT, 0) \
X(concat, 1, 0, 0) \
X(const, 1, ARG_BSTR, 0) \
...
...
@@ -226,8 +226,8 @@ typedef enum {
X(or, 1, 0, 0) \
X(pop, 1, ARG_UINT, 0) \
X(ret, 0, 0, 0) \
X(set_ident, 1, ARG_BSTR,
0)
\
X(set_member, 1, ARG_BSTR,
0)
\
X(set_ident, 1, ARG_BSTR,
ARG_UINT)
\
X(set_member, 1, ARG_BSTR,
ARG_UINT)
\
X(short, 1, ARG_INT, 0) \
X(step, 0, ARG_ADDR, ARG_BSTR) \
X(stop, 1, 0, 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