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
9aafd031
Commit
9aafd031
authored
Dec 05, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Use bytecode for assigning to array expression.
parent
d3d2f063
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
0 deletions
+51
-0
compile.c
dlls/jscript/compile.c
+15
-0
engine.c
dlls/jscript/engine.c
+35
-0
engine.h
dlls/jscript/engine.h
+1
-0
No files found.
dlls/jscript/compile.c
View file @
9aafd031
...
...
@@ -358,6 +358,21 @@ static HRESULT compile_assign_expression(compiler_ctx_t *ctx, binary_expression_
return
hres
;
break
;
}
case
EXPR_ARRAY
:
{
array_expression_t
*
array_expr
=
(
array_expression_t
*
)
expr
->
expression1
;
hres
=
compile_expression
(
ctx
,
array_expr
->
member_expr
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
compile_expression
(
ctx
,
array_expr
->
expression
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
push_instr
(
ctx
,
OP_memberid
)
==
-
1
)
return
E_OUTOFMEMORY
;
break
;
}
default:
expr
->
expr
.
eval
=
assign_expression_eval
;
return
compile_interp_fallback
(
ctx
,
&
expr
->
expr
);
...
...
dlls/jscript/engine.c
View file @
9aafd031
...
...
@@ -1573,6 +1573,41 @@ HRESULT member_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD fla
return
hres
;
}
/* ECMA-262 3rd Edition 11.2.1 */
static
HRESULT
interp_memberid
(
exec_ctx_t
*
ctx
)
{
VARIANT
*
objv
,
*
namev
;
IDispatch
*
obj
;
BSTR
name
;
DISPID
id
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
namev
=
stack_pop
(
ctx
);
objv
=
stack_pop
(
ctx
);
hres
=
to_object
(
ctx
->
parser
->
script
,
objv
,
&
obj
);
VariantClear
(
objv
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
to_string
(
ctx
->
parser
->
script
,
namev
,
&
ctx
->
ei
,
&
name
);
if
(
FAILED
(
hres
))
IDispatch_Release
(
obj
);
}
VariantClear
(
namev
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
disp_get_id
(
ctx
->
parser
->
script
,
obj
,
name
,
fdexNameEnsure
,
&
id
);
SysFreeString
(
name
);
if
(
FAILED
(
hres
))
{
IDispatch_Release
(
obj
);
return
hres
;
}
return
stack_push_objid
(
ctx
,
obj
,
id
);
}
static
void
free_dp
(
DISPPARAMS
*
dp
)
{
DWORD
i
;
...
...
dlls/jscript/engine.h
View file @
9aafd031
...
...
@@ -62,6 +62,7 @@ typedef struct _func_stack {
X(jmp_z, 0, ARG_ADDR, 0) \
X(lt, 1, 0,0) \
X(lteq, 1, 0,0) \
X(memberid, 1, 0,0) \
X(minus, 1, 0,0) \
X(mod, 1, 0,0) \
X(mul, 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