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
9c9157a1
Commit
9c9157a1
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: Use binary_expression_t instead of array_expression_t.
parent
4da0cf39
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
28 deletions
+11
-28
compile.c
dlls/jscript/compile.c
+6
-6
engine.c
dlls/jscript/engine.c
+3
-3
engine.h
dlls/jscript/engine.h
+0
-6
parser.y
dlls/jscript/parser.y
+2
-13
No files found.
dlls/jscript/compile.c
View file @
9c9157a1
...
...
@@ -257,13 +257,13 @@ static HRESULT compile_memberid_expression(compiler_ctx_t *ctx, expression_t *ex
break
;
}
case
EXPR_ARRAY
:
{
array_expression_t
*
array_expr
=
(
arra
y_expression_t
*
)
expr
;
binary_expression_t
*
array_expr
=
(
binar
y_expression_t
*
)
expr
;
hres
=
compile_expression
(
ctx
,
array_expr
->
member_expr
);
hres
=
compile_expression
(
ctx
,
array_expr
->
expression1
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
compile_expression
(
ctx
,
array_expr
->
expression
);
hres
=
compile_expression
(
ctx
,
array_expr
->
expression
2
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -438,13 +438,13 @@ static HRESULT compile_delete_expression(compiler_ctx_t *ctx, unary_expression_t
switch
(
expr
->
expression
->
type
)
{
case
EXPR_ARRAY
:
{
array_expression_t
*
array_expr
=
(
arra
y_expression_t
*
)
expr
->
expression
;
binary_expression_t
*
array_expr
=
(
binar
y_expression_t
*
)
expr
->
expression
;
hres
=
compile_expression
(
ctx
,
array_expr
->
member_expr
);
hres
=
compile_expression
(
ctx
,
array_expr
->
expression1
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
compile_expression
(
ctx
,
array_expr
->
expression
);
hres
=
compile_expression
(
ctx
,
array_expr
->
expression
2
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/jscript/engine.c
View file @
9c9157a1
...
...
@@ -1508,7 +1508,7 @@ HRESULT function_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD f
/* ECMA-262 3rd Edition 11.2.1 */
HRESULT
array_expression_eval
(
script_ctx_t
*
ctx
,
expression_t
*
_expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
{
array_expression_t
*
expr
=
(
arra
y_expression_t
*
)
_expr
;
binary_expression_t
*
expr
=
(
binar
y_expression_t
*
)
_expr
;
exprval_t
exprval
;
VARIANT
member
,
val
;
DISPID
id
;
...
...
@@ -1518,7 +1518,7 @@ HRESULT array_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD flag
TRACE
(
"
\n
"
);
hres
=
expr_eval
(
ctx
,
expr
->
member_expr
,
0
,
ei
,
&
exprval
);
hres
=
expr_eval
(
ctx
,
expr
->
expression1
,
0
,
ei
,
&
exprval
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -1527,7 +1527,7 @@ HRESULT array_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD flag
if
(
FAILED
(
hres
))
return
hres
;
hres
=
expr_eval
(
ctx
,
expr
->
expression
,
EXPR_NEWREF
,
ei
,
&
exprval
);
hres
=
expr_eval
(
ctx
,
expr
->
expression
2
,
EXPR_NEWREF
,
ei
,
&
exprval
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
exprval_to_value
(
ctx
,
&
exprval
,
ei
,
&
val
);
exprval_release
(
&
exprval
);
...
...
dlls/jscript/engine.h
View file @
9c9157a1
...
...
@@ -499,12 +499,6 @@ typedef struct {
typedef
struct
{
expression_t
expr
;
expression_t
*
member_expr
;
expression_t
*
expression
;
}
array_expression_t
;
typedef
struct
{
expression_t
expr
;
expression_t
*
expression
;
const
WCHAR
*
identifier
;
}
member_expression_t
;
...
...
dlls/jscript/parser.y
View file @
9c9157a1
...
...
@@ -129,7 +129,6 @@ static expression_t *new_function_expression(parser_ctx_t*,const WCHAR*,paramete
static expression_t *new_binary_expression(parser_ctx_t*,expression_type_t,expression_t*,expression_t*);
static expression_t *new_unary_expression(parser_ctx_t*,expression_type_t,expression_t*);
static expression_t *new_conditional_expression(parser_ctx_t*,expression_t*,expression_t*,expression_t*);
static expression_t *new_array_expression(parser_ctx_t*,expression_t*,expression_t*);
static expression_t *new_member_expression(parser_ctx_t*,expression_t*,const WCHAR*);
static expression_t *new_new_expression(parser_ctx_t*,expression_t*,argument_list_t*);
static expression_t *new_call_expression(parser_ctx_t*,expression_t*,argument_list_t*);
...
...
@@ -710,7 +709,7 @@ MemberExpression
: PrimaryExpression { $$ = $1; }
| FunctionExpression { $$ = $1; }
| MemberExpression '[' Expression ']'
{ $$ = new_
array_expression(ctx
, $1, $3); }
{ $$ = new_
binary_expression(ctx, EXPR_ARRAY
, $1, $3); }
| MemberExpression '.' tIdentifier
{ $$ = new_member_expression(ctx, $1, $3); }
| kNEW MemberExpression Arguments
...
...
@@ -723,7 +722,7 @@ CallExpression
| CallExpression Arguments
{ $$ = new_call_expression(ctx, $1, $2); }
| CallExpression '[' Expression ']'
{ $$ = new_
array_expression(ctx
, $1, $3); }
{ $$ = new_
binary_expression(ctx, EXPR_ARRAY
, $1, $3); }
| CallExpression '.' tIdentifier
{ $$ = new_member_expression(ctx, $1, $3); }
...
...
@@ -1407,16 +1406,6 @@ static expression_t *new_conditional_expression(parser_ctx_t *ctx, expression_t
return &ret->expr;
}
static expression_t *new_array_expression(parser_ctx_t *ctx, expression_t *member_expr, expression_t *expression)
{
array_expression_t *ret = new_expression(ctx, EXPR_ARRAY, sizeof(*ret));
ret->member_expr = member_expr;
ret->expression = expression;
return &ret->expr;
}
static expression_t *new_member_expression(parser_ctx_t *ctx, expression_t *expression, const WCHAR *identifier)
{
member_expression_t *ret = new_expression(ctx, EXPR_MEMBER, sizeof(*ret));
...
...
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