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
aa809f1b
Commit
aa809f1b
authored
Dec 07, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added bytecode version of array expression.
parent
9c9157a1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
0 deletions
+43
-0
compile.c
dlls/jscript/compile.c
+2
-0
engine.c
dlls/jscript/engine.c
+40
-0
engine.h
dlls/jscript/engine.h
+1
-0
No files found.
dlls/jscript/compile.c
View file @
aa809f1b
...
...
@@ -558,6 +558,8 @@ static HRESULT compile_expression_noret(compiler_ctx_t *ctx, expression_t *expr,
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_add
);
case
EXPR_AND
:
return
compile_logical_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_jmp_z
);
case
EXPR_ARRAY
:
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_array
);
case
EXPR_ASSIGN
:
return
compile_assign_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_LAST
);
case
EXPR_ASSIGNADD
:
...
...
dlls/jscript/engine.c
View file @
aa809f1b
...
...
@@ -1561,6 +1561,46 @@ HRESULT array_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD flag
}
/* ECMA-262 3rd Edition 11.2.1 */
static
HRESULT
interp_array
(
exec_ctx_t
*
ctx
)
{
VARIANT
v
,
*
namev
;
IDispatch
*
obj
;
DISPID
id
;
BSTR
name
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
namev
=
stack_pop
(
ctx
);
hres
=
stack_pop_object
(
ctx
,
&
obj
);
if
(
FAILED
(
hres
))
{
VariantClear
(
namev
);
return
hres
;
}
hres
=
to_string
(
ctx
->
parser
->
script
,
namev
,
&
ctx
->
ei
,
&
name
);
if
(
FAILED
(
hres
))
{
IDispatch_Release
(
obj
);
return
hres
;
}
hres
=
disp_get_id
(
ctx
->
parser
->
script
,
obj
,
name
,
0
,
&
id
);
SysFreeString
(
name
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
disp_propget
(
ctx
->
parser
->
script
,
obj
,
id
,
&
v
,
&
ctx
->
ei
,
NULL
/*FIXME*/
);
}
else
if
(
hres
==
DISP_E_UNKNOWNNAME
)
{
V_VT
(
&
v
)
=
VT_EMPTY
;
hres
=
S_OK
;
}
IDispatch_Release
(
obj
);
if
(
FAILED
(
hres
))
return
hres
;
return
stack_push
(
ctx
,
&
v
);
}
/* ECMA-262 3rd Edition 11.2.1 */
HRESULT
member_expression_eval
(
script_ctx_t
*
ctx
,
expression_t
*
_expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
{
member_expression_t
*
expr
=
(
member_expression_t
*
)
_expr
;
...
...
dlls/jscript/engine.h
View file @
aa809f1b
...
...
@@ -43,6 +43,7 @@ typedef struct _func_stack {
#define OP_LIST \
X(add, 1, 0,0) \
X(array, 1, 0,0) \
X(assign, 1, 0,0) \
X(bool, 1, ARG_INT, 0) \
X(bneg, 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