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
b2a93fe3
Commit
b2a93fe3
authored
Sep 10, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added function expression implementation.
parent
e4e47c01
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
3 deletions
+38
-3
engine.c
dlls/jscript/engine.c
+27
-3
lang.js
dlls/jscript/tests/lang.js
+11
-0
No files found.
dlls/jscript/engine.c
View file @
b2a93fe3
...
@@ -703,10 +703,34 @@ static HRESULT get_binary_expr_values(exec_ctx_t *ctx, binary_expression_t *expr
...
@@ -703,10 +703,34 @@ static HRESULT get_binary_expr_values(exec_ctx_t *ctx, binary_expression_t *expr
return
S_OK
;
return
S_OK
;
}
}
HRESULT
function_expression_eval
(
exec_ctx_t
*
ctx
,
expression_t
*
expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
/* ECMA-262 3rd Edition 13 */
HRESULT
function_expression_eval
(
exec_ctx_t
*
ctx
,
expression_t
*
_expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
{
{
FIXME
(
"
\n
"
);
function_expression_t
*
expr
=
(
function_expression_t
*
)
_expr
;
return
E_NOTIMPL
;
DispatchEx
*
dispex
;
VARIANT
var
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
hres
=
create_source_function
(
ctx
->
parser
,
expr
->
parameter_list
,
expr
->
source_elements
,
ctx
->
scope_chain
,
&
dispex
);
if
(
FAILED
(
hres
))
return
hres
;
V_VT
(
&
var
)
=
VT_DISPATCH
;
V_DISPATCH
(
&
var
)
=
(
IDispatch
*
)
_IDispatchEx_
(
dispex
);
if
(
expr
->
identifier
)
{
hres
=
jsdisp_propput_name
(
ctx
->
var_disp
,
expr
->
identifier
,
ctx
->
parser
->
script
->
lcid
,
&
var
,
ei
,
NULL
/*FIXME*/
);
if
(
FAILED
(
hres
))
{
jsdisp_release
(
dispex
);
return
hres
;
}
}
ret
->
type
=
EXPRVAL_VARIANT
;
ret
->
u
.
var
=
var
;
return
S_OK
;
}
}
HRESULT
conditional_expression_eval
(
exec_ctx_t
*
ctx
,
expression_t
*
expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
HRESULT
conditional_expression_eval
(
exec_ctx_t
*
ctx
,
expression_t
*
expr
,
DWORD
flags
,
jsexcept_t
*
ei
,
exprval_t
*
ret
)
...
...
dlls/jscript/tests/lang.js
View file @
b2a93fe3
...
@@ -81,5 +81,16 @@ ok(testFunc1(true, "test") === true, "testFunc1 not returned true");
...
@@ -81,5 +81,16 @@ ok(testFunc1(true, "test") === true, "testFunc1 not returned true");
var
obj1
=
new
Object
();
var
obj1
=
new
Object
();
ok
(
typeof
(
obj1
)
===
"object"
,
"typeof(obj1) is not object"
);
ok
(
typeof
(
obj1
)
===
"object"
,
"typeof(obj1) is not object"
);
obj1
.
test
=
true
;
obj1
.
func
=
function
()
{
ok
(
this
===
obj1
,
"this is not obj1"
);
ok
(
this
.
test
===
true
,
"this.test is not true"
);
ok
(
arguments
.
length
===
1
,
"arguments.length is not 1"
);
ok
(
arguments
[
"0"
]
===
true
,
"arguments[0] is not true"
);
return
"test"
;
};
ok
(
obj1
.
func
(
true
)
===
"test"
,
"obj1.func(true) is not
\"
test
\"
"
);
reportSuccess
();
reportSuccess
();
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