Jacek Caban : jscript: Removed no longer needed ref counting in parser_ctx_t.
Alexandre Julliard
julliard at winehq.org
Tue Mar 13 13:50:35 CDT 2012
Module: wine
Branch: master
Commit: a6ee63eef35c54b0c651d36f8ddb8883e727d3fb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a6ee63eef35c54b0c651d36f8ddb8883e727d3fb
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Mar 12 19:24:34 2012 +0100
jscript: Removed no longer needed ref counting in parser_ctx_t.
---
dlls/jscript/engine.h | 7 -------
dlls/jscript/parser.y | 4 ----
2 files changed, 0 insertions(+), 11 deletions(-)
diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h
index 65b3a60..040b3c4 100644
--- a/dlls/jscript/engine.h
+++ b/dlls/jscript/engine.h
@@ -43,8 +43,6 @@ typedef struct _func_stack {
} func_stack_t;
typedef struct {
- LONG ref;
-
WCHAR *begin;
const WCHAR *end;
const WCHAR *ptr;
@@ -196,11 +194,6 @@ void parser_release(parser_ctx_t*) DECLSPEC_HIDDEN;
int parser_lex(void*,parser_ctx_t*) DECLSPEC_HIDDEN;
-static inline void parser_addref(parser_ctx_t *ctx)
-{
- ctx->ref++;
-}
-
static inline void *parser_alloc(parser_ctx_t *ctx, DWORD size)
{
return jsheap_alloc(&ctx->heap, size);
diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y
index af6933f..717a95c 100644
--- a/dlls/jscript/parser.y
+++ b/dlls/jscript/parser.y
@@ -1532,9 +1532,6 @@ static void program_parsed(parser_ctx_t *ctx, source_elements_t *source)
void parser_release(parser_ctx_t *ctx)
{
- if(--ctx->ref)
- return;
-
script_release(ctx->script);
heap_free(ctx->begin);
jsheap_free(&ctx->heap);
@@ -1554,7 +1551,6 @@ HRESULT script_parse(script_ctx_t *ctx, const WCHAR *code, const WCHAR *delimite
if(!parser_ctx)
return E_OUTOFMEMORY;
- parser_ctx->ref = 1;
parser_ctx->hres = JS_E_SYNTAX;
parser_ctx->is_html = delimiter && !strcmpiW(delimiter, html_tagW);
More information about the wine-cvs
mailing list