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
1314140a
Commit
1314140a
authored
Mar 01, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Pass string as jsstr_t to push_instr_str.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
edc9df20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
compile.c
dlls/jscript/compile.c
+14
-9
No files found.
dlls/jscript/compile.c
View file @
1314140a
...
...
@@ -245,14 +245,9 @@ static HRESULT push_instr_int(compiler_ctx_t *ctx, jsop_t op, LONG arg)
return
S_OK
;
}
static
HRESULT
push_instr_str
(
compiler_ctx_t
*
ctx
,
jsop_t
op
,
const
WCHAR
*
arg
)
static
HRESULT
push_instr_str
(
compiler_ctx_t
*
ctx
,
jsop_t
op
,
jsstr_t
*
str
)
{
unsigned
instr
;
jsstr_t
*
str
;
str
=
compiler_alloc_string
(
ctx
,
arg
);
if
(
!
str
)
return
E_OUTOFMEMORY
;
instr
=
push_instr
(
ctx
,
op
);
if
(
!
instr
)
...
...
@@ -490,13 +485,18 @@ static HRESULT compile_memberid_expression(compiler_ctx_t *ctx, expression_t *ex
}
case
EXPR_MEMBER
:
{
member_expression_t
*
member_expr
=
(
member_expression_t
*
)
expr
;
jsstr_t
*
jsstr
;
hres
=
compile_expression
(
ctx
,
member_expr
->
expression
,
TRUE
);
if
(
FAILED
(
hres
))
return
hres
;
/* FIXME: Potential optimization */
hres
=
push_instr_str
(
ctx
,
OP_str
,
member_expr
->
identifier
);
jsstr
=
compiler_alloc_string
(
ctx
,
member_expr
->
identifier
);
if
(
!
jsstr
)
return
E_OUTOFMEMORY
;
hres
=
push_instr_str
(
ctx
,
OP_str
,
jsstr
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -689,13 +689,18 @@ static HRESULT compile_delete_expression(compiler_ctx_t *ctx, unary_expression_t
}
case
EXPR_MEMBER
:
{
member_expression_t
*
member_expr
=
(
member_expression_t
*
)
expr
->
expression
;
jsstr_t
*
jsstr
;
hres
=
compile_expression
(
ctx
,
member_expr
->
expression
,
TRUE
);
if
(
FAILED
(
hres
))
return
hres
;
/* FIXME: Potential optimization */
hres
=
push_instr_str
(
ctx
,
OP_str
,
member_expr
->
identifier
);
jsstr
=
compiler_alloc_string
(
ctx
,
member_expr
->
identifier
);
if
(
!
jsstr
)
return
E_OUTOFMEMORY
;
hres
=
push_instr_str
(
ctx
,
OP_str
,
jsstr
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -824,7 +829,7 @@ static HRESULT compile_literal(compiler_ctx_t *ctx, literal_t *literal)
case
LT_NULL
:
return
push_instr
(
ctx
,
OP_null
)
?
S_OK
:
E_OUTOFMEMORY
;
case
LT_STRING
:
return
push_instr_str
(
ctx
,
OP_str
,
literal
->
u
.
wstr
);
return
push_instr_str
(
ctx
,
OP_str
,
compiler_alloc_string
(
ctx
,
literal
->
u
.
wstr
)
);
case
LT_REGEXP
:
return
push_instr_str_uint
(
ctx
,
OP_regexp
,
literal
->
u
.
regexp
.
str
,
literal
->
u
.
regexp
.
flags
);
DEFAULT_UNREACHABLE
;
...
...
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