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
3c85122e
Commit
3c85122e
authored
Sep 12, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added assign statement compiler implementation.
parent
e63c4472
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
0 deletions
+50
-0
compile.c
dlls/vbscript/compile.c
+43
-0
interp.c
dlls/vbscript/interp.c
+6
-0
vbscript.h
dlls/vbscript/vbscript.h
+1
-0
No files found.
dlls/vbscript/compile.c
View file @
3c85122e
...
...
@@ -150,6 +150,23 @@ static BSTR alloc_bstr_arg(compile_ctx_t *ctx, const WCHAR *str)
return
ctx
->
code
->
bstr_pool
[
ctx
->
code
->
bstr_cnt
++
];
}
static
HRESULT
push_instr_bstr
(
compile_ctx_t
*
ctx
,
vbsop_t
op
,
const
WCHAR
*
arg
)
{
unsigned
instr
;
BSTR
bstr
;
bstr
=
alloc_bstr_arg
(
ctx
,
arg
);
if
(
!
bstr
)
return
E_OUTOFMEMORY
;
instr
=
push_instr
(
ctx
,
op
);
if
(
instr
==
-
1
)
return
E_OUTOFMEMORY
;
instr_ptr
(
ctx
,
instr
)
->
arg1
.
bstr
=
bstr
;
return
S_OK
;
}
static
HRESULT
push_instr_bstr_uint
(
compile_ctx_t
*
ctx
,
vbsop_t
op
,
const
WCHAR
*
arg1
,
unsigned
arg2
)
{
unsigned
instr
;
...
...
@@ -272,12 +289,38 @@ static HRESULT compile_expression(compile_ctx_t *ctx, expression_t *expr)
return
S_OK
;
}
static
HRESULT
compile_assign_statement
(
compile_ctx_t
*
ctx
,
assign_statement_t
*
stat
)
{
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
)
{
FIXME
(
"obj_expr not implemented
\n
"
);
hres
=
E_NOTIMPL
;
}
else
{
hres
=
push_instr_bstr
(
ctx
,
OP_assign_ident
,
stat
->
member_expr
->
identifier
);
}
return
hres
;
}
static
HRESULT
compile_statement
(
compile_ctx_t
*
ctx
,
statement_t
*
stat
)
{
HRESULT
hres
;
while
(
stat
)
{
switch
(
stat
->
type
)
{
case
STAT_ASSIGN
:
hres
=
compile_assign_statement
(
ctx
,
(
assign_statement_t
*
)
stat
);
break
;
case
STAT_CALL
:
hres
=
compile_member_expression
(
ctx
,
((
call_statement_t
*
)
stat
)
->
expr
,
FALSE
);
break
;
...
...
dlls/vbscript/interp.c
View file @
3c85122e
...
...
@@ -217,6 +217,12 @@ static HRESULT interp_icallv(exec_ctx_t *ctx)
return
do_icall
(
ctx
,
NULL
);
}
static
HRESULT
interp_assign_ident
(
exec_ctx_t
*
ctx
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
interp_ret
(
exec_ctx_t
*
ctx
)
{
TRACE
(
"
\n
"
);
...
...
dlls/vbscript/vbscript.h
View file @
3c85122e
...
...
@@ -89,6 +89,7 @@ typedef enum {
#define OP_LIST \
X(add, 1, 0, 0) \
X(assign_ident, 1, ARG_BSTR, 0) \
X(bool, 1, ARG_INT, 0) \
X(concat, 1, 0, 0) \
X(double, 1, ARG_DOUBLE, 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