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
be29a738
Commit
be29a738
authored
Mar 12, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Call script_parse from compile_script, not the other way around.
parent
825eb763
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
10 deletions
+19
-10
compile.c
dlls/jscript/compile.c
+14
-3
engine.h
dlls/jscript/engine.h
+1
-1
function.c
dlls/jscript/function.c
+1
-1
global.c
dlls/jscript/global.c
+1
-1
jscript.c
dlls/jscript/jscript.c
+2
-2
parser.y
dlls/jscript/parser.y
+0
-2
No files found.
dlls/jscript/compile.c
View file @
be29a738
...
...
@@ -1778,13 +1778,24 @@ static HRESULT compile_function(compiler_ctx_t *ctx, source_elements_t *source,
return
S_OK
;
}
HRESULT
compile_script
(
parser_ctx_t
*
parser
,
BOOL
from_eval
)
HRESULT
compile_script
(
script_ctx_t
*
ctx
,
const
WCHAR
*
code
,
const
WCHAR
*
delimiter
,
BOOL
from_eval
,
parser_ctx_t
**
ret
)
{
parser_ctx_t
*
parser
;
HRESULT
hres
;
hres
=
init_compiler
(
parser
);
hres
=
script_parse
(
ctx
,
code
,
delimiter
,
from_eval
,
&
parser
);
if
(
FAILED
(
hres
))
return
hres
;
return
compile_function
(
parser
->
compiler
,
parser
->
source
,
from_eval
);
hres
=
init_compiler
(
parser
);
if
(
SUCCEEDED
(
hres
))
hres
=
compile_function
(
parser
->
compiler
,
parser
->
source
,
from_eval
);
if
(
FAILED
(
hres
))
{
parser_release
(
parser
);
return
hres
;
}
*
ret
=
parser
;
return
S_OK
;
}
dlls/jscript/engine.h
View file @
be29a738
...
...
@@ -577,4 +577,4 @@ typedef struct {
prop_val_t
*
property_list
;
}
property_value_expression_t
;
HRESULT
compile_script
(
parser_ctx_t
*
,
BOOL
)
DECLSPEC_HIDDEN
;
HRESULT
compile_script
(
script_ctx_t
*
,
const
WCHAR
*
,
const
WCHAR
*
,
BOOL
,
parser_ctx_t
**
)
DECLSPEC_HIDDEN
;
dlls/jscript/function.c
View file @
be29a738
...
...
@@ -774,7 +774,7 @@ static HRESULT construct_function(script_ctx_t *ctx, DISPPARAMS *dp, jsexcept_t
if
(
FAILED
(
hres
))
return
hres
;
hres
=
script_parse
(
ctx
,
str
,
NULL
,
FALSE
,
&
parser
);
hres
=
compile_script
(
ctx
,
str
,
NULL
,
FALSE
,
&
parser
);
heap_free
(
str
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/jscript/global.c
View file @
be29a738
...
...
@@ -371,7 +371,7 @@ static HRESULT JSGlobal_eval(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DIS
}
TRACE
(
"parsing %s
\n
"
,
debugstr_w
(
V_BSTR
(
arg
)));
hres
=
script_parse
(
ctx
,
V_BSTR
(
arg
),
NULL
,
TRUE
,
&
parser_ctx
);
hres
=
compile_script
(
ctx
,
V_BSTR
(
arg
),
NULL
,
TRUE
,
&
parser_ctx
);
if
(
FAILED
(
hres
))
{
WARN
(
"parse (%s) failed: %08x
\n
"
,
debugstr_w
(
V_BSTR
(
arg
)),
hres
);
return
throw_syntax_error
(
ctx
,
ei
,
hres
,
NULL
);
...
...
dlls/jscript/jscript.c
View file @
be29a738
...
...
@@ -762,7 +762,7 @@ static HRESULT WINAPI JScriptParse_ParseScriptText(IActiveScriptParse *iface,
if
(
This
->
thread_id
!=
GetCurrentThreadId
()
||
This
->
ctx
->
state
==
SCRIPTSTATE_CLOSED
)
return
E_UNEXPECTED
;
hres
=
script_parse
(
This
->
ctx
,
pstrCode
,
pstrDelimiter
,
FALSE
,
&
parser_ctx
);
hres
=
compile_script
(
This
->
ctx
,
pstrCode
,
pstrDelimiter
,
FALSE
,
&
parser_ctx
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -829,7 +829,7 @@ static HRESULT WINAPI JScriptParseProcedure_ParseProcedureText(IActiveScriptPars
if
(
This
->
thread_id
!=
GetCurrentThreadId
()
||
This
->
ctx
->
state
==
SCRIPTSTATE_CLOSED
)
return
E_UNEXPECTED
;
hres
=
script_parse
(
This
->
ctx
,
pstrCode
,
pstrDelimiter
,
FALSE
,
&
parser_ctx
);
hres
=
compile_script
(
This
->
ctx
,
pstrCode
,
pstrDelimiter
,
FALSE
,
&
parser_ctx
);
if
(
FAILED
(
hres
))
{
WARN
(
"Parse failed %08x
\n
"
,
hres
);
return
hres
;
...
...
dlls/jscript/parser.y
View file @
be29a738
...
...
@@ -1582,8 +1582,6 @@ HRESULT script_parse(script_ctx_t *ctx, const WCHAR *code, const WCHAR *delimite
parser_parse(parser_ctx);
jsheap_clear(mark);
hres = parser_ctx->hres;
if(SUCCEEDED(hres))
hres = compile_script(parser_ctx, from_eval);
if(FAILED(hres)) {
parser_release(parser_ctx);
return hres;
...
...
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