https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3f071cc5272c4d1061912…
commit 3f071cc5272c4d10619122051805b864562647d9
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Mon Jun 4 03:38:45 2018 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Mon Jun 4 03:38:45 2018 +0100
[JSCRIPT] Sync with Wine Staging 3.9. CORE-14656
---
dll/win32/jscript/date.c | 48 +
dll/win32/jscript/dispex.c | 310 +++++--
dll/win32/jscript/error.c | 13 +-
dll/win32/jscript/function.c | 40 +-
dll/win32/jscript/global.c | 65 +-
dll/win32/jscript/jscript.h | 35 +-
dll/win32/jscript/json.c | 6 +
dll/win32/jscript/jsregexp.c | 40 +-
dll/win32/jscript/jsutils.c | 9 +-
dll/win32/jscript/lex.c | 10 +-
dll/win32/jscript/math.c | 3 +-
dll/win32/jscript/object.c | 308 ++++++-
dll/win32/jscript/parser.tab.c | 1927 +++++++++++++++++++++++-----------------
dll/win32/jscript/parser.tab.h | 54 +-
dll/win32/jscript/parser.y | 58 +-
dll/win32/jscript/resource.h | 6 +
dll/win32/jscript/string.c | 47 +-
media/doc/README.WINE | 2 +-
18 files changed, 1925 insertions(+), 1056 deletions(-)
diff --git a/dll/win32/jscript/date.c b/dll/win32/jscript/date.c
index f784d51afb..28ad23d644 100644
--- a/dll/win32/jscript/date.c
+++ b/dll/win32/jscript/date.c
@@ -49,6 +49,7 @@ typedef struct {
static const WCHAR toStringW[] =
{'t','o','S','t','r','i','n','g',0};
static const WCHAR toLocaleStringW[] =
{'t','o','L','o','c','a','l','e','S','t','r','i','n','g',0};
static const WCHAR valueOfW[] =
{'v','a','l','u','e','O','f',0};
+static const WCHAR toISOStringW[] =
{'t','o','I','S','O','S','t','r','i','n','g',0};
static const WCHAR toUTCStringW[] =
{'t','o','U','T','C','S','t','r','i','n','g',0};
static const WCHAR toGMTStringW[] =
{'t','o','G','M','T','S','t','r','i','n','g',0};
static const WCHAR toDateStringW[] =
{'t','o','D','a','t','e','S','t','r','i','n','g',0};
@@ -632,6 +633,52 @@ static HRESULT Date_toLocaleString(script_ctx_t *ctx, vdisp_t
*jsthis, WORD flag
return S_OK;
}
+static HRESULT Date_toISOString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned
argc, jsval_t *argv,
+ jsval_t *r)
+{
+ DateInstance *date;
+ WCHAR buf[64], *p = buf;
+ double year;
+
+ static const WCHAR short_year_formatW[] =
{'%','0','4','d',0};
+ static const WCHAR long_year_formatW[] =
{'%','0','6','d',0};
+ static const WCHAR formatW[] =
{'-','%','0','2','d','-','%','0','2','d',
+
'T','%','0','2','d',':','%','0','2','d',':','%','0','2','d','.','%','0','3','d','Z',0};
+
+ TRACE("\n");
+
+ if(!(date = date_this(jsthis)))
+ return throw_type_error(ctx, JS_E_DATE_EXPECTED, NULL);
+
+ year = year_from_time(date->time);
+ if(isnan(year) || year > 999999 || year < -999999) {
+ FIXME("year %lf should throw an exception\n", year);
+ return E_FAIL;
+ }
+
+ if(year < 0) {
+ *p++ = '-';
+ p += sprintfW(p, long_year_formatW, -(int)year);
+ }else if(year > 9999) {
+ *p++ = '+';
+ p += sprintfW(p, long_year_formatW, (int)year);
+ }else {
+ p += sprintfW(p, short_year_formatW, (int)year);
+ }
+
+ sprintfW(p, formatW, (int)month_from_time(date->time) + 1,
(int)date_from_time(date->time),
+ (int)hour_from_time(date->time), (int)min_from_time(date->time),
+ (int)sec_from_time(date->time), (int)ms_from_time(date->time));
+
+ if(r) {
+ jsstr_t *ret;
+ if(!(ret = jsstr_alloc(buf)))
+ return E_OUTOFMEMORY;
+ *r = jsval_string(ret);
+ }
+ return S_OK;
+}
+
static HRESULT Date_valueOf(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned
argc, jsval_t *argv,
jsval_t *r)
{
@@ -1923,6 +1970,7 @@ static const builtin_prop_t Date_props[] = {
{setYearW, Date_setYear, PROPF_METHOD|1},
{toDateStringW, Date_toDateString, PROPF_METHOD},
{toGMTStringW, Date_toGMTString, PROPF_METHOD},
+ {toISOStringW, Date_toISOString, PROPF_METHOD|PROPF_ES5},
{toLocaleDateStringW, Date_toLocaleDateString, PROPF_METHOD},
{toLocaleStringW, Date_toLocaleString, PROPF_METHOD},
{toLocaleTimeStringW, Date_toLocaleTimeString, PROPF_METHOD},
diff --git a/dll/win32/jscript/dispex.c b/dll/win32/jscript/dispex.c
index ffb351e2ac..9b47368cf8 100644
--- a/dll/win32/jscript/dispex.c
+++ b/dll/win32/jscript/dispex.c
@@ -32,6 +32,7 @@ typedef enum {
PROP_JSVAL,
PROP_BUILTIN,
PROP_PROTREF,
+ PROP_ACCESSOR,
PROP_DELETED,
PROP_IDX
} prop_type_t;
@@ -47,6 +48,10 @@ struct _dispex_prop_t {
const builtin_prop_t *p;
DWORD ref;
unsigned idx;
+ struct {
+ jsdisp_t *getter;
+ jsdisp_t *setter;
+ } accessor;
} u;
int bucket_head;
@@ -216,7 +221,13 @@ static HRESULT find_prop_name(jsdisp_t *This, unsigned hash, const
WCHAR *name,
builtin = find_builtin_prop(This, name);
if(builtin) {
- prop = alloc_prop(This, name, PROP_BUILTIN, builtin->flags);
+ unsigned flags = builtin->flags;
+ if(flags & PROPF_METHOD)
+ flags |= PROPF_WRITABLE | PROPF_CONFIGURABLE;
+ else if(builtin->setter)
+ flags |= PROPF_WRITABLE;
+ flags &= PROPF_ENUMERABLE | PROPF_WRITABLE | PROPF_CONFIGURABLE;
+ prop = alloc_prop(This, name, PROP_BUILTIN, flags);
if(!prop)
return E_OUTOFMEMORY;
@@ -232,7 +243,7 @@ static HRESULT find_prop_name(jsdisp_t *This, unsigned hash, const
WCHAR *name,
for(ptr = name; isdigitW(*ptr) && idx < 0x10000; ptr++)
idx = idx*10 + (*ptr-'0');
if(!*ptr && idx < This->builtin_info->idx_length(This)) {
- prop = alloc_prop(This, name, PROP_IDX, This->builtin_info->idx_put ? 0
: PROPF_CONST);
+ prop = alloc_prop(This, name, PROP_IDX, This->builtin_info->idx_put ?
PROPF_WRITABLE : 0);
if(!prop)
return E_OUTOFMEMORY;
@@ -268,7 +279,6 @@ static HRESULT find_prop_name_prot(jsdisp_t *This, unsigned hash,
const WCHAR *n
if(prop) {
if(del) {
del->type = PROP_PROTREF;
- del->flags = 0;
del->u.ref = prop - This->prototype->props;
prop = del;
}else {
@@ -286,15 +296,12 @@ static HRESULT find_prop_name_prot(jsdisp_t *This, unsigned hash,
const WCHAR *n
return S_OK;
}
-static HRESULT ensure_prop_name(jsdisp_t *This, const WCHAR *name, BOOL search_prot,
DWORD create_flags, dispex_prop_t **ret)
+static HRESULT ensure_prop_name(jsdisp_t *This, const WCHAR *name, DWORD create_flags,
dispex_prop_t **ret)
{
dispex_prop_t *prop;
HRESULT hres;
- if(search_prot)
- hres = find_prop_name_prot(This, string_hash(name), name, &prop);
- else
- hres = find_prop_name(This, string_hash(name), name, &prop);
+ hres = find_prop_name_prot(This, string_hash(name), name, &prop);
if(SUCCEEDED(hres) && (!prop || prop->type == PROP_DELETED)) {
TRACE("creating prop %s flags %x\n", debugstr_w(name), create_flags);
@@ -408,6 +415,9 @@ static HRESULT invoke_prop_func(jsdisp_t *This, IDispatch *jsthis,
dispex_prop_t
return disp_call_value(This->ctx, get_object(prop->u.val), jsthis, flags,
argc, argv, r);
}
+ case PROP_ACCESSOR:
+ FIXME("accessor\n");
+ return E_NOTIMPL;
case PROP_IDX:
FIXME("Invoking PROP_IDX not yet supported\n");
return E_NOTIMPL;
@@ -419,11 +429,16 @@ static HRESULT invoke_prop_func(jsdisp_t *This, IDispatch *jsthis,
dispex_prop_t
return E_FAIL;
}
-static HRESULT prop_get(jsdisp_t *This, dispex_prop_t *prop, DISPPARAMS *dp,
- jsval_t *r, IServiceProvider *caller)
+static HRESULT prop_get(jsdisp_t *This, dispex_prop_t *prop, jsval_t *r)
{
+ jsdisp_t *prop_obj = This;
HRESULT hres;
+ while(prop->type == PROP_PROTREF) {
+ prop_obj = prop_obj->prototype;
+ prop = prop_obj->props + prop->u.ref;
+ }
+
switch(prop->type) {
case PROP_BUILTIN:
if(prop->u.p->getter) {
@@ -444,14 +459,20 @@ static HRESULT prop_get(jsdisp_t *This, dispex_prop_t *prop,
DISPPARAMS *dp,
*r = jsval_obj(obj);
}
break;
- case PROP_PROTREF:
- hres = prop_get(This->prototype, This->prototype->props+prop->u.ref,
dp, r, caller);
- break;
case PROP_JSVAL:
hres = jsval_copy(prop->u.val, r);
break;
+ case PROP_ACCESSOR:
+ if(prop->u.accessor.getter) {
+ hres = jsdisp_call_value(prop->u.accessor.getter, to_disp(This),
+ DISPATCH_METHOD, 0, NULL, r);
+ }else {
+ *r = jsval_undefined();
+ hres = S_OK;
+ }
+ break;
case PROP_IDX:
- hres = This->builtin_info->idx_get(This, prop->u.idx, r);
+ hres = prop_obj->builtin_info->idx_get(prop_obj, prop->u.idx, r);
break;
default:
ERR("type %d\n", prop->type);
@@ -467,32 +488,53 @@ static HRESULT prop_get(jsdisp_t *This, dispex_prop_t *prop,
DISPPARAMS *dp,
return hres;
}
-static HRESULT prop_put(jsdisp_t *This, dispex_prop_t *prop, jsval_t val,
IServiceProvider *caller)
+static HRESULT prop_put(jsdisp_t *This, dispex_prop_t *prop, jsval_t val)
{
HRESULT hres;
- if(prop->flags & PROPF_CONST)
- return S_OK;
+ if(prop->type == PROP_PROTREF) {
+ dispex_prop_t *prop_iter = prop;
+ jsdisp_t *prototype_iter = This;
+
+ do {
+ prototype_iter = prototype_iter->prototype;
+ prop_iter = prototype_iter->props + prop_iter->u.ref;
+ } while(prop_iter->type == PROP_PROTREF);
+
+ if(prop_iter->type == PROP_ACCESSOR)
+ prop = prop_iter;
+ }
switch(prop->type) {
case PROP_BUILTIN:
- if(prop->u.p->setter)
- return prop->u.p->setter(This->ctx, This, val);
-
- if(prop->u.p->setter) {
- FIXME("getter with no setter\n");
- return E_FAIL;
+ if(!prop->u.p->setter) {
+ TRACE("getter with no setter\n");
+ return S_OK;
}
- /* fall through */
+ return prop->u.p->setter(This->ctx, This, val);
case PROP_PROTREF:
+ case PROP_DELETED:
prop->type = PROP_JSVAL;
- prop->flags = PROPF_ENUM;
+ prop->flags = PROPF_ENUMERABLE | PROPF_CONFIGURABLE | PROPF_WRITABLE;
prop->u.val = jsval_undefined();
break;
case PROP_JSVAL:
+ if(!(prop->flags & PROPF_WRITABLE))
+ return S_OK;
+
jsval_release(prop->u.val);
break;
+ case PROP_ACCESSOR:
+ if(!prop->u.accessor.setter) {
+ TRACE("no setter\n");
+ return S_OK;
+ }
+ return jsdisp_call_value(prop->u.accessor.setter, to_disp(This),
DISPATCH_METHOD, 1, &val, NULL);
case PROP_IDX:
+ if(!This->builtin_info->idx_put) {
+ TRACE("no put_idx\n");
+ return S_OK;
+ }
return This->builtin_info->idx_put(This, prop->u.idx, val);
default:
ERR("type %d\n", prop->type);
@@ -704,7 +746,7 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID
id, LCID lc
case DISPATCH_PROPERTYGET: {
jsval_t r;
- hres = prop_get(This, prop, pdp, &r, pspCaller);
+ hres = prop_get(This, prop, &r);
if(SUCCEEDED(hres)) {
hres = jsval_to_variant(r, pvarRes);
jsval_release(r);
@@ -729,7 +771,7 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID
id, LCID lc
if(FAILED(hres))
return hres;
- hres = prop_put(This, prop, val, pspCaller);
+ hres = prop_put(This, prop, val);
jsval_release(val);
break;
}
@@ -745,7 +787,7 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID
id, LCID lc
static HRESULT delete_prop(dispex_prop_t *prop, BOOL *ret)
{
- if(prop->flags & PROPF_DONTDELETE) {
+ if(!(prop->flags & PROPF_CONFIGURABLE)) {
*ret = FALSE;
return S_OK;
}
@@ -756,6 +798,8 @@ static HRESULT delete_prop(dispex_prop_t *prop, BOOL *ret)
jsval_release(prop->u.val);
prop->type = PROP_DELETED;
}
+ if(prop->type == PROP_ACCESSOR)
+ FIXME("not supported on accessor property\n");
return S_OK;
}
@@ -846,7 +890,7 @@ static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface,
DWORD grfdex,
}
while(iter < This->props + This->prop_cnt) {
- if(iter->name && (get_flags(This, iter) & PROPF_ENUM) &&
iter->type!=PROP_DELETED) {
+ if(iter->name && (get_flags(This, iter) & PROPF_ENUMERABLE)
&& iter->type!=PROP_DELETED) {
*pid = prop_to_id(This, iter);
return S_OK;
}
@@ -957,8 +1001,19 @@ void jsdisp_free(jsdisp_t *obj)
TRACE("(%p)\n", obj);
for(prop = obj->props; prop < obj->props+obj->prop_cnt; prop++) {
- if(prop->type == PROP_JSVAL)
+ switch(prop->type) {
+ case PROP_JSVAL:
jsval_release(prop->u.val);
+ break;
+ case PROP_ACCESSOR:
+ if(prop->u.accessor.getter)
+ jsdisp_release(prop->u.accessor.getter);
+ if(prop->u.accessor.setter)
+ jsdisp_release(prop->u.accessor.setter);
+ break;
+ default:
+ break;
+ };
heap_free(prop->name);
}
heap_free(obj->props);
@@ -1005,7 +1060,7 @@ HRESULT init_dispex_from_constr(jsdisp_t *dispex, script_ctx_t *ctx,
const built
if(SUCCEEDED(hres) && prop && prop->type!=PROP_DELETED) {
jsval_t val;
- hres = prop_get(constr, prop, NULL, &val, NULL);
+ hres = prop_get(constr, prop, &val);
if(FAILED(hres)) {
ERR("Could not get prototype\n");
return hres;
@@ -1036,7 +1091,8 @@ HRESULT jsdisp_get_id(jsdisp_t *jsdisp, const WCHAR *name, DWORD
flags, DISPID *
HRESULT hres;
if(flags & fdexNameEnsure)
- hres = ensure_prop_name(jsdisp, name, TRUE, PROPF_ENUM, &prop);
+ hres = ensure_prop_name(jsdisp, name, PROPF_ENUMERABLE | PROPF_CONFIGURABLE |
PROPF_WRITABLE,
+ &prop);
else
hres = find_prop_name_prot(jsdisp, string_hash(name), name, &prop);
if(FAILED(hres))
@@ -1299,33 +1355,16 @@ HRESULT jsdisp_propput(jsdisp_t *obj, const WCHAR *name, DWORD
flags, jsval_t va
dispex_prop_t *prop;
HRESULT hres;
- hres = ensure_prop_name(obj, name, FALSE, flags, &prop);
+ hres = ensure_prop_name(obj, name, flags, &prop);
if(FAILED(hres))
return hres;
- return prop_put(obj, prop, val, NULL);
+ return prop_put(obj, prop, val);
}
HRESULT jsdisp_propput_name(jsdisp_t *obj, const WCHAR *name, jsval_t val)
{
- return jsdisp_propput(obj, name, PROPF_ENUM, val);
-}
-
-HRESULT jsdisp_propput_const(jsdisp_t *obj, const WCHAR *name, jsval_t val)
-{
- dispex_prop_t *prop;
- HRESULT hres;
-
- hres = ensure_prop_name(obj, name, FALSE, PROPF_CONST, &prop);
- if(FAILED(hres))
- return hres;
-
- return jsval_copy(val, &prop->u.val);
-}
-
-HRESULT jsdisp_propput_dontenum(jsdisp_t *obj, const WCHAR *name, jsval_t val)
-{
- return jsdisp_propput(obj, name, 0, val);
+ return jsdisp_propput(obj, name, PROPF_ENUMERABLE | PROPF_CONFIGURABLE |
PROPF_WRITABLE, val);
}
HRESULT jsdisp_propput_idx(jsdisp_t *obj, DWORD idx, jsval_t val)
@@ -1349,7 +1388,7 @@ HRESULT disp_propput(script_ctx_t *ctx, IDispatch *disp, DISPID id,
jsval_t val)
prop = get_prop(jsdisp, id);
if(prop)
- hres = prop_put(jsdisp, prop, val, NULL);
+ hres = prop_put(jsdisp, prop, val);
else
hres = DISP_E_MEMBERNOTFOUND;
@@ -1389,7 +1428,6 @@ HRESULT disp_propput(script_ctx_t *ctx, IDispatch *disp, DISPID id,
jsval_t val)
HRESULT jsdisp_propget_name(jsdisp_t *obj, const WCHAR *name, jsval_t *val)
{
- DISPPARAMS dp = {NULL, NULL, 0, 0};
dispex_prop_t *prop;
HRESULT hres;
@@ -1402,13 +1440,12 @@ HRESULT jsdisp_propget_name(jsdisp_t *obj, const WCHAR *name,
jsval_t *val)
return S_OK;
}
- return prop_get(obj, prop, &dp, val, NULL);
+ return prop_get(obj, prop, val);
}
HRESULT jsdisp_get_idx(jsdisp_t *obj, DWORD idx, jsval_t *r)
{
WCHAR name[12];
- DISPPARAMS dp = {NULL, NULL, 0, 0};
dispex_prop_t *prop;
HRESULT hres;
@@ -1425,19 +1462,18 @@ HRESULT jsdisp_get_idx(jsdisp_t *obj, DWORD idx, jsval_t *r)
return DISP_E_UNKNOWNNAME;
}
- return prop_get(obj, prop, &dp, r, NULL);
+ return prop_get(obj, prop, r);
}
HRESULT jsdisp_propget(jsdisp_t *jsdisp, DISPID id, jsval_t *val)
{
- DISPPARAMS dp = {NULL,NULL,0,0};
dispex_prop_t *prop;
prop = get_prop(jsdisp, id);
if(!prop)
return DISP_E_MEMBERNOTFOUND;
- return prop_get(jsdisp, prop, &dp, val, NULL);
+ return prop_get(jsdisp, prop, val);
}
HRESULT disp_propget(script_ctx_t *ctx, IDispatch *disp, DISPID id, jsval_t *val)
@@ -1587,7 +1623,8 @@ HRESULT disp_delete_name(script_ctx_t *ctx, IDispatch *disp, jsstr_t
*name, BOOL
return hres;
}
-HRESULT jsdisp_is_own_prop(jsdisp_t *obj, const WCHAR *name, BOOL *ret)
+HRESULT jsdisp_get_own_property(jsdisp_t *obj, const WCHAR *name, BOOL flags_only,
+ property_desc_t *desc)
{
dispex_prop_t *prop;
HRESULT hres;
@@ -1596,11 +1633,41 @@ HRESULT jsdisp_is_own_prop(jsdisp_t *obj, const WCHAR *name, BOOL
*ret)
if(FAILED(hres))
return hres;
- *ret = prop && (prop->type == PROP_JSVAL || prop->type ==
PROP_BUILTIN);
+ if(!prop)
+ return DISP_E_UNKNOWNNAME;
+
+ memset(desc, 0, sizeof(*desc));
+
+ switch(prop->type) {
+ case PROP_BUILTIN:
+ case PROP_JSVAL:
+ desc->mask |= PROPF_WRITABLE;
+ desc->explicit_value = TRUE;
+ if(!flags_only) {
+ hres = prop_get(obj, prop, &desc->value);
+ if(FAILED(hres))
+ return hres;
+ }
+ break;
+ case PROP_ACCESSOR:
+ desc->explicit_getter = desc->explicit_setter = TRUE;
+ if(!flags_only) {
+ desc->getter = prop->u.accessor.getter
+ ? jsdisp_addref(prop->u.accessor.getter) : NULL;
+ desc->setter = prop->u.accessor.setter
+ ? jsdisp_addref(prop->u.accessor.setter) : NULL;
+ }
+ break;
+ default:
+ return DISP_E_UNKNOWNNAME;
+ }
+
+ desc->flags = prop->flags & (PROPF_ENUMERABLE | PROPF_WRITABLE |
PROPF_CONFIGURABLE);
+ desc->mask |= PROPF_ENUMERABLE | PROPF_CONFIGURABLE;
return S_OK;
}
-HRESULT jsdisp_is_enumerable(jsdisp_t *obj, const WCHAR *name, BOOL *ret)
+HRESULT jsdisp_define_property(jsdisp_t *obj, const WCHAR *name, property_desc_t *desc)
{
dispex_prop_t *prop;
HRESULT hres;
@@ -1609,6 +1676,123 @@ HRESULT jsdisp_is_enumerable(jsdisp_t *obj, const WCHAR *name,
BOOL *ret)
if(FAILED(hres))
return hres;
- *ret = prop && (prop->flags & PROPF_ENUM) && prop->type !=
PROP_PROTREF;
+ if(!prop && !(prop = alloc_prop(obj, name, PROP_DELETED, 0)))
+ return E_OUTOFMEMORY;
+
+ if(prop->type == PROP_DELETED || prop->type == PROP_PROTREF) {
+ prop->flags = desc->flags;
+ if(desc->explicit_getter || desc->explicit_setter) {
+ prop->type = PROP_ACCESSOR;
+ prop->u.accessor.getter = desc->getter ? jsdisp_addref(desc->getter)
: NULL;
+ prop->u.accessor.setter = desc->setter ? jsdisp_addref(desc->setter)
: NULL;
+ TRACE("%s = accessor { get: %p set: %p }\n", debugstr_w(name),
+ prop->u.accessor.getter, prop->u.accessor.setter);
+ }else {
+ prop->type = PROP_JSVAL;
+ if(desc->explicit_value) {
+ hres = jsval_copy(desc->value, &prop->u.val);
+ if(FAILED(hres))
+ return hres;
+ }else {
+ prop->u.val = jsval_undefined();
+ }
+ TRACE("%s = %s\n", debugstr_w(name),
debugstr_jsval(prop->u.val));
+ }
+ return S_OK;
+ }
+
+ TRACE("existing prop %s prop flags %x desc flags %x desc mask %x\n",
debugstr_w(name),
+ prop->flags, desc->flags, desc->mask);
+
+ if(!(prop->flags & PROPF_CONFIGURABLE)) {
+ if(((desc->mask & PROPF_CONFIGURABLE) && (desc->flags &
PROPF_CONFIGURABLE))
+ || ((desc->mask & PROPF_ENUMERABLE)
+ && ((desc->flags & PROPF_ENUMERABLE) != (prop->flags
& PROPF_ENUMERABLE))))
+ return throw_type_error(obj->ctx, JS_E_NONCONFIGURABLE_REDEFINED, name);
+ }
+
+ if(desc->explicit_value || (desc->mask & PROPF_WRITABLE)) {
+ if(prop->type == PROP_ACCESSOR) {
+ if(!(prop->flags & PROPF_CONFIGURABLE))
+ return throw_type_error(obj->ctx, JS_E_NONCONFIGURABLE_REDEFINED,
name);
+ if(prop->u.accessor.getter)
+ jsdisp_release(prop->u.accessor.getter);
+ if(prop->u.accessor.setter)
+ jsdisp_release(prop->u.accessor.setter);
+
+ prop->type = PROP_JSVAL;
+ hres = jsval_copy(desc->value, &prop->u.val);
+ if(FAILED(hres)) {
+ prop->u.val = jsval_undefined();
+ return hres;
+ }
+ }else {
+ if(!(prop->flags & PROPF_CONFIGURABLE) && !(prop->flags
& PROPF_WRITABLE)) {
+ if((desc->mask & PROPF_WRITABLE) && (desc->flags &
PROPF_WRITABLE))
+ return throw_type_error(obj->ctx, JS_E_NONWRITABLE_MODIFIED,
name);
+ if(desc->explicit_value) {
+ if(prop->type == PROP_JSVAL) {
+ BOOL eq;
+ hres = jsval_strict_equal(desc->value, prop->u.val,
&eq);
+ if(FAILED(hres))
+ return hres;
+ if(!eq)
+ return throw_type_error(obj->ctx,
JS_E_NONWRITABLE_MODIFIED, name);
+ }else {
+ FIXME("redefinition of property type %d\n",
prop->type);
+ }
+ }
+ }
+ if(desc->explicit_value) {
+ if(prop->type == PROP_JSVAL)
+ jsval_release(prop->u.val);
+ else
+ prop->type = PROP_JSVAL;
+ hres = jsval_copy(desc->value, &prop->u.val);
+ if(FAILED(hres)) {
+ prop->u.val = jsval_undefined();
+ return hres;
+ }
+ }
+ }
+ }else if(desc->explicit_getter || desc->explicit_setter) {
+ if(prop->type != PROP_ACCESSOR) {
+ if(!(prop->flags & PROPF_CONFIGURABLE))
+ return throw_type_error(obj->ctx, JS_E_NONCONFIGURABLE_REDEFINED,
name);
+ if(prop->type == PROP_JSVAL)
+ jsval_release(prop->u.val);
+ prop->type = PROP_ACCESSOR;
+ prop->u.accessor.getter = prop->u.accessor.setter = NULL;
+ }else if(!(prop->flags & PROPF_CONFIGURABLE)) {
+ if((desc->explicit_getter && desc->getter !=
prop->u.accessor.getter)
+ || (desc->explicit_setter && desc->setter !=
prop->u.accessor.setter))
+ return throw_type_error(obj->ctx, JS_E_NONCONFIGURABLE_REDEFINED,
name);
+ }
+
+ if(desc->explicit_getter) {
+ if(prop->u.accessor.getter) {
+ jsdisp_release(prop->u.accessor.getter);
+ prop->u.accessor.getter = NULL;
+ }
+ if(desc->getter)
+ prop->u.accessor.getter = jsdisp_addref(desc->getter);
+ }
+ if(desc->explicit_setter) {
+ if(prop->u.accessor.setter) {
+ jsdisp_release(prop->u.accessor.setter);
+ prop->u.accessor.setter = NULL;
+ }
+ if(desc->setter)
+ prop->u.accessor.setter = jsdisp_addref(desc->setter);
+ }
+ }
+
+ prop->flags = (prop->flags & ~desc->mask) | (desc->flags &
desc->mask);
return S_OK;
}
+
+HRESULT jsdisp_define_data_property(jsdisp_t *obj, const WCHAR *name, unsigned flags,
jsval_t value)
+{
+ property_desc_t prop_desc = { flags, flags, TRUE, value };
+ return jsdisp_define_property(obj, name, &prop_desc);
+}
diff --git a/dll/win32/jscript/error.c b/dll/win32/jscript/error.c
index b855b8798b..8cf52f00eb 100644
--- a/dll/win32/jscript/error.c
+++ b/dll/win32/jscript/error.c
@@ -193,15 +193,19 @@ static HRESULT create_error(script_ctx_t *ctx, jsdisp_t *constr,
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(err, numberW, jsval_number((INT)number));
+ hres = jsdisp_define_data_property(err, numberW, PROPF_WRITABLE |
PROPF_CONFIGURABLE,
+ jsval_number((INT)number));
if(FAILED(hres)) {
jsdisp_release(err);
return hres;
}
- hres = jsdisp_propput_name(err, messageW, jsval_string(msg));
+ hres = jsdisp_define_data_property(err, messageW,
+ PROPF_WRITABLE | PROPF_ENUMERABLE |
PROPF_CONFIGURABLE,
+ jsval_string(msg));
if(SUCCEEDED(hres))
- hres = jsdisp_propput_dontenum(err, descriptionW, jsval_string(msg));
+ hres = jsdisp_define_data_property(err, descriptionW, PROPF_WRITABLE |
PROPF_CONFIGURABLE,
+ jsval_string(msg));
if(FAILED(hres)) {
jsdisp_release(err);
return hres;
@@ -355,7 +359,8 @@ HRESULT init_error_constr(script_ctx_t *ctx, jsdisp_t
*object_prototype)
return E_OUTOFMEMORY;
}
- hres = jsdisp_propput_dontenum(err, nameW, jsval_string(str));
+ hres = jsdisp_define_data_property(err, nameW, PROPF_WRITABLE |
PROPF_CONFIGURABLE,
+ jsval_string(str));
jsstr_release(str);
if(SUCCEEDED(hres))
hres = create_builtin_constructor(ctx, constr_val[i], names[i], NULL,
diff --git a/dll/win32/jscript/function.c b/dll/win32/jscript/function.c
index 8480a3bf1a..0aae300d01 100644
--- a/dll/win32/jscript/function.c
+++ b/dll/win32/jscript/function.c
@@ -180,11 +180,13 @@ HRESULT setup_arguments_object(script_ctx_t *ctx, call_frame_t
*frame)
args->argc = frame->argc;
args->frame = frame;
- hres = jsdisp_propput_dontenum(&args->jsdisp, lengthW,
jsval_number(args->argc));
+ hres = jsdisp_define_data_property(&args->jsdisp, lengthW, PROPF_WRITABLE |
PROPF_CONFIGURABLE,
+ jsval_number(args->argc));
if(SUCCEEDED(hres))
- hres = jsdisp_propput_dontenum(&args->jsdisp, caleeW,
jsval_disp(to_disp(&args->function->dispex)));
+ hres = jsdisp_define_data_property(&args->jsdisp, caleeW, PROPF_WRITABLE |
PROPF_CONFIGURABLE,
+
jsval_obj(&args->function->dispex));
if(SUCCEEDED(hres))
- hres = jsdisp_propput(frame->base_scope->jsobj, argumentsW,
PROPF_DONTDELETE, jsval_obj(&args->jsdisp));
+ hres = jsdisp_propput(frame->base_scope->jsobj, argumentsW, PROPF_WRITABLE,
jsval_obj(&args->jsdisp));
if(FAILED(hres)) {
jsdisp_release(&args->jsdisp);
return hres;
@@ -358,12 +360,6 @@ static HRESULT Function_get_length(script_ctx_t *ctx, jsdisp_t
*jsthis, jsval_t
return S_OK;
}
-static HRESULT Function_set_length(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t value)
-{
- FIXME("\n");
- return E_NOTIMPL;
-}
-
static HRESULT Function_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned
argc, jsval_t *argv,
jsval_t *r)
{
@@ -588,9 +584,9 @@ static void Function_destructor(jsdisp_t *dispex)
static const builtin_prop_t Function_props[] = {
{applyW, Function_apply, PROPF_METHOD|2},
- {argumentsW, NULL, 0, Function_get_arguments,
builtin_set_const},
+ {argumentsW, NULL, 0, Function_get_arguments},
{callW, Function_call, PROPF_METHOD|1},
- {lengthW, NULL, 0, Function_get_length,
Function_set_length},
+ {lengthW, NULL, 0, Function_get_length},
{toStringW, Function_toString, PROPF_METHOD}
};
@@ -604,8 +600,8 @@ static const builtin_info_t Function_info = {
};
static const builtin_prop_t FunctionInst_props[] = {
- {argumentsW, NULL, 0, Function_get_arguments,
builtin_set_const},
- {lengthW, NULL, 0, Function_get_length,
Function_set_length}
+ {argumentsW, NULL, 0, Function_get_arguments},
+ {lengthW, NULL, 0, Function_get_length}
};
static const builtin_info_t FunctionInst_info = {
@@ -645,11 +641,6 @@ static HRESULT create_function(script_ctx_t *ctx, const
builtin_info_t *builtin_
return S_OK;
}
-static inline HRESULT set_prototype(script_ctx_t *ctx, jsdisp_t *dispex, jsdisp_t
*prototype)
-{
- return jsdisp_propput_dontenum(dispex, prototypeW, jsval_obj(prototype));
-}
-
HRESULT create_builtin_function(script_ctx_t *ctx, builtin_invoke_t value_proc, const
WCHAR *name,
const builtin_info_t *builtin_info, DWORD flags, jsdisp_t *prototype, jsdisp_t
**ret)
{
@@ -661,9 +652,10 @@ HRESULT create_builtin_function(script_ctx_t *ctx, builtin_invoke_t
value_proc,
return hres;
if(builtin_info)
- hres = jsdisp_propput_const(&function->dispex, lengthW,
jsval_number(function->length));
+ hres = jsdisp_define_data_property(&function->dispex, lengthW, 0,
+ jsval_number(function->length));
if(SUCCEEDED(hres))
- hres = set_prototype(ctx, &function->dispex, prototype);
+ hres = jsdisp_define_data_property(&function->dispex, prototypeW, 0,
jsval_obj(prototype));
if(FAILED(hres)) {
jsdisp_release(&function->dispex);
return hres;
@@ -680,7 +672,8 @@ static HRESULT set_constructor_prop(script_ctx_t *ctx, jsdisp_t
*constr, jsdisp_
{
static const WCHAR constructorW[] =
{'c','o','n','s','t','r','u','c','t','o','r',0};
- return jsdisp_propput_dontenum(prot, constructorW, jsval_obj(constr));
+ return jsdisp_define_data_property(prot, constructorW, PROPF_WRITABLE |
PROPF_CONFIGURABLE,
+ jsval_obj(constr));
}
HRESULT create_builtin_constructor(script_ctx_t *ctx, builtin_invoke_t value_proc, const
WCHAR *name,
@@ -716,7 +709,8 @@ HRESULT create_source_function(script_ctx_t *ctx, bytecode_t *code,
function_cod
hres = create_function(ctx, NULL, PROPF_CONSTR, FALSE, NULL, &function);
if(SUCCEEDED(hres)) {
- hres = set_prototype(ctx, &function->dispex, prototype);
+ hres = jsdisp_define_data_property(&function->dispex, prototypeW,
PROPF_WRITABLE,
+ jsval_obj(prototype));
if(SUCCEEDED(hres))
hres = set_constructor_prop(ctx, &function->dispex, prototype);
if(FAILED(hres))
@@ -874,7 +868,7 @@ HRESULT init_function_constr(script_ctx_t *ctx, jsdisp_t
*object_prototype)
if(SUCCEEDED(hres)) {
constr->value_proc = FunctionConstr_value;
constr->name = FunctionW;
- hres = set_prototype(ctx, &constr->dispex, &prot->dispex);
+ hres = jsdisp_define_data_property(&constr->dispex, prototypeW, 0,
jsval_obj(&prot->dispex));
if(SUCCEEDED(hres))
hres = set_constructor_prop(ctx, &constr->dispex,
&prot->dispex);
if(FAILED(hres))
diff --git a/dll/win32/jscript/global.c b/dll/win32/jscript/global.c
index 6cd5ee9f6a..cc2c3c1ef4 100644
--- a/dll/win32/jscript/global.c
+++ b/dll/win32/jscript/global.c
@@ -978,7 +978,8 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t
*object_prototype)
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, FunctionW,
jsval_obj(ctx->function_constr));
+ hres = jsdisp_define_data_property(ctx->global, FunctionW, PROPF_WRITABLE,
+ jsval_obj(ctx->function_constr));
if(FAILED(hres))
return hres;
@@ -986,7 +987,8 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t
*object_prototype)
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, ObjectW,
jsval_obj(ctx->object_constr));
+ hres = jsdisp_define_data_property(ctx->global, ObjectW, PROPF_WRITABLE,
+ jsval_obj(ctx->object_constr));
if(FAILED(hres))
return hres;
@@ -994,7 +996,8 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t
*object_prototype)
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, ArrayW,
jsval_obj(ctx->array_constr));
+ hres = jsdisp_define_data_property(ctx->global, ArrayW, PROPF_WRITABLE,
+ jsval_obj(ctx->array_constr));
if(FAILED(hres))
return hres;
@@ -1002,7 +1005,8 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t
*object_prototype)
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, BooleanW,
jsval_obj(ctx->bool_constr));
+ hres = jsdisp_define_data_property(ctx->global, BooleanW, PROPF_WRITABLE,
+ jsval_obj(ctx->bool_constr));
if(FAILED(hres))
return hres;
@@ -1010,7 +1014,8 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t
*object_prototype)
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, DateW,
jsval_obj(ctx->date_constr));
+ hres = jsdisp_define_data_property(ctx->global, DateW, PROPF_WRITABLE,
+ jsval_obj(ctx->date_constr));
if(FAILED(hres))
return hres;
@@ -1018,35 +1023,43 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t
*object_prototype)
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, ErrorW,
jsval_obj(ctx->error_constr));
+ hres = jsdisp_define_data_property(ctx->global, ErrorW, PROPF_WRITABLE,
+ jsval_obj(ctx->error_constr));
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, EvalErrorW,
jsval_obj(ctx->eval_error_constr));
+ hres = jsdisp_define_data_property(ctx->global, EvalErrorW, PROPF_WRITABLE,
+ jsval_obj(ctx->eval_error_constr));
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, RangeErrorW,
jsval_obj(ctx->range_error_constr));
+ hres = jsdisp_define_data_property(ctx->global, RangeErrorW, PROPF_WRITABLE,
+ jsval_obj(ctx->range_error_constr));
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, ReferenceErrorW,
jsval_obj(ctx->reference_error_constr));
+ hres = jsdisp_define_data_property(ctx->global, ReferenceErrorW, PROPF_WRITABLE,
+ jsval_obj(ctx->reference_error_constr));
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, RegExpErrorW,
jsval_obj(ctx->regexp_error_constr));
+ hres = jsdisp_define_data_property(ctx->global, RegExpErrorW, PROPF_WRITABLE,
+ jsval_obj(ctx->regexp_error_constr));
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, SyntaxErrorW,
jsval_obj(ctx->syntax_error_constr));
+ hres = jsdisp_define_data_property(ctx->global, SyntaxErrorW, PROPF_WRITABLE,
+ jsval_obj(ctx->syntax_error_constr));
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, TypeErrorW,
jsval_obj(ctx->type_error_constr));
+ hres = jsdisp_define_data_property(ctx->global, TypeErrorW, PROPF_WRITABLE,
+ jsval_obj(ctx->type_error_constr));
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, URIErrorW,
jsval_obj(ctx->uri_error_constr));
+ hres = jsdisp_define_data_property(ctx->global, URIErrorW, PROPF_WRITABLE,
+ jsval_obj(ctx->uri_error_constr));
if(FAILED(hres))
return hres;
@@ -1054,7 +1067,8 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t
*object_prototype)
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, NumberW,
jsval_obj(ctx->number_constr));
+ hres = jsdisp_define_data_property(ctx->global, NumberW, PROPF_WRITABLE,
+ jsval_obj(ctx->number_constr));
if(FAILED(hres))
return hres;
@@ -1062,7 +1076,8 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t
*object_prototype)
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, RegExpW,
jsval_obj(ctx->regexp_constr));
+ hres = jsdisp_define_data_property(ctx->global, RegExpW, PROPF_WRITABLE,
+ jsval_obj(ctx->regexp_constr));
if(FAILED(hres))
return hres;
@@ -1070,7 +1085,8 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t
*object_prototype)
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, StringW,
jsval_obj(ctx->string_constr));
+ hres = jsdisp_define_data_property(ctx->global, StringW, PROPF_WRITABLE,
+ jsval_obj(ctx->string_constr));
if(FAILED(hres))
return hres;
@@ -1078,7 +1094,8 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t
*object_prototype)
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, VBArrayW,
jsval_obj(ctx->vbarray_constr));
+ hres = jsdisp_define_data_property(ctx->global, VBArrayW, PROPF_WRITABLE,
+ jsval_obj(ctx->vbarray_constr));
if(FAILED(hres))
return hres;
@@ -1087,6 +1104,7 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t
*object_prototype)
HRESULT init_global(script_ctx_t *ctx)
{
+ unsigned const_flags = ctx->version >= SCRIPTLANGUAGEVERSION_ES5 ? 0 :
PROPF_WRITABLE;
jsdisp_t *math, *object_prototype, *constr;
HRESULT hres;
@@ -1110,7 +1128,7 @@ HRESULT init_global(script_ctx_t *ctx)
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, MathW, jsval_obj(math));
+ hres = jsdisp_define_data_property(ctx->global, MathW, PROPF_WRITABLE,
jsval_obj(math));
jsdisp_release(math);
if(FAILED(hres))
return hres;
@@ -1122,7 +1140,7 @@ HRESULT init_global(script_ctx_t *ctx)
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, JSONW, jsval_obj(json));
+ hres = jsdisp_define_data_property(ctx->global, JSONW, PROPF_WRITABLE,
jsval_obj(json));
jsdisp_release(json);
if(FAILED(hres))
return hres;
@@ -1132,19 +1150,20 @@ HRESULT init_global(script_ctx_t *ctx)
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, ActiveXObjectW, jsval_obj(constr));
+ hres = jsdisp_define_data_property(ctx->global, ActiveXObjectW, PROPF_WRITABLE,
+ jsval_obj(constr));
jsdisp_release(constr);
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, undefinedW, jsval_undefined());
+ hres = jsdisp_define_data_property(ctx->global, undefinedW, const_flags,
jsval_undefined());
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, NaNW, jsval_number(NAN));
+ hres = jsdisp_define_data_property(ctx->global, NaNW, const_flags,
jsval_number(NAN));
if(FAILED(hres))
return hres;
- hres = jsdisp_propput_dontenum(ctx->global, InfinityW, jsval_number(INFINITY));
+ hres = jsdisp_define_data_property(ctx->global, InfinityW, const_flags,
jsval_number(INFINITY));
return hres;
}
diff --git a/dll/win32/jscript/jscript.h b/dll/win32/jscript/jscript.h
index 6f06062a8b..7b5cf90e0e 100644
--- a/dll/win32/jscript/jscript.h
+++ b/dll/win32/jscript/jscript.h
@@ -52,6 +52,7 @@ typedef struct _jsval_t jsval_t;
typedef struct _jsstr_t jsstr_t;
typedef struct _script_ctx_t script_ctx_t;
typedef struct _dispex_prop_t dispex_prop_t;
+typedef struct _property_desc_t property_desc_t;
typedef struct {
void **blocks;
@@ -89,12 +90,12 @@ typedef struct jsdisp_t jsdisp_t;
extern HINSTANCE jscript_hinstance DECLSPEC_HIDDEN;
-#define PROPF_ARGMASK 0x00ff
-#define PROPF_METHOD 0x0100
-#define PROPF_ENUM 0x0200
-#define PROPF_CONSTR 0x0400
-#define PROPF_CONST 0x0800
-#define PROPF_DONTDELETE 0x1000
+#define PROPF_ARGMASK 0x00ff
+#define PROPF_METHOD 0x0100
+#define PROPF_ENUMERABLE 0x0200
+#define PROPF_CONSTR 0x0400
+#define PROPF_WRITABLE 0x0800
+#define PROPF_CONFIGURABLE 0x1000
#define PROPF_VERSION_MASK 0x01ff0000
#define PROPF_VERSION_SHIFT 16
@@ -285,8 +286,6 @@ HRESULT disp_propput(script_ctx_t*,IDispatch*,DISPID,jsval_t)
DECLSPEC_HIDDEN;
HRESULT jsdisp_propget(jsdisp_t*,DISPID,jsval_t*) DECLSPEC_HIDDEN;
HRESULT jsdisp_propput(jsdisp_t*,const WCHAR*,DWORD,jsval_t) DECLSPEC_HIDDEN;
HRESULT jsdisp_propput_name(jsdisp_t*,const WCHAR*,jsval_t) DECLSPEC_HIDDEN;
-HRESULT jsdisp_propput_const(jsdisp_t*,const WCHAR*,jsval_t) DECLSPEC_HIDDEN;
-HRESULT jsdisp_propput_dontenum(jsdisp_t*,const WCHAR*,jsval_t) DECLSPEC_HIDDEN;
HRESULT jsdisp_propput_idx(jsdisp_t*,DWORD,jsval_t) DECLSPEC_HIDDEN;
HRESULT jsdisp_propget_name(jsdisp_t*,LPCWSTR,jsval_t*) DECLSPEC_HIDDEN;
HRESULT jsdisp_get_idx(jsdisp_t*,DWORD,jsval_t*) DECLSPEC_HIDDEN;
@@ -294,8 +293,9 @@ HRESULT jsdisp_get_id(jsdisp_t*,const WCHAR*,DWORD,DISPID*)
DECLSPEC_HIDDEN;
HRESULT disp_delete(IDispatch*,DISPID,BOOL*) DECLSPEC_HIDDEN;
HRESULT disp_delete_name(script_ctx_t*,IDispatch*,jsstr_t*,BOOL*) DECLSPEC_HIDDEN;
HRESULT jsdisp_delete_idx(jsdisp_t*,DWORD) DECLSPEC_HIDDEN;
-HRESULT jsdisp_is_own_prop(jsdisp_t*,const WCHAR*,BOOL*) DECLSPEC_HIDDEN;
-HRESULT jsdisp_is_enumerable(jsdisp_t*,const WCHAR*,BOOL*) DECLSPEC_HIDDEN;
+HRESULT jsdisp_get_own_property(jsdisp_t*,const WCHAR*,BOOL,property_desc_t*)
DECLSPEC_HIDDEN;
+HRESULT jsdisp_define_property(jsdisp_t*,const WCHAR*,property_desc_t*) DECLSPEC_HIDDEN;
+HRESULT jsdisp_define_data_property(jsdisp_t*,const WCHAR*,unsigned,jsval_t)
DECLSPEC_HIDDEN;
HRESULT create_builtin_function(script_ctx_t*,builtin_invoke_t,const WCHAR*,const
builtin_info_t*,DWORD,
jsdisp_t*,jsdisp_t**) DECLSPEC_HIDDEN;
@@ -378,6 +378,17 @@ typedef struct {
#include "jsval.h"
+struct _property_desc_t {
+ unsigned flags;
+ unsigned mask;
+ BOOL explicit_value;
+ jsval_t value;
+ BOOL explicit_getter;
+ jsdisp_t *getter;
+ BOOL explicit_setter;
+ jsdisp_t *setter;
+};
+
typedef struct {
EXCEPINFO ei;
jsval_t val;
@@ -553,6 +564,10 @@ static inline DWORD make_grfdex(script_ctx_t *ctx, DWORD flags)
#define JS_E_PRECISION_OUT_OF_RANGE MAKE_JSERROR(IDS_PRECISION_OUT_OF_RANGE)
#define JS_E_INVALID_LENGTH MAKE_JSERROR(IDS_INVALID_LENGTH)
#define JS_E_ARRAY_EXPECTED MAKE_JSERROR(IDS_ARRAY_EXPECTED)
+#define JS_E_NONCONFIGURABLE_REDEFINED MAKE_JSERROR(IDS_NONCONFIGURABLE_REDEFINED)
+#define JS_E_NONWRITABLE_MODIFIED MAKE_JSERROR(IDS_NONWRITABLE_MODIFIED)
+#define JS_E_PROP_DESC_MISMATCH MAKE_JSERROR(IDS_PROP_DESC_MISMATCH)
+#define JS_E_INVALID_WRITABLE_PROP_DESC MAKE_JSERROR(IDS_INVALID_WRITABLE_PROP_DESC)
static inline BOOL is_jscript_error(HRESULT hres)
{
diff --git a/dll/win32/jscript/json.c b/dll/win32/jscript/json.c
index fc23b54c0d..0430d415ba 100644
--- a/dll/win32/jscript/json.c
+++ b/dll/win32/jscript/json.c
@@ -768,6 +768,12 @@ static HRESULT JSON_stringify(script_ctx_t *ctx, vdisp_t *jsthis,
WORD flags, un
TRACE("\n");
+ if(!argc) {
+ if(r)
+ *r = jsval_undefined();
+ return S_OK;
+ }
+
if(argc >= 2 && is_object_instance(argv[1])) {
FIXME("Replacer %s not yet supported\n", debugstr_jsval(argv[1]));
return E_NOTIMPL;
diff --git a/dll/win32/jscript/jsregexp.c b/dll/win32/jscript/jsregexp.c
index 5798635cb8..821c0164eb 100644
--- a/dll/win32/jscript/jsregexp.c
+++ b/dll/win32/jscript/jsregexp.c
@@ -256,12 +256,6 @@ static HRESULT RegExp_get_source(script_ctx_t *ctx, jsdisp_t *jsthis,
jsval_t *r
return S_OK;
}
-static HRESULT RegExp_set_source(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t value)
-{
- FIXME("\n");
- return E_NOTIMPL;
-}
-
static HRESULT RegExp_get_global(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
{
TRACE("\n");
@@ -270,12 +264,6 @@ static HRESULT RegExp_get_global(script_ctx_t *ctx, jsdisp_t *jsthis,
jsval_t *r
return S_OK;
}
-static HRESULT RegExp_set_global(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t value)
-{
- FIXME("\n");
- return E_NOTIMPL;
-}
-
static HRESULT RegExp_get_ignoreCase(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
{
TRACE("\n");
@@ -284,12 +272,6 @@ static HRESULT RegExp_get_ignoreCase(script_ctx_t *ctx, jsdisp_t
*jsthis, jsval_
return S_OK;
}
-static HRESULT RegExp_set_ignoreCase(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t value)
-{
- FIXME("\n");
- return E_NOTIMPL;
-}
-
static HRESULT RegExp_get_multiline(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
{
TRACE("\n");
@@ -298,12 +280,6 @@ static HRESULT RegExp_get_multiline(script_ctx_t *ctx, jsdisp_t
*jsthis, jsval_t
return S_OK;
}
-static HRESULT RegExp_set_multiline(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t value)
-{
- FIXME("\n");
- return E_NOTIMPL;
-}
-
static INT index_from_val(script_ctx_t *ctx, jsval_t v)
{
double n;
@@ -607,11 +583,11 @@ static void RegExp_destructor(jsdisp_t *dispex)
static const builtin_prop_t RegExp_props[] = {
{execW, RegExp_exec, PROPF_METHOD|1},
- {globalW, NULL,0, RegExp_get_global,
RegExp_set_global},
- {ignoreCaseW, NULL,0, RegExp_get_ignoreCase,
RegExp_set_ignoreCase},
+ {globalW, NULL,0, RegExp_get_global},
+ {ignoreCaseW, NULL,0, RegExp_get_ignoreCase},
{lastIndexW, NULL,0, RegExp_get_lastIndex,
RegExp_set_lastIndex},
- {multilineW, NULL,0, RegExp_get_multiline,
RegExp_set_multiline},
- {sourceW, NULL,0, RegExp_get_source,
RegExp_set_source},
+ {multilineW, NULL,0, RegExp_get_multiline},
+ {sourceW, NULL,0, RegExp_get_source},
{testW, RegExp_test, PROPF_METHOD|1},
{toStringW, RegExp_toString, PROPF_METHOD}
};
@@ -626,11 +602,11 @@ static const builtin_info_t RegExp_info = {
};
static const builtin_prop_t RegExpInst_props[] = {
- {globalW, NULL,0, RegExp_get_global,
RegExp_set_global},
- {ignoreCaseW, NULL,0, RegExp_get_ignoreCase,
RegExp_set_ignoreCase},
+ {globalW, NULL,0, RegExp_get_global},
+ {ignoreCaseW, NULL,0, RegExp_get_ignoreCase},
{lastIndexW, NULL,0, RegExp_get_lastIndex,
RegExp_set_lastIndex},
- {multilineW, NULL,0, RegExp_get_multiline,
RegExp_set_multiline},
- {sourceW, NULL,0, RegExp_get_source,
RegExp_set_source}
+ {multilineW, NULL,0, RegExp_get_multiline},
+ {sourceW, NULL,0, RegExp_get_source}
};
static const builtin_info_t RegExpInst_info = {
diff --git a/dll/win32/jscript/jsutils.c b/dll/win32/jscript/jsutils.c
index 4556ec45a3..90206113a2 100644
--- a/dll/win32/jscript/jsutils.c
+++ b/dll/win32/jscript/jsutils.c
@@ -659,11 +659,18 @@ HRESULT to_int32(script_ctx_t *ctx, jsval_t v, INT *ret)
double n;
HRESULT hres;
+ const double p32 = (double)0xffffffff + 1;
+
hres = to_number(ctx, v, &n);
if(FAILED(hres))
return hres;
- *ret = is_finite(n) ? n : 0;
+ if(is_finite(n))
+ n = n > 0 ? fmod(n, p32) : -fmod(-n, p32);
+ else
+ n = 0;
+
+ *ret = (UINT32)n;
return S_OK;
}
diff --git a/dll/win32/jscript/lex.c b/dll/win32/jscript/lex.c
index 352395865f..b4cc82a259 100644
--- a/dll/win32/jscript/lex.c
+++ b/dll/win32/jscript/lex.c
@@ -135,7 +135,7 @@ static int check_keyword(parser_ctx_t *ctx, const WCHAR *word, const
WCHAR **lva
return 1;
if(lval)
- *lval = ctx->ptr;
+ *lval = word;
ctx->ptr = p1;
return 0;
}
@@ -487,18 +487,18 @@ static BOOL parse_numeric_literal(parser_ctx_t *ctx, double *ret)
HRESULT hres;
if(*ctx->ptr == '0') {
- LONG d, l = 0;
-
ctx->ptr++;
if(*ctx->ptr == 'x' || *ctx->ptr == 'X') {
+ double r = 0;
+ int d;
if(++ctx->ptr == ctx->end) {
ERR("unexpected end of file\n");
return FALSE;
}
while(ctx->ptr < ctx->end && (d = hex_to_int(*ctx->ptr))
!= -1) {
- l = l*16 + d;
+ r = r*16 + d;
ctx->ptr++;
}
@@ -508,7 +508,7 @@ static BOOL parse_numeric_literal(parser_ctx_t *ctx, double *ret)
return FALSE;
}
- *ret = l;
+ *ret = r;
return TRUE;
}
diff --git a/dll/win32/jscript/math.c b/dll/win32/jscript/math.c
index ef906f5439..109df9d321 100644
--- a/dll/win32/jscript/math.c
+++ b/dll/win32/jscript/math.c
@@ -559,7 +559,8 @@ HRESULT create_math(script_ctx_t *ctx, jsdisp_t **ret)
}
for(i=0; i < sizeof(constants)/sizeof(*constants); i++) {
- hres = jsdisp_propput_const(math, constants[i].name,
jsval_number(constants[i].val));
+ hres = jsdisp_define_data_property(math, constants[i].name, 0,
+ jsval_number(constants[i].val));
if(FAILED(hres)) {
jsdisp_release(math);
return hres;
diff --git a/dll/win32/jscript/object.c b/dll/win32/jscript/object.c
index de09060e8a..d18f1c9c00 100644
--- a/dll/win32/jscript/object.c
+++ b/dll/win32/jscript/object.c
@@ -32,8 +32,21 @@ static const WCHAR propertyIsEnumerableW[] =
{'p','r','o','p','e','r','t','y','I','s','E','n','u','m','e','r','a','b','l','e',0};
static const WCHAR isPrototypeOfW[] =
{'i','s','P','r','o','t','o','t','y','p','e','O','f',0};
+static const WCHAR getOwnPropertyDescriptorW[] =
+
{'g','e','t','O','w','n','P','r','o','p','e','r','t','y','D','e','s','c','r','i','p','t','o','r',0};
+static const WCHAR definePropertyW[] =
{'d','e','f','i','n','e','P','r','o','p','e','r','t','y',0};
+
+static const WCHAR definePropertiesW[] =
{'d','e','f','i','n','e','P','r','o','p','e','r','t','i','e','s',0};
+
static const WCHAR default_valueW[] =
{'[','o','b','j','e','c','t','
','O','b','j','e','c','t',']',0};
+static const WCHAR configurableW[] =
{'c','o','n','f','i','g','u','r','a','b','l','e',0};
+static const WCHAR enumerableW[] =
{'e','n','u','m','e','r','a','b','l','e',0};
+static const WCHAR valueW[] =
{'v','a','l','u','e',0};
+static const WCHAR writableW[] =
{'w','r','i','t','a','b','l','e',0};
+static const WCHAR getW[] = {'g','e','t',0};
+static const WCHAR setW[] = {'s','e','t',0};
+
static HRESULT Object_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned
argc, jsval_t *argv,
jsval_t *r)
{
@@ -130,20 +143,21 @@ static HRESULT Object_hasOwnProperty(script_ctx_t *ctx, vdisp_t
*jsthis, WORD fl
return hres;
if(is_jsdisp(jsthis)) {
+ property_desc_t prop_desc;
const WCHAR *name_str;
- BOOL result;
name_str = jsstr_flatten(name);
- if(name_str)
- hres = jsdisp_is_own_prop(jsthis->u.jsdisp, name_str, &result);
- else
- hres = E_OUTOFMEMORY;
+ if(!name_str) {
+ jsstr_release(name);
+ return E_OUTOFMEMORY;
+ }
+
+ hres = jsdisp_get_own_property(jsthis->u.jsdisp, name_str, TRUE,
&prop_desc);
jsstr_release(name);
- if(FAILED(hres))
+ if(FAILED(hres) && hres != DISP_E_UNKNOWNNAME)
return hres;
- if(r)
- *r = jsval_bool(result);
+ if(r) *r = jsval_bool(hres == S_OK);
return S_OK;
}
@@ -169,9 +183,9 @@ static HRESULT Object_hasOwnProperty(script_ctx_t *ctx, vdisp_t
*jsthis, WORD fl
static HRESULT Object_propertyIsEnumerable(script_ctx_t *ctx, vdisp_t *jsthis, WORD
flags, unsigned argc, jsval_t *argv,
jsval_t *r)
{
+ property_desc_t prop_desc;
const WCHAR *name;
jsstr_t *name_str;
- BOOL ret;
HRESULT hres;
TRACE("\n");
@@ -190,13 +204,13 @@ static HRESULT Object_propertyIsEnumerable(script_ctx_t *ctx,
vdisp_t *jsthis, W
if(FAILED(hres))
return hres;
- hres = jsdisp_is_enumerable(jsthis->u.jsdisp, name, &ret);
+ hres = jsdisp_get_own_property(jsthis->u.jsdisp, name, TRUE, &prop_desc);
jsstr_release(name_str);
- if(FAILED(hres))
+ if(FAILED(hres) && hres != DISP_E_UNKNOWNNAME)
return hres;
if(r)
- *r = jsval_bool(ret);
+ *r = jsval_bool(hres == S_OK && (prop_desc.flags & PROPF_ENUMERABLE)
!= 0);
return S_OK;
}
@@ -252,6 +266,274 @@ static const builtin_info_t ObjectInst_info = {
NULL
};
+static void release_property_descriptor(property_desc_t *desc)
+{
+ if(desc->explicit_value)
+ jsval_release(desc->value);
+ if(desc->getter)
+ jsdisp_release(desc->getter);
+ if(desc->setter)
+ jsdisp_release(desc->setter);
+}
+
+static HRESULT to_property_descriptor(script_ctx_t *ctx, jsdisp_t *attr_obj,
property_desc_t *desc)
+{
+ DISPID id;
+ jsval_t v;
+ BOOL b;
+ HRESULT hres;
+
+ memset(desc, 0, sizeof(*desc));
+ desc->value = jsval_undefined();
+
+ hres = jsdisp_get_id(attr_obj, enumerableW, 0, &id);
+ if(SUCCEEDED(hres)) {
+ desc->mask |= PROPF_ENUMERABLE;
+ hres = jsdisp_propget(attr_obj, id, &v);
+ if(FAILED(hres))
+ return hres;
+ hres = to_boolean(v, &b);
+ jsval_release(v);
+ if(FAILED(hres))
+ return hres;
+ if(b)
+ desc->flags |= PROPF_ENUMERABLE;
+ }else if(hres != DISP_E_UNKNOWNNAME) {
+ return hres;
+ }
+
+ hres = jsdisp_get_id(attr_obj, configurableW, 0, &id);
+ if(SUCCEEDED(hres)) {
+ desc->mask |= PROPF_CONFIGURABLE;
+ hres = jsdisp_propget(attr_obj, id, &v);
+ if(FAILED(hres))
+ return hres;
+ hres = to_boolean(v, &b);
+ jsval_release(v);
+ if(FAILED(hres))
+ return hres;
+ if(b)
+ desc->flags |= PROPF_CONFIGURABLE;
+ }else if(hres != DISP_E_UNKNOWNNAME) {
+ return hres;
+ }
+
+ hres = jsdisp_get_id(attr_obj, valueW, 0, &id);
+ if(SUCCEEDED(hres)) {
+ hres = jsdisp_propget(attr_obj, id, &desc->value);
+ if(FAILED(hres))
+ return hres;
+ desc->explicit_value = TRUE;
+ }else if(hres != DISP_E_UNKNOWNNAME) {
+ return hres;
+ }
+
+ hres = jsdisp_get_id(attr_obj, writableW, 0, &id);
+ if(SUCCEEDED(hres)) {
+ desc->mask |= PROPF_WRITABLE;
+ hres = jsdisp_propget(attr_obj, id, &v);
+ if(SUCCEEDED(hres)) {
+ hres = to_boolean(v, &b);
+ jsval_release(v);
+ if(SUCCEEDED(hres) && b)
+ desc->flags |= PROPF_WRITABLE;
+ }
+ }else if(hres == DISP_E_UNKNOWNNAME) {
+ hres = S_OK;
+ }
+ if(FAILED(hres)) {
+ release_property_descriptor(desc);
+ return hres;
+ }
+
+ hres = jsdisp_get_id(attr_obj, getW, 0, &id);
+ if(SUCCEEDED(hres)) {
+ desc->explicit_getter = TRUE;
+ hres = jsdisp_propget(attr_obj, id, &v);
+ if(SUCCEEDED(hres) && !is_undefined(v)) {
+ if(!is_object_instance(v)) {
+ FIXME("getter is not an object\n");
+ jsval_release(v);
+ hres = E_FAIL;
+ }else {
+ /* FIXME: Check IsCallable */
+ desc->getter = to_jsdisp(get_object(v));
+ if(!desc->getter)
+ FIXME("getter is not JS object\n");
+ }
+ }
+ }else if(hres == DISP_E_UNKNOWNNAME) {
+ hres = S_OK;
+ }
+ if(FAILED(hres)) {
+ release_property_descriptor(desc);
+ return hres;
+ }
+
+ hres = jsdisp_get_id(attr_obj, setW, 0, &id);
+ if(SUCCEEDED(hres)) {
+ desc->explicit_setter = TRUE;
+ hres = jsdisp_propget(attr_obj, id, &v);
+ if(SUCCEEDED(hres) && !is_undefined(v)) {
+ if(!is_object_instance(v)) {
+ FIXME("setter is not an object\n");
+ jsval_release(v);
+ hres = E_FAIL;
+ }else {
+ /* FIXME: Check IsCallable */
+ desc->setter = to_jsdisp(get_object(v));
+ if(!desc->setter)
+ FIXME("setter is not JS object\n");
+ }
+ }
+ }else if(hres == DISP_E_UNKNOWNNAME) {
+ hres = S_OK;
+ }
+ if(FAILED(hres)) {
+ release_property_descriptor(desc);
+ return hres;
+ }
+
+ if(desc->explicit_getter || desc->explicit_setter) {
+ if(desc->explicit_value)
+ hres = throw_type_error(ctx, JS_E_PROP_DESC_MISMATCH, NULL);
+ else if(desc->mask & PROPF_WRITABLE)
+ hres = throw_type_error(ctx, JS_E_INVALID_WRITABLE_PROP_DESC, NULL);
+ }
+
+ if(FAILED(hres))
+ release_property_descriptor(desc);
+ return hres;
+}
+
+static HRESULT Object_defineProperty(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
+ unsigned argc, jsval_t *argv, jsval_t *r)
+{
+ property_desc_t prop_desc;
+ jsdisp_t *obj, *attr_obj;
+ const WCHAR *name;
+ jsstr_t *name_str;
+ HRESULT hres;
+
+ TRACE("\n");
+
+ if(argc < 1 || !is_object_instance(argv[0]))
+ return throw_type_error(ctx, JS_E_OBJECT_EXPECTED, NULL);
+ obj = to_jsdisp(get_object(argv[0]));
+ if(!obj) {
+ FIXME("not implemented non-JS object\n");
+ return E_NOTIMPL;
+ }
+
+ hres = to_flat_string(ctx, argc >= 2 ? argv[1] : jsval_undefined(), &name_str,
&name);
+ if(FAILED(hres))
+ return hres;
+
+ if(argc >= 3 && is_object_instance(argv[2])) {
+ attr_obj = to_jsdisp(get_object(argv[2]));
+ if(attr_obj) {
+ hres = to_property_descriptor(ctx, attr_obj, &prop_desc);
+ }else {
+ FIXME("not implemented non-JS object\n");
+ hres = E_NOTIMPL;
+ }
+ }else {
+ hres = throw_type_error(ctx, JS_E_OBJECT_EXPECTED, NULL);
+ }
+ jsstr_release(name_str);
+ if(FAILED(hres))
+ return hres;
+
+ hres = jsdisp_define_property(obj, name, &prop_desc);
+ release_property_descriptor(&prop_desc);
+ return hres;
+}
+
+static HRESULT Object_defineProperties(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
+ unsigned argc, jsval_t *argv, jsval_t *r)
+{
+ FIXME("\n");
+ return E_NOTIMPL;
+}
+
+static HRESULT Object_getOwnPropertyDescriptor(script_ctx_t *ctx, vdisp_t *jsthis, WORD
flags,
+ unsigned argc, jsval_t *argv, jsval_t *r)
+{
+ property_desc_t prop_desc;
+ jsdisp_t *obj, *desc_obj;
+ const WCHAR *name;
+ jsstr_t *name_str;
+ HRESULT hres;
+
+ TRACE("\n");
+
+ if(argc < 1 || !is_object_instance(argv[0]))
+ return throw_type_error(ctx, JS_E_OBJECT_EXPECTED, NULL);
+ obj = to_jsdisp(get_object(argv[0]));
+ if(!obj) {
+ FIXME("not implemented non-JS object\n");
+ return E_NOTIMPL;
+ }
+
+ hres = to_flat_string(ctx, argc >= 2 ? argv[1] : jsval_undefined(), &name_str,
&name);
+ if(FAILED(hres))
+ return hres;
+
+ hres = jsdisp_get_own_property(obj, name, FALSE, &prop_desc);
+ jsstr_release(name_str);
+ if(hres == DISP_E_UNKNOWNNAME) {
+ if(r) *r = jsval_undefined();
+ return S_OK;
+ }
+ if(FAILED(hres))
+ return hres;
+
+ hres = create_object(ctx, NULL, &desc_obj);
+ if(FAILED(hres))
+ return hres;
+
+ if(prop_desc.explicit_getter || prop_desc.explicit_setter) {
+ hres = jsdisp_propput_name(desc_obj, getW, prop_desc.getter
+ ? jsval_obj(prop_desc.getter) : jsval_undefined());
+ if(SUCCEEDED(hres))
+ hres = jsdisp_propput_name(desc_obj, setW, prop_desc.setter
+ ? jsval_obj(prop_desc.setter) :
jsval_undefined());
+ }else {
+ hres = jsdisp_propput_name(desc_obj, valueW, prop_desc.value);
+ if(SUCCEEDED(hres))
+ hres = jsdisp_propput_name(desc_obj, writableW,
+ jsval_bool(!!(prop_desc.flags &
PROPF_WRITABLE)));
+ }
+ if(SUCCEEDED(hres))
+ hres = jsdisp_propput_name(desc_obj, enumerableW,
+ jsval_bool(!!(prop_desc.flags &
PROPF_ENUMERABLE)));
+ if(SUCCEEDED(hres))
+ hres = jsdisp_propput_name(desc_obj, configurableW,
+ jsval_bool(!!(prop_desc.flags &
PROPF_CONFIGURABLE)));
+
+ release_property_descriptor(&prop_desc);
+ if(SUCCEEDED(hres) && r)
+ *r = jsval_obj(desc_obj);
+ else
+ jsdisp_release(desc_obj);
+ return hres;
+}
+
+static const builtin_prop_t ObjectConstr_props[] = {
+ {definePropertiesW, Object_defineProperties,
PROPF_ES5|PROPF_METHOD|2},
+ {definePropertyW, Object_defineProperty,
PROPF_ES5|PROPF_METHOD|2},
+ {getOwnPropertyDescriptorW, Object_getOwnPropertyDescriptor,
PROPF_ES5|PROPF_METHOD|2}
+};
+
+static const builtin_info_t ObjectConstr_info = {
+ JSCLASS_FUNCTION,
+ DEFAULT_FUNCTION_VALUE,
+ sizeof(ObjectConstr_props)/sizeof(*ObjectConstr_props),
+ ObjectConstr_props,
+ NULL,
+ NULL
+};
+
static HRESULT ObjectConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
unsigned argc, jsval_t *argv,
jsval_t *r)
{
@@ -303,7 +585,7 @@ HRESULT create_object_constr(script_ctx_t *ctx, jsdisp_t
*object_prototype, jsdi
{
static const WCHAR ObjectW[] =
{'O','b','j','e','c','t',0};
- return create_builtin_constructor(ctx, ObjectConstr_value, ObjectW, NULL,
PROPF_CONSTR,
+ return create_builtin_constructor(ctx, ObjectConstr_value, ObjectW,
&ObjectConstr_info, PROPF_CONSTR,
object_prototype, ret);
}
diff --git a/dll/win32/jscript/parser.tab.c b/dll/win32/jscript/parser.tab.c
index d72f750ba0..65c26dcf68 100644
--- a/dll/win32/jscript/parser.tab.c
+++ b/dll/win32/jscript/parser.tab.c
@@ -232,33 +232,33 @@ extern int parser_debug;
kDELETE = 263,
kDO = 264,
kELSE = 265,
- kIF = 266,
- kFINALLY = 267,
- kFOR = 268,
- kIN = 269,
- kINSTANCEOF = 270,
- kNEW = 271,
- kNULL = 272,
- kRETURN = 273,
- kSWITCH = 274,
- kTHIS = 275,
- kTHROW = 276,
- kTRUE = 277,
- kFALSE = 278,
- kTRY = 279,
- kTYPEOF = 280,
- kVAR = 281,
- kVOID = 282,
- kWHILE = 283,
- kWITH = 284,
- tANDAND = 285,
- tOROR = 286,
- tINC = 287,
- tDEC = 288,
- tHTMLCOMMENT = 289,
- kDIVEQ = 290,
- kDCOL = 291,
- kFUNCTION = 292,
+ kFUNCTION = 266,
+ kIF = 267,
+ kFINALLY = 268,
+ kFOR = 269,
+ kIN = 270,
+ kINSTANCEOF = 271,
+ kNEW = 272,
+ kNULL = 273,
+ kRETURN = 274,
+ kSWITCH = 275,
+ kTHIS = 276,
+ kTHROW = 277,
+ kTRUE = 278,
+ kFALSE = 279,
+ kTRY = 280,
+ kTYPEOF = 281,
+ kVAR = 282,
+ kVOID = 283,
+ kWHILE = 284,
+ kWITH = 285,
+ tANDAND = 286,
+ tOROR = 287,
+ tINC = 288,
+ tDEC = 289,
+ tHTMLCOMMENT = 290,
+ kDIVEQ = 291,
+ kDCOL = 292,
tIdentifier = 293,
tAssignOper = 294,
tEqOper = 295,
@@ -535,16 +535,16 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 3
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 1085
+#define YYLAST 1287
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 70
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 95
+#define YYNNTS 97
/* YYNRULES -- Number of rules. */
-#define YYNRULES 217
+#define YYNRULES 247
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 389
+#define YYNSTATES 440
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
@@ -595,28 +595,31 @@ static const yytype_uint8 yytranslate[] =
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 252, 252, 256, 257, 261, 262, 267, 269, 271,
- 275, 279, 283, 284, 289, 290, 294, 295, 296, 297,
- 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
- 308, 312, 313, 318, 319, 323, 324, 328, 333, 334,
- 339, 341, 346, 351, 356, 357, 361, 366, 367, 371,
- 376, 380, 385, 387, 392, 394, 397, 399, 396, 403,
- 405, 402, 408, 410, 415, 420, 425, 430, 435, 440,
- 445, 447, 452, 453, 457, 458, 463, 468, 473, 478,
- 479, 480, 485, 490, 494, 495, 498, 499, 503, 504,
- 509, 510, 514, 516, 520, 521, 525, 526, 528, 533,
- 535, 537, 542, 543, 548, 550, 555, 556, 561, 563,
- 568, 569, 574, 576, 581, 582, 587, 589, 594, 595,
- 600, 602, 607, 608, 613, 615, 620, 621, 626, 627,
- 632, 633, 635, 637, 642, 643, 645, 650, 651, 656,
- 658, 660, 665, 666, 668, 670, 675, 676, 678, 679,
- 681, 682, 683, 684, 685, 686, 690, 692, 694, 700,
- 701, 705, 706, 710, 711, 712, 714, 716, 721, 723,
- 725, 727, 732, 733, 737, 738, 743, 744, 745, 746,
- 747, 748, 752, 753, 754, 755, 760, 762, 767, 768,
- 772, 773, 777, 778, 783, 785, 790, 791, 792, 796,
- 797, 801, 802, 803, 804, 805, 807, 812, 813, 814,
- 817, 818, 821, 822, 825, 826, 829, 830
+ 0, 253, 253, 257, 258, 262, 263, 268, 270, 272,
+ 276, 280, 284, 285, 290, 291, 295, 296, 297, 298,
+ 299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
+ 309, 313, 314, 319, 320, 324, 325, 329, 334, 335,
+ 340, 342, 347, 352, 357, 358, 362, 367, 368, 372,
+ 377, 381, 386, 388, 393, 395, 398, 400, 397, 404,
+ 406, 403, 409, 411, 416, 421, 426, 431, 436, 441,
+ 446, 448, 453, 454, 458, 459, 464, 469, 474, 479,
+ 480, 481, 486, 491, 495, 496, 499, 500, 504, 505,
+ 510, 511, 515, 517, 521, 522, 526, 527, 529, 534,
+ 536, 538, 543, 544, 549, 551, 556, 557, 562, 564,
+ 569, 570, 575, 577, 582, 583, 588, 590, 595, 596,
+ 601, 603, 608, 609, 614, 616, 621, 622, 627, 628,
+ 633, 634, 636, 638, 643, 644, 646, 651, 652, 657,
+ 659, 661, 666, 667, 669, 671, 676, 677, 679, 680,
+ 682, 683, 684, 685, 686, 687, 691, 693, 695, 701,
+ 702, 706, 707, 711, 712, 713, 715, 717, 722, 724,
+ 726, 728, 733, 734, 738, 739, 744, 745, 746, 747,
+ 748, 749, 753, 754, 755, 756, 761, 763, 768, 769,
+ 773, 774, 778, 779, 784, 786, 791, 792, 793, 797,
+ 798, 802, 803, 814, 815, 816, 817, 818, 819, 820,
+ 821, 822, 823, 824, 825, 826, 827, 828, 829, 830,
+ 831, 832, 833, 834, 835, 836, 837, 838, 839, 840,
+ 841, 845, 846, 847, 848, 849, 851, 856, 857, 858,
+ 861, 862, 865, 866, 869, 870, 873, 874
};
#endif
@@ -626,11 +629,11 @@ static const yytype_uint16 yyrline[] =
static const char *const yytname[] =
{
"$end", "error", "$undefined", "kBREAK",
"kCASE", "kCATCH", "kCONTINUE",
- "kDEFAULT", "kDELETE", "kDO", "kELSE",
"kIF", "kFINALLY", "kFOR", "kIN",
- "kINSTANCEOF", "kNEW", "kNULL", "kRETURN",
"kSWITCH", "kTHIS", "kTHROW",
- "kTRUE", "kFALSE", "kTRY", "kTYPEOF",
"kVAR", "kVOID", "kWHILE", "kWITH",
- "tANDAND", "tOROR", "tINC", "tDEC",
"tHTMLCOMMENT", "kDIVEQ", "kDCOL",
- "kFUNCTION", "'}'", "tIdentifier",
"tAssignOper", "tEqOper",
+ "kDEFAULT", "kDELETE", "kDO", "kELSE",
"kFUNCTION", "kIF", "kFINALLY",
+ "kFOR", "kIN", "kINSTANCEOF", "kNEW",
"kNULL", "kRETURN", "kSWITCH",
+ "kTHIS", "kTHROW", "kTRUE", "kFALSE",
"kTRY", "kTYPEOF", "kVAR", "kVOID",
+ "kWHILE", "kWITH", "tANDAND", "tOROR",
"tINC", "tDEC", "tHTMLCOMMENT",
+ "kDIVEQ", "kDCOL", "'}'",
"tIdentifier", "tAssignOper", "tEqOper",
"tShiftOper", "tRelOper", "tNumericLiteral",
"tBooleanLiteral",
"tStringLiteral", "tEOF", "LOWER_THAN_ELSE",
"'{'", "','", "'='",
"';'",
"':'", "'?'", "'|'",
"'^'", "'&'", "'+'",
"'-'", "'*'", "'/'",
"'%'",
@@ -661,9 +664,9 @@ static const char *const yytname[] =
"LeftHandSideExpression", "NewExpression",
"MemberExpression",
"CallExpression", "Arguments", "ArgumentList",
"PrimaryExpression",
"ArrayLiteral", "ElementList", "Elision",
"Elision_opt", "ObjectLiteral",
- "PropertyNameAndValueList", "PropertyName",
"Identifier_opt", "Literal",
- "BooleanLiteral", "semicolon_opt", "left_bracket",
"right_bracket",
- "semicolon", YY_NULL
+ "PropertyNameAndValueList", "PropertyName",
"Identifier_opt",
+ "IdentifierName", "ReservedAsIdentifier", "Literal",
"BooleanLiteral",
+ "semicolon_opt", "left_bracket", "right_bracket",
"semicolon", YY_NULL
};
#endif
@@ -682,12 +685,12 @@ static const yytype_uint16 yytoknum[] =
};
# endif
-#define YYPACT_NINF -336
+#define YYPACT_NINF -349
#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-336)))
+ (!!((Yystate) == (-349)))
-#define YYTABLE_NINF -199
+#define YYTABLE_NINF -231
#define yytable_value_is_error(Yytable_value) \
0
@@ -696,45 +699,50 @@ static const yytype_uint16 yytoknum[] =
STATE-NUM. */
static const yytype_int16 yypact[] =
{
- -336, 33, 515, -336, -17, -17, 983, 767, 37, 37,
- 1017, -336, 983, 37, -336, 983, -336, -336, -12, 983,
- 9, 983, 37, 37, 983, 983, -336, -336, -336, 8,
- -336, -336, -336, 578, -336, 983, 983, -336, 983, 983,
- 57, 983, 4, 427, 6, -336, -336, -336, -336, -336,
- -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
- 56, -336, -336, -10, 90, 38, 46, 65, 83, 96,
- 86, 94, 168, -336, -336, 114, -336, 159, 169, -336,
- -336, -336, -336, -336, -336, 14, 14, -336, 122, -336,
- -336, 180, 107, -336, -336, 388, 875, -336, 159, 14,
- 113, 983, 56, 641, 42, -336, 124, 75, -336, -336,
- 388, 983, -336, -336, 767, 460, 8, 120, 141, -336,
- 704, 79, 156, -336, -336, -336, -336, -336, -336, 84,
- 91, 983, 63, -336, 41, 177, -336, 983, -336, -336,
- 983, 983, 983, 983, 983, 983, 983, 983, 983, 983,
- 983, 983, 983, 983, 983, 983, -336, -336, -336, -336,
- 983, 983, 983, 199, 821, -336, 983, 200, -336, -336,
- -336, -336, -336, -336, -336, 37, -336, 22, 113, 201,
- -336, 192, -336, -336, 72, 213, 189, 190, 188, 206,
- 17, 86, 105, -336, -336, 35, -336, -336, 37, -12,
- 236, -336, 983, -336, -336, 9, -336, 22, 35, -336,
- -336, -336, -336, 125, 983, 202, -336, -336, -336, -336,
- -336, 211, 177, -336, 204, 22, -336, 90, 198, 38,
- 46, 65, 83, 96, 86, 86, 86, 94, 168, 168,
- -336, -336, -336, -336, -336, 92, -336, -336, -336, 64,
- 93, -336, 388, -336, -336, 767, 210, 205, 243, 45,
- 983, 983, 983, 983, 983, 983, 983, 983, 983, 983,
- 388, 983, 983, 214, 223, -336, -336, -336, -336, 767,
- 767, 212, -336, 216, 929, 37, 22, 225, 218, 983,
- -336, 983, -336, -336, 22, 258, 983, -336, -336, 201,
- 45, 388, -336, -336, 983, -336, 182, 213, 217, 189,
- 190, 188, 206, 17, 86, 86, 22, -336, -336, 265,
- -336, 22, -336, -336, 983, -336, -336, 177, 222, -336,
- -336, -336, -336, 14, 767, -336, -336, 983, 22, -336,
- 983, 767, 983, 18, 265, -336, -12, -336, 22, -336,
- 767, 234, -336, -336, -336, 767, 45, -336, -336, 117,
- 220, -336, 265, -336, -336, 226, 238, -336, 45, -336,
- 983, 767, 767, 245, -336, -336, 983, 22, 767, -336,
- -336, -336, 246, 22, 767, -336, 767, -336, -336
+ -349, 55, 650, -349, 37, 37, 1094, 839, -349, 28,
+ 28, 248, -349, 1094, 28, -349, 1094, -349, -349, -15,
+ 1094, 59, 1094, 28, 28, 1094, 1094, -349, -349, 4,
+ -349, -349, -349, 587, -349, 1094, 1094, -349, 1094, 1094,
+ -8, 1094, 66, 490, 35, -349, -349, -349, -349, -349,
+ -349, -349, -349, -349, -349, -349, -349, -349, -349, -349,
+ 109, -349, -349, 7, 69, 56, 46, 86, 107, 25,
+ 129, 125, 200, -349, -349, 196, -349, 122, 147, -349,
+ -349, -349, -349, -349, -349, 47, 47, -349, 1160, -349,
+ -349, 177, 162, -349, -349, 431, 937, -349, 122, 47,
+ 176, 1094, 109, 713, 134, -349, 180, 113, -349, -349,
+ 431, 1094, -349, -349, 839, 34, -349, -349, 127, -349,
+ 1094, 839, -349, 181, 63, -349, 64, -349, -349, 248,
+ 184, 986, 65, 190, 1094, 192, 195, -15, 1094, 59,
+ 1094, 70, 92, 522, 4, 202, 211, -349, 776, -22,
+ 214, -349, -349, -349, -349, -349, -349, -349, -349, 102,
+ 108, 1094, 20, -349, 53, 231, -349, 1094, -349, -349,
+ 1094, 1094, 1094, 1094, 1094, 1094, 1094, 1094, 1094, 1094,
+ 1094, 1094, 1094, 1094, 1094, 1094, -349, -349, -349, -349,
+ 1094, 1094, 1094, 1248, 888, -349, 1094, 1248, -349, -349,
+ -349, -349, -349, -349, -349, -349, -349, -349, -349, -349,
+ -349, -349, -349, -349, -349, -349, -349, -349, -349, -349,
+ -349, -349, -349, -349, -349, -349, 28, -349, 23, 176,
+ 234, -349, 203, -349, -349, 40, 245, 222, 223, 221,
+ 239, 2, 129, 142, -349, -349, 19, -349, -349, 28,
+ -15, 268, -349, 1094, -349, -349, 59, -349, 23, 19,
+ -349, -349, -349, -349, 1204, 1094, 232, -349, -349, -349,
+ -349, -349, 244, 231, -349, 236, 23, -349, 69, 235,
+ 56, 46, 86, 107, 25, 129, 129, 129, 125, 200,
+ 200, -349, -349, -349, -349, -349, 119, -349, -349, -349,
+ 84, 120, -349, 431, -349, -349, 839, 240, 250, 275,
+ 77, 1094, 1094, 1094, 1094, 1094, 1094, 1094, 1094, 1094,
+ 1094, 431, 1094, 1094, 249, 262, -349, -349, -349, -349,
+ 839, 839, 252, -349, 253, 1035, 28, 23, 263, 257,
+ 1094, -349, 1094, -349, -349, 23, 298, 1094, -349, -349,
+ 234, 77, 431, -349, -349, 1094, -349, 206, 245, 258,
+ 222, 223, 221, 239, 2, 129, 129, 23, -349, -349,
+ 306, -349, 23, -349, -349, 1094, -349, -349, 231, 265,
+ -349, -349, -349, -349, 47, 839, -349, -349, 1094, 23,
+ -349, 1094, 839, 1094, 18, 306, -349, -15, -349, 23,
+ -349, 839, 274, -349, -349, -349, 839, 77, -349, -349,
+ 87, 266, -349, 306, -349, -349, 269, 277, -349, 77,
+ -349, 1094, 839, 839, 283, -349, -349, 1094, 23, 839,
+ -349, -349, -349, 284, 23, 839, -349, 839, -349, -349
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -742,75 +750,80 @@ static const yytype_int16 yypact[] =
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 5, 0, 4, 1, 199, 199, 0, 0, 0, 0,
- 0, 201, 84, 0, 176, 0, 207, 208, 0, 0,
- 0, 0, 0, 0, 0, 0, 3, 206, 10, 177,
- 203, 209, 204, 0, 50, 0, 0, 205, 0, 0,
+ 5, 0, 4, 1, 199, 199, 0, 0, 10, 0,
+ 0, 0, 231, 84, 0, 176, 0, 237, 238, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3, 236, 177,
+ 233, 239, 234, 0, 50, 0, 0, 235, 0, 0,
190, 0, 0, 19, 0, 6, 16, 17, 18, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
0, 88, 96, 102, 106, 110, 114, 118, 122, 126,
130, 137, 139, 142, 146, 156, 159, 161, 160, 163,
- 179, 180, 178, 202, 200, 0, 0, 177, 0, 164,
- 147, 156, 0, 213, 212, 0, 90, 162, 161, 0,
+ 179, 180, 178, 232, 200, 0, 0, 177, 0, 164,
+ 147, 156, 0, 243, 242, 0, 90, 162, 161, 0,
85, 0, 0, 0, 0, 149, 44, 0, 38, 148,
- 0, 0, 150, 151, 0, 36, 177, 203, 204, 31,
- 0, 0, 0, 152, 153, 154, 155, 188, 182, 0,
- 191, 0, 0, 2, 0, 14, 211, 0, 210, 51,
+ 0, 0, 150, 151, 0, 199, 204, 205, 199, 207,
+ 208, 209, 210, 10, 0, 212, 0, 216, 217, 218,
+ 231, 84, 0, 176, 223, 237, 238, 225, 226, 227,
+ 228, 0, 0, 36, 177, 233, 234, 31, 0, 0,
+ 0, 196, 202, 152, 153, 154, 155, 188, 182, 0,
+ 191, 0, 0, 2, 0, 14, 241, 0, 240, 51,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 157, 158, 95, 94,
0, 0, 0, 0, 0, 168, 0, 0, 169, 65,
- 64, 192, 196, 198, 197, 0, 87, 0, 86, 0,
- 56, 91, 92, 99, 104, 108, 112, 116, 120, 124,
- 128, 134, 156, 167, 66, 0, 78, 36, 0, 0,
- 79, 80, 0, 42, 45, 0, 37, 0, 0, 68,
- 35, 32, 193, 0, 0, 190, 184, 189, 183, 186,
- 181, 0, 14, 12, 15, 0, 89, 107, 0, 111,
- 115, 119, 123, 127, 133, 132, 131, 138, 140, 141,
- 143, 144, 145, 97, 98, 0, 166, 172, 174, 0,
- 0, 171, 0, 215, 214, 0, 47, 59, 40, 0,
+ 64, 203, 206, 208, 209, 214, 215, 213, 218, 219,
+ 220, 221, 222, 223, 224, 211, 225, 226, 227, 228,
+ 229, 230, 192, 201, 198, 197, 0, 87, 0, 86,
+ 0, 56, 91, 92, 99, 104, 108, 112, 116, 120,
+ 124, 128, 134, 156, 167, 66, 0, 78, 36, 0,
+ 0, 79, 80, 0, 42, 45, 0, 37, 0, 0,
+ 68, 35, 32, 193, 0, 0, 190, 184, 189, 183,
+ 186, 181, 0, 14, 12, 15, 0, 89, 107, 0,
+ 111, 115, 119, 123, 127, 133, 132, 131, 138, 140,
+ 141, 143, 144, 145, 97, 98, 0, 166, 172, 174,
+ 0, 0, 171, 0, 245, 244, 0, 47, 59, 40,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 83, 81, 46, 39, 0,
- 0, 0, 194, 191, 0, 0, 0, 0, 0, 0,
- 165, 0, 173, 170, 0, 53, 0, 43, 48, 0,
- 0, 0, 217, 216, 84, 93, 156, 109, 0, 113,
- 117, 121, 125, 129, 136, 135, 0, 100, 101, 72,
- 69, 0, 55, 67, 0, 185, 187, 14, 0, 13,
- 5, 103, 175, 0, 0, 49, 41, 84, 0, 57,
- 0, 0, 0, 0, 73, 74, 0, 195, 0, 5,
- 11, 0, 54, 52, 60, 0, 0, 105, 62, 0,
- 0, 70, 72, 75, 82, 0, 0, 7, 0, 63,
- 84, 33, 33, 0, 5, 8, 84, 0, 34, 76,
- 77, 71, 0, 0, 0, 9, 0, 58, 61
+ 0, 0, 0, 0, 0, 0, 83, 81, 46, 39,
+ 0, 0, 0, 194, 191, 0, 0, 0, 0, 0,
+ 0, 165, 0, 173, 170, 0, 53, 0, 43, 48,
+ 0, 0, 0, 247, 246, 84, 93, 156, 109, 0,
+ 113, 117, 121, 125, 129, 136, 135, 0, 100, 101,
+ 72, 69, 0, 55, 67, 0, 185, 187, 14, 0,
+ 13, 5, 103, 175, 0, 0, 49, 41, 84, 0,
+ 57, 0, 0, 0, 0, 73, 74, 0, 195, 0,
+ 5, 11, 0, 54, 52, 60, 0, 0, 105, 62,
+ 0, 0, 70, 72, 75, 82, 0, 0, 7, 0,
+ 63, 84, 33, 33, 0, 5, 8, 84, 0, 34,
+ 76, 77, 71, 0, 0, 0, 9, 0, 58, 61
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -336, -336, -336, 274, -2, -336, -335, -336, -211, 1,
- -180, -87, -9, -336, -336, -336, 81, -8, -336, -336,
- -336, -336, -336, -336, -336, -336, -336, -336, -336, -336,
- -336, -336, -336, -336, -336, -336, -336, -75, -336, -56,
- -336, -336, -336, -336, 89, -287, -108, -11, -336, -336,
- 229, -66, -244, -336, -336, -336, -336, 152, 47, 165,
- 48, 166, 49, 170, 50, 167, 51, 173, 53, -61,
- 171, 69, 43, -336, 34, 306, 312, -336, -35, -336,
- -336, -336, -336, 108, 109, -336, -336, 112, 322, -336,
- -336, -73, -3, 24, -276
+ -349, -349, -349, 323, -2, -349, -348, -349, -269, 1,
+ -172, -98, -12, -349, -349, -349, 71, -24, -349, -349,
+ -349, -349, -349, -349, -349, -349, -349, -349, -349, -349,
+ -349, -349, -349, -349, -349, -349, -349, -80, -349, -61,
+ -349, -349, -349, -349, 99, -341, -108, -4, -349, -349,
+ 278, -86, -296, -349, -349, -349, -349, 182, 42, 183,
+ 43, 185, 41, 186, 45, 187, 49, 188, 52, -95,
+ 179, 93, 343, -349, 24, -5, -1, -349, 58, -349,
+ -349, -349, -349, 101, 106, -349, -349, 110, 8, -16,
+ -349, -349, -349, -64, 9, -104, -340
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 1, 42, 350, 89, 44, 351, 224, 225, 119,
- 120, 379, 46, 47, 107, 257, 108, 258, 203, 204,
- 297, 298, 48, 49, 50, 51, 259, 356, 300, 368,
- 52, 53, 54, 55, 56, 57, 320, 343, 344, 345,
- 362, 58, 59, 200, 201, 99, 177, 60, 180, 181,
- 272, 61, 182, 62, 183, 63, 184, 64, 185, 65,
- 186, 66, 187, 67, 188, 68, 189, 69, 190, 70,
- 71, 72, 73, 74, 75, 76, 77, 78, 165, 249,
- 79, 80, 129, 130, 131, 81, 121, 122, 85, 82,
- 83, 139, 95, 255, 304
+ -1, 1, 42, 401, 89, 44, 402, 275, 276, 147,
+ 148, 430, 46, 47, 107, 308, 108, 309, 254, 255,
+ 348, 349, 48, 49, 50, 51, 310, 407, 351, 419,
+ 52, 53, 54, 55, 56, 57, 371, 394, 395, 396,
+ 413, 58, 59, 251, 252, 99, 228, 60, 231, 232,
+ 323, 61, 233, 62, 234, 63, 235, 64, 236, 65,
+ 237, 66, 238, 67, 239, 68, 240, 69, 241, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 195, 300,
+ 79, 80, 159, 160, 161, 81, 149, 150, 85, 151,
+ 152, 82, 83, 169, 95, 306, 355
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -818,273 +831,318 @@ static const yytype_int16 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
- 43, 100, 207, 45, 102, 43, 96, 93, 92, 104,
- 101, 286, 169, 170, 366, 136, 305, 339, 308, 110,
- 111, 140, 84, 253, 337, 360, 194, 317, 318, 196,
- 132, 43, 268, 3, 206, 191, 253, 103, 93, 382,
- 91, 135, 93, 168, 141, 134, 302, 198, 106, 90,
- 354, 133, 335, 91, 199, 91, 361, 136, 91, 91,
- 269, 114, 105, 193, 109, 219, 138, 112, 113, 91,
- 91, 226, 91, 91, 94, 228, 136, 221, 123, 124,
- 370, 125, 126, 377, 178, 137, 234, 235, 236, 383,
- 195, 254, 376, 143, 243, 244, 357, 303, 248, 178,
- 208, 43, 144, 261, 254, 94, 137, 127, 138, 94,
- 147, 148, 43, 137, 291, 209, 348, 212, 43, 270,
- 142, 211, 145, 128, 146, 205, 262, 138, 150, 213,
- 192, 222, 220, 292, 215, 175, 277, 156, 157, 149,
- 158, 217, 137, 137, 294, 159, 156, 157, 282, 158,
- 216, 245, 151, 152, 159, 250, 271, 218, 290, 293,
- 171, 172, 316, 137, 172, 160, 173, 137, 174, 173,
- 371, 174, 252, -198, 91, 202, 91, 91, 91, 91,
+ 43, 242, 258, 45, 337, 43, 97, 104, 92, 100,
+ 98, 388, 102, 86, 390, 356, 263, 359, 319, 96,
+ 304, 199, 200, 101, 304, 411, 368, 369, 264, 93,
+ 91, 43, 110, 111, 103, 245, 93, 162, 247, 170,
+ 177, 178, 157, 257, 91, 320, 91, 405, 166, 91,
+ 91, 386, 417, 165, 93, 3, 412, 114, 158, 91,
+ 91, 171, 91, 91, 93, 93, 93, 421, 179, 167,
+ 167, 93, 312, 84, 164, 270, 84, 433, 353, 427,
+ 428, 277, 285, 286, 287, 279, 434, -203, 305, 271,
+ 272, 229, 305, 93, 313, 408, 94, 246, 106, 168,
+ 172, 43, 174, 94, 294, 295, 229, 259, 299, 399,
+ 166, 173, 43, 163, 166, 260, -215, -213, -221, 43,
+ 243, 94, 92, -229, 97, 104, 86, 100, 98, 354,
+ 102, 94, 94, 94, 342, 96, 198, 167, 94, 249,
+ 422, 101, 324, 175, 91, -230, 43, 250, 176, 262,
+ 110, 111, 266, 343, 330, 331, 244, 321, 268, 167,
+ 94, 168, 91, 256, 91, 168, 84, 328, 267, 167,
+ 167, 180, 339, 273, 269, 186, 187, 297, 188, 333,
+ -206, 302, 189, 181, 182, 341, 344, 192, 296, 193,
+ 194, 226, 301, 322, 91, 345, 91, 91, 91, 91,
91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
- 275, 378, 378, 338, -197, 274, 240, 241, 242, 191,
- 191, 191, 191, 191, 191, 191, 191, 314, 315, 214,
- 191, 191, 156, 157, 156, 157, 223, 158, 326, 273,
- 238, 239, 159, 331, 162, 332, 163, 164, 153, 154,
- 155, 279, 280, 271, 166, 191, 167, 164, 246, 251,
- 256, 178, 260, 263, 264, 266, 265, 267, 199, 288,
- 285, 289, 127, 43, 287, 299, 295, 301, 347, 178,
- 352, 296, 321, 319, 329, 324, 217, 330, 334, 342,
- 340, 349, 367, 372, 2, 374, 375, 43, 43, 191,
- 322, 323, 327, 381, 385, 380, 278, 373, 363, 276,
- 178, 336, 227, 100, 306, 91, 306, 91, 91, 91,
- 91, 91, 91, 91, 161, 306, 306, 229, 307, 230,
- 328, 309, 232, 310, 231, 311, 97, 312, 333, 233,
- 313, 237, 98, 283, 284, 281, 100, 86, 0, 0,
- 306, 359, 43, 0, 0, 353, 0, 364, 0, 43,
- 341, 0, 358, 0, 0, 346, 0, 0, 43, 0,
- 0, 45, 0, 43, 0, 0, 369, 0, 0, 100,
- 0, 0, 355, 0, 0, 100, 0, 0, 0, 43,
- 43, 0, 365, 0, 306, 0, 43, 0, 0, 211,
- 0, 0, 43, 0, 43, 387, 0, 388, 0, 176,
- 0, 0, 0, 0, 0, 0, 6, 0, 0, 0,
- 0, 384, 0, 0, 10, 11, 0, 386, 14, 0,
- 16, 17, 0, 19, 0, 21, 0, 0, 0, 0,
- 24, 25, 0, 27, 0, 28, 0, 87, -164, 0,
+ 186, 187, 196, 367, 197, 194, 242, 242, 242, 242,
+ 242, 242, 242, 242, 365, 366, 167, 242, 242, 186,
+ 187, 253, 188, 379, -214, 303, 189, -219, 326, 186,
+ 187, 384, 188, -222, 389, -224, 189, 190, -211, 377,
+ 429, 429, 242, 311, 382, -198, 383, 322, 325, 8,
+ 183, 184, 185, 392, -197, 11, 12, 265, 397, 15,
+ 274, 17, 18, 307, 289, 290, 314, 315, 317, 316,
+ 318, 250, 157, 336, 28, 406, 338, 87, 340, 398,
+ 352, 347, 30, 31, 32, 416, 242, 88, 370, 229,
+ 350, 372, 380, 268, 43, 375, 381, 346, 385, 37,
+ 393, 391, 418, 40, 400, 426, 41, 229, 425, 423,
+ 403, 432, 436, 2, 435, 431, 387, 329, 43, 43,
+ 437, 373, 374, 424, 414, 357, 91, 357, 91, 91,
+ 91, 91, 91, 91, 91, 378, 357, 357, 229, 90,
+ 327, 100, 278, 191, 358, 280, 361, 360, 281, 288,
+ 282, 362, 283, 105, 284, 109, 363, 334, 112, 113,
+ 364, 357, 335, 0, 332, 0, 0, 0, 153, 154,
+ 0, 155, 156, 43, 100, 415, 404, 0, 0, 410,
+ 43, 0, 0, 409, 0, 0, 0, 0, 0, 43,
+ 0, 0, 45, 0, 43, 0, 0, 420, 0, 0,
+ 0, 0, 0, 0, 0, 357, 0, 100, 0, 0,
+ 43, 43, 0, 100, 0, 0, 0, 43, 0, 0,
+ 262, 0, 227, 43, 0, 43, 438, 0, 439, 6,
+ 0, 0, 8, 0, 0, 0, 0, 0, 11, 12,
+ 0, 0, 15, 0, 17, 18, 0, 20, 0, 22,
+ 0, 0, 0, 90, 25, 26, 0, 28, 0, 0,
+ 87, 0, 0, 0, 0, 30, 31, 32, 0, 0,
+ 88, 105, 0, 109, 0, 0, 0, 0, 0, 35,
+ 36, -164, 37, 0, 38, 39, 40, 0, 0, 41,
+ 0, 0, 0, 0, 0, -164, -164, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -164, -164, -192, 0, 0, 291, 292, 293, 0,
+ -164, -164, -164, -164, 0, 0, 0, -192, -192, 0,
+ -164, -164, 0, 0, -164, -164, -164, -164, 0, 0,
+ -164, 0, -164, -192, -192, 0, 0, -164, 0, 0,
+ 0, 0, -192, -192, -192, -192, 0, 0, 0, 0,
+ 0, 0, -192, -192, 0, 0, -192, -192, -192, -192,
+ 0, 0, -192, 0, -192, 0, 0, 0, 0, -192,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142, 0, 0,
+ 25, 26, 0, 28, 0, 143, 144, 0, 0, 0,
+ 0, 145, 31, 146, 0, 0, 33, 0, 0, 34,
+ 0, 0, 0, 0, 0, 35, 36, 0, 37, 0,
+ 38, 39, 40, 4, 0, 41, 5, 0, 6, 7,
+ 0, 8, 9, 0, 10, 0, 0, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 0, 0, 25, 26, 27, 28, 0, 0, 29,
+ 0, 0, 0, 0, 30, 31, 32, 0, 0, 33,
+ 0, 0, 34, 0, 0, 0, 0, 0, 35, 36,
+ 0, 37, 0, 38, 39, 40, 4, 0, 41, 5,
+ 0, 6, 7, 0, 8, 9, 0, 10, 0, 0,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 0, 0, 25, 26, 0, 28,
+ 0, 248, 29, 0, 0, 0, 0, 30, 31, 32,
+ 0, 0, 33, 0, 0, 34, 0, 0, 0, 0,
+ 0, 35, 36, 0, 37, 0, 38, 39, 40, 4,
+ 0, 41, 5, 0, 6, 7, 0, 8, 9, 0,
+ 10, 0, 0, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 0, 0, 25,
+ 26, 0, 28, 0, 261, 29, 0, 0, 0, 0,
+ 30, 31, 32, 0, 0, 33, 0, 0, 34, 0,
+ 0, 0, 0, 0, 35, 36, 0, 37, 0, 38,
+ 39, 40, 4, 0, 41, 5, 0, 6, 7, 0,
+ 8, 9, 0, 10, 0, 0, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 0, 0, 25, 26, 0, 28, 0, 0, 29, 0,
+ 0, 0, 0, 30, 31, 32, 0, 0, 33, 0,
+ 0, 34, 0, 0, 0, 0, 6, 35, 36, 8,
+ 37, 0, 38, 39, 40, 11, 12, 41, 0, 15,
+ 0, 17, 18, 0, 20, 0, 22, 0, 0, 0,
+ 0, 25, 26, 0, 28, 0, 0, 87, 0, 0,
0, 0, 30, 31, 32, 0, 0, 88, 0, 0,
- 0, -164, -164, 0, 0, 0, 35, 36, 0, 37,
- 0, 38, 39, 40, 0, 0, 41, -164, -164, 0,
- 0, -192, 0, 0, 0, 0, 0, -164, -164, -164,
- -164, 0, 0, 0, -192, -192, 0, -164, -164, 0,
- 0, -164, -164, -164, -164, 0, 0, -164, 0, -164,
- -192, -192, 0, 0, -164, 0, 0, 0, 0, 0,
- -192, -192, -192, -192, 0, 0, 0, 0, 0, 0,
- -192, -192, 0, 0, -192, -192, -192, -192, 4, 0,
- -192, 5, -192, 6, 7, 0, 8, -192, 9, 0,
- 0, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 0, 0, 24, 25, 26,
- 27, 0, 28, 0, 29, 0, 0, 0, 0, 30,
- 31, 32, 0, 0, 33, 0, 0, 34, 0, 0,
+ 0, 0, 0, 0, 0, 6, 35, 36, 8, 37,
+ 0, 38, 39, 40, 11, 12, 41, 298, 15, 0,
+ 17, 18, 0, 20, 230, 22, 0, 0, 0, 0,
+ 25, 26, 0, 28, 0, 0, 87, 0, 0, 0,
+ 0, 30, 31, 32, 0, 0, 88, 0, 0, 0,
+ 0, 0, 0, 0, 6, 35, 36, 8, 37, 0,
+ 38, 39, 40, 11, 12, 41, 0, 15, 0, 17,
+ 18, 0, 20, 0, 22, 0, 0, 0, 0, 25,
+ 26, 0, 28, 0, 0, 87, 0, 0, 0, 0,
+ 30, 31, 32, 0, 0, 88, 0, 0, 0, -220,
+ 0, 0, 0, 6, 35, 36, 8, 37, 0, 38,
+ 39, 40, 11, 12, 41, 0, 15, 0, 17, 18,
+ 0, 20, 0, 22, 0, 0, 0, 0, 25, 26,
+ 0, 28, 0, 0, 87, 0, 0, 0, 0, 30,
+ 31, 32, 0, 0, 88, 0, 0, 0, 0, 0,
0, 0, 0, 35, 36, 0, 37, 0, 38, 39,
- 40, 4, 0, 41, 5, 0, 6, 7, 0, 8,
- 0, 9, 0, 0, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 0, 0,
- 24, 25, 0, 27, 0, 28, 115, 116, 0, 0,
- 0, 0, 117, 31, 118, 0, 0, 33, 0, 0,
- 34, 0, 0, 0, 0, 0, 35, 36, 0, 37,
- 0, 38, 39, 40, 4, 0, 41, 5, 0, 6,
- 7, 0, 8, 0, 9, 0, 0, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 0, 0, 24, 25, 0, 27, 0, 28, 197,
- 29, 0, 0, 0, 0, 30, 31, 32, 0, 0,
- 33, 0, 0, 34, 0, 0, 0, 0, 0, 35,
- 36, 0, 37, 0, 38, 39, 40, 4, 0, 41,
- 5, 0, 6, 7, 0, 8, 0, 9, 0, 0,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 0, 0, 24, 25, 0, 27,
- 0, 28, 210, 29, 0, 0, 0, 0, 30, 31,
- 32, 0, 0, 33, 0, 0, 34, 0, 0, 0,
+ 40, 376, 6, 41, 0, 8, 0, 0, 0, 0,
+ 0, 11, 12, 0, 0, 15, 0, 17, 18, 0,
+ 20, 0, 22, 0, 0, 0, 0, 25, 26, 0,
+ 28, 0, 0, 87, 0, 0, 0, 0, 30, 31,
+ 32, 0, 0, 88, 0, 0, 0, 0, 0, 0,
0, 0, 35, 36, 0, 37, 0, 38, 39, 40,
- 4, 0, 41, 5, 0, 6, 7, 0, 8, 0,
- 9, 0, 0, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 0, 0, 24,
- 25, 0, 27, 0, 28, 0, 29, 0, 0, 0,
- 0, 30, 31, 32, 0, 0, 33, 0, 0, 34,
- 0, 0, 0, 0, 0, 35, 36, 0, 37, 6,
- 38, 39, 40, 0, 0, 41, 0, 10, 11, 0,
- 0, 14, 0, 16, 17, 0, 19, 0, 21, 0,
- 0, 0, 0, 24, 25, 0, 27, 0, 28, 0,
- 87, 0, 0, 0, 0, 30, 31, 32, 0, 0,
- 88, 0, 0, 0, 0, 0, 0, 0, 0, 35,
- 36, 0, 37, 6, 38, 39, 40, 0, 0, 41,
- 247, 10, 11, 0, 0, 14, 0, 16, 17, 0,
- 19, 179, 21, 0, 0, 0, 0, 24, 25, 0,
- 27, 0, 28, 0, 87, 0, 0, 0, 0, 30,
- 31, 32, 0, 0, 88, 0, 0, 0, 0, 0,
- 0, 0, 0, 35, 36, 0, 37, 6, 38, 39,
- 40, 0, 0, 41, 0, 10, 11, 0, 0, 14,
- 0, 16, 17, 0, 19, 0, 21, 0, 0, 0,
- 0, 24, 25, 0, 27, 0, 28, 0, 87, 0,
- 0, 0, 0, 30, 31, 32, 0, 0, 88, 0,
- 0, 0, 0, 0, 0, 0, 0, 35, 36, 0,
- 37, 6, 38, 39, 40, 325, 0, 41, 0, 10,
- 11, 0, 0, 14, 0, 16, 17, 0, 19, 0,
- 21, 0, 0, 0, 0, 24, 25, 0, 27, 0,
- 28, 0, 87, 0, 0, 0, 0, 30, 31, 32,
- 0, 0, 88, 10, 11, 0, 0, 14, 0, 16,
- 17, 35, 36, 0, 37, 0, 38, 39, 40, 0,
- 0, 41, 27, 0, 28, 0, 87, 0, 0, 0,
- 0, 30, 31, 32, 0, 0, 88, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 37, 0,
- 0, 0, 40, 0, 0, 41
+ 0, 0, 41, 201, 116, 117, 202, 119, 203, 204,
+ 122, 205, 206, 125, 207, 127, 128, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,
+ 221, 0, 0, 0, 0, 0, 0, 0, 222, 223,
+ 0, 0, 0, 0, 224, 0, 225, 201, 116, 117,
+ 202, 119, 203, 204, 122, 205, 206, 125, 207, 127,
+ 128, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 217, 218, 219, 220, 221, 0, 0, 0, 0, 0,
+ 0, 0, 0, 223, 0, 0, 0, 0, 224, 0,
+ 225, 201, 116, 117, 202, 119, 203, 204, 122, 205,
+ 206, 125, 207, 127, 128, 208, 209, 210, 211, 212,
+ 213, 214, 215, 216, 217, 218, 219, 220, 221, 0,
+ 0, 0, 0, 0, 0, 0, 0, 223
};
static const yytype_int16 yycheck[] =
{
- 2, 12, 110, 2, 15, 7, 9, 1, 7, 18,
- 13, 222, 85, 86, 349, 1, 260, 304, 262, 22,
- 23, 31, 39, 1, 300, 7, 99, 271, 272, 102,
- 41, 33, 15, 0, 107, 96, 1, 49, 1, 374,
- 6, 44, 1, 78, 54, 39, 1, 5, 39, 6,
- 337, 47, 296, 19, 12, 21, 38, 1, 24, 25,
- 43, 53, 19, 98, 21, 131, 52, 24, 25, 35,
- 36, 137, 38, 39, 68, 141, 1, 36, 35, 36,
- 356, 38, 39, 370, 95, 50, 147, 148, 149, 376,
- 101, 69, 368, 55, 160, 161, 340, 52, 164, 110,
- 111, 103, 56, 31, 69, 68, 50, 50, 52, 68,
- 14, 15, 114, 50, 50, 114, 327, 38, 120, 14,
- 30, 120, 57, 66, 41, 50, 54, 52, 42, 50,
- 96, 134, 69, 69, 50, 28, 202, 32, 33, 43,
- 35, 50, 50, 50, 252, 40, 32, 33, 214, 35,
- 66, 162, 58, 59, 40, 166, 51, 66, 66, 66,
- 38, 39, 270, 50, 39, 51, 44, 50, 46, 44,
- 53, 46, 175, 53, 140, 51, 142, 143, 144, 145,
- 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
- 199, 371, 372, 301, 53, 198, 153, 154, 155, 260,
- 261, 262, 263, 264, 265, 266, 267, 268, 269, 53,
- 271, 272, 32, 33, 32, 33, 39, 35, 284, 195,
- 151, 152, 40, 289, 65, 291, 67, 68, 60, 61,
- 62, 207, 208, 51, 65, 296, 67, 68, 39, 39,
- 39, 252, 50, 30, 55, 57, 56, 41, 12, 225,
- 39, 53, 50, 255, 50, 50, 255, 14, 324, 270,
- 333, 51, 39, 49, 39, 53, 50, 49, 10, 4,
- 53, 49, 38, 53, 0, 49, 38, 279, 280, 340,
- 279, 280, 285, 38, 38, 372, 205, 362, 344, 200,
- 301, 299, 140, 304, 260, 261, 262, 263, 264, 265,
- 266, 267, 268, 269, 75, 271, 272, 142, 261, 143,
- 286, 263, 145, 264, 144, 265, 10, 266, 294, 146,
- 267, 150, 10, 215, 215, 213, 337, 5, -1, -1,
- 296, 342, 334, -1, -1, 334, -1, 346, -1, 341,
- 316, -1, 341, -1, -1, 321, -1, -1, 350, -1,
- -1, 350, -1, 355, -1, -1, 355, -1, -1, 370,
- -1, -1, 338, -1, -1, 376, -1, -1, -1, 371,
- 372, -1, 348, -1, 340, -1, 378, -1, -1, 378,
- -1, -1, 384, -1, 386, 384, -1, 386, -1, 1,
- -1, -1, -1, -1, -1, -1, 8, -1, -1, -1,
- -1, 377, -1, -1, 16, 17, -1, 383, 20, -1,
- 22, 23, -1, 25, -1, 27, -1, -1, -1, -1,
- 32, 33, -1, 35, -1, 37, -1, 39, 1, -1,
- -1, -1, 44, 45, 46, -1, -1, 49, -1, -1,
- -1, 14, 15, -1, -1, -1, 58, 59, -1, 61,
- -1, 63, 64, 65, -1, -1, 68, 30, 31, -1,
- -1, 1, -1, -1, -1, -1, -1, 40, 41, 42,
- 43, -1, -1, -1, 14, 15, -1, 50, 51, -1,
- -1, 54, 55, 56, 57, -1, -1, 60, -1, 62,
- 30, 31, -1, -1, 67, -1, -1, -1, -1, -1,
- 40, 41, 42, 43, -1, -1, -1, -1, -1, -1,
- 50, 51, -1, -1, 54, 55, 56, 57, 3, -1,
- 60, 6, 62, 8, 9, -1, 11, 67, 13, -1,
- -1, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, -1, -1, 32, 33, 34,
- 35, -1, 37, -1, 39, -1, -1, -1, -1, 44,
- 45, 46, -1, -1, 49, -1, -1, 52, -1, -1,
- -1, -1, -1, 58, 59, -1, 61, -1, 63, 64,
- 65, 3, -1, 68, 6, -1, 8, 9, -1, 11,
- -1, 13, -1, -1, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, -1, -1,
- 32, 33, -1, 35, -1, 37, 38, 39, -1, -1,
- -1, -1, 44, 45, 46, -1, -1, 49, -1, -1,
- 52, -1, -1, -1, -1, -1, 58, 59, -1, 61,
- -1, 63, 64, 65, 3, -1, 68, 6, -1, 8,
- 9, -1, 11, -1, 13, -1, -1, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, -1, -1, 32, 33, -1, 35, -1, 37, 38,
+ 2, 96, 110, 2, 273, 7, 11, 19, 7, 13,
+ 11, 351, 16, 5, 355, 311, 38, 313, 16, 10,
+ 1, 85, 86, 14, 1, 7, 322, 323, 50, 1,
+ 6, 33, 23, 24, 49, 99, 1, 41, 102, 32,
+ 15, 16, 50, 107, 20, 43, 22, 388, 1, 25,
+ 26, 347, 400, 44, 1, 0, 38, 53, 66, 35,
+ 36, 54, 38, 39, 1, 1, 1, 407, 43, 50,
+ 50, 1, 32, 39, 39, 161, 39, 425, 1, 419,
+ 421, 167, 177, 178, 179, 171, 427, 53, 69, 69,
+ 37, 95, 69, 1, 54, 391, 68, 101, 39, 52,
+ 31, 103, 56, 68, 190, 191, 110, 111, 194, 378,
+ 1, 55, 114, 47, 1, 114, 53, 53, 53, 121,
+ 96, 68, 121, 53, 129, 137, 118, 131, 129, 52,
+ 134, 68, 68, 68, 50, 126, 78, 50, 68, 5,
+ 53, 132, 246, 57, 120, 53, 148, 13, 41, 148,
+ 141, 142, 50, 69, 258, 259, 98, 15, 50, 50,
+ 68, 52, 138, 50, 140, 52, 39, 253, 66, 50,
+ 50, 42, 276, 164, 66, 33, 34, 193, 36, 265,
+ 53, 197, 40, 58, 59, 66, 66, 65, 192, 67,
+ 68, 29, 196, 51, 170, 303, 172, 173, 174, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
+ 33, 34, 65, 321, 67, 68, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 50, 322, 323, 33,
+ 34, 51, 36, 337, 53, 226, 40, 53, 250, 33,
+ 34, 345, 36, 53, 352, 53, 40, 51, 53, 335,
+ 422, 423, 347, 50, 340, 53, 342, 51, 249, 11,
+ 60, 61, 62, 367, 53, 17, 18, 53, 372, 21,
+ 39, 23, 24, 39, 181, 182, 31, 55, 57, 56,
+ 41, 13, 50, 39, 36, 389, 50, 39, 53, 375,
+ 15, 51, 44, 45, 46, 399, 391, 49, 49, 303,
+ 50, 39, 39, 50, 306, 53, 49, 306, 10, 61,
+ 4, 53, 38, 65, 49, 38, 68, 321, 49, 53,
+ 384, 38, 38, 0, 428, 423, 350, 256, 330, 331,
+ 434, 330, 331, 413, 395, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 336, 322, 323, 352, 6,
+ 251, 355, 170, 75, 312, 172, 315, 314, 173, 180,
+ 174, 316, 175, 20, 176, 22, 317, 266, 25, 26,
+ 318, 347, 266, -1, 264, -1, -1, -1, 35, 36,
+ -1, 38, 39, 385, 388, 397, 385, -1, -1, 393,
+ 392, -1, -1, 392, -1, -1, -1, -1, -1, 401,
+ -1, -1, 401, -1, 406, -1, -1, 406, -1, -1,
+ -1, -1, -1, -1, -1, 391, -1, 421, -1, -1,
+ 422, 423, -1, 427, -1, -1, -1, 429, -1, -1,
+ 429, -1, 1, 435, -1, 437, 435, -1, 437, 8,
+ -1, -1, 11, -1, -1, -1, -1, -1, 17, 18,
+ -1, -1, 21, -1, 23, 24, -1, 26, -1, 28,
+ -1, -1, -1, 120, 33, 34, -1, 36, -1, -1,
39, -1, -1, -1, -1, 44, 45, 46, -1, -1,
- 49, -1, -1, 52, -1, -1, -1, -1, -1, 58,
- 59, -1, 61, -1, 63, 64, 65, 3, -1, 68,
- 6, -1, 8, 9, -1, 11, -1, 13, -1, -1,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, -1, -1, 32, 33, -1, 35,
- -1, 37, 38, 39, -1, -1, -1, -1, 44, 45,
- 46, -1, -1, 49, -1, -1, 52, -1, -1, -1,
- -1, -1, 58, 59, -1, 61, -1, 63, 64, 65,
- 3, -1, 68, 6, -1, 8, 9, -1, 11, -1,
- 13, -1, -1, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, -1, -1, 32,
- 33, -1, 35, -1, 37, -1, 39, -1, -1, -1,
+ 49, 138, -1, 140, -1, -1, -1, -1, -1, 58,
+ 59, 1, 61, -1, 63, 64, 65, -1, -1, 68,
+ -1, -1, -1, -1, -1, 15, 16, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 31, 32, 1, -1, -1, 183, 184, 185, -1,
+ 40, 41, 42, 43, -1, -1, -1, 15, 16, -1,
+ 50, 51, -1, -1, 54, 55, 56, 57, -1, -1,
+ 60, -1, 62, 31, 32, -1, -1, 67, -1, -1,
+ -1, -1, 40, 41, 42, 43, -1, -1, -1, -1,
+ -1, -1, 50, 51, -1, -1, 54, 55, 56, 57,
+ -1, -1, 60, -1, 62, -1, -1, -1, -1, 67,
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, -1, -1,
+ 33, 34, -1, 36, -1, 38, 39, -1, -1, -1,
-1, 44, 45, 46, -1, -1, 49, -1, -1, 52,
- -1, -1, -1, -1, -1, 58, 59, -1, 61, 8,
- 63, 64, 65, -1, -1, 68, -1, 16, 17, -1,
- -1, 20, -1, 22, 23, -1, 25, -1, 27, -1,
- -1, -1, -1, 32, 33, -1, 35, -1, 37, -1,
- 39, -1, -1, -1, -1, 44, 45, 46, -1, -1,
- 49, -1, -1, -1, -1, -1, -1, -1, -1, 58,
- 59, -1, 61, 8, 63, 64, 65, -1, -1, 68,
- 69, 16, 17, -1, -1, 20, -1, 22, 23, -1,
- 25, 26, 27, -1, -1, -1, -1, 32, 33, -1,
- 35, -1, 37, -1, 39, -1, -1, -1, -1, 44,
- 45, 46, -1, -1, 49, -1, -1, -1, -1, -1,
- -1, -1, -1, 58, 59, -1, 61, 8, 63, 64,
- 65, -1, -1, 68, -1, 16, 17, -1, -1, 20,
- -1, 22, 23, -1, 25, -1, 27, -1, -1, -1,
- -1, 32, 33, -1, 35, -1, 37, -1, 39, -1,
+ -1, -1, -1, -1, -1, 58, 59, -1, 61, -1,
+ 63, 64, 65, 3, -1, 68, 6, -1, 8, 9,
+ -1, 11, 12, -1, 14, -1, -1, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, -1, -1, 33, 34, 35, 36, -1, -1, 39,
+ -1, -1, -1, -1, 44, 45, 46, -1, -1, 49,
+ -1, -1, 52, -1, -1, -1, -1, -1, 58, 59,
+ -1, 61, -1, 63, 64, 65, 3, -1, 68, 6,
+ -1, 8, 9, -1, 11, 12, -1, 14, -1, -1,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, -1, -1, 33, 34, -1, 36,
+ -1, 38, 39, -1, -1, -1, -1, 44, 45, 46,
+ -1, -1, 49, -1, -1, 52, -1, -1, -1, -1,
+ -1, 58, 59, -1, 61, -1, 63, 64, 65, 3,
+ -1, 68, 6, -1, 8, 9, -1, 11, 12, -1,
+ 14, -1, -1, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, -1, -1, 33,
+ 34, -1, 36, -1, 38, 39, -1, -1, -1, -1,
+ 44, 45, 46, -1, -1, 49, -1, -1, 52, -1,
+ -1, -1, -1, -1, 58, 59, -1, 61, -1, 63,
+ 64, 65, 3, -1, 68, 6, -1, 8, 9, -1,
+ 11, 12, -1, 14, -1, -1, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ -1, -1, 33, 34, -1, 36, -1, -1, 39, -1,
-1, -1, -1, 44, 45, 46, -1, -1, 49, -1,
- -1, -1, -1, -1, -1, -1, -1, 58, 59, -1,
- 61, 8, 63, 64, 65, 66, -1, 68, -1, 16,
- 17, -1, -1, 20, -1, 22, 23, -1, 25, -1,
- 27, -1, -1, -1, -1, 32, 33, -1, 35, -1,
- 37, -1, 39, -1, -1, -1, -1, 44, 45, 46,
- -1, -1, 49, 16, 17, -1, -1, 20, -1, 22,
- 23, 58, 59, -1, 61, -1, 63, 64, 65, -1,
- -1, 68, 35, -1, 37, -1, 39, -1, -1, -1,
+ -1, 52, -1, -1, -1, -1, 8, 58, 59, 11,
+ 61, -1, 63, 64, 65, 17, 18, 68, -1, 21,
+ -1, 23, 24, -1, 26, -1, 28, -1, -1, -1,
+ -1, 33, 34, -1, 36, -1, -1, 39, -1, -1,
+ -1, -1, 44, 45, 46, -1, -1, 49, -1, -1,
+ -1, -1, -1, -1, -1, 8, 58, 59, 11, 61,
+ -1, 63, 64, 65, 17, 18, 68, 69, 21, -1,
+ 23, 24, -1, 26, 27, 28, -1, -1, -1, -1,
+ 33, 34, -1, 36, -1, -1, 39, -1, -1, -1,
-1, 44, 45, 46, -1, -1, 49, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 61, -1,
- -1, -1, 65, -1, -1, 68
+ -1, -1, -1, -1, 8, 58, 59, 11, 61, -1,
+ 63, 64, 65, 17, 18, 68, -1, 21, -1, 23,
+ 24, -1, 26, -1, 28, -1, -1, -1, -1, 33,
+ 34, -1, 36, -1, -1, 39, -1, -1, -1, -1,
+ 44, 45, 46, -1, -1, 49, -1, -1, -1, 53,
+ -1, -1, -1, 8, 58, 59, 11, 61, -1, 63,
+ 64, 65, 17, 18, 68, -1, 21, -1, 23, 24,
+ -1, 26, -1, 28, -1, -1, -1, -1, 33, 34,
+ -1, 36, -1, -1, 39, -1, -1, -1, -1, 44,
+ 45, 46, -1, -1, 49, -1, -1, -1, -1, -1,
+ -1, -1, -1, 58, 59, -1, 61, -1, 63, 64,
+ 65, 66, 8, 68, -1, 11, -1, -1, -1, -1,
+ -1, 17, 18, -1, -1, 21, -1, 23, 24, -1,
+ 26, -1, 28, -1, -1, -1, -1, 33, 34, -1,
+ 36, -1, -1, 39, -1, -1, -1, -1, 44, 45,
+ 46, -1, -1, 49, -1, -1, -1, -1, -1, -1,
+ -1, -1, 58, 59, -1, 61, -1, 63, 64, 65,
+ -1, -1, 68, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, -1, -1, -1, -1, -1, -1, -1, 38, 39,
+ -1, -1, -1, -1, 44, -1, 46, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, -1, -1, -1, -1, -1,
+ -1, -1, -1, 39, -1, -1, -1, -1, 44, -1,
+ 46, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, -1,
+ -1, -1, -1, -1, -1, -1, -1, 39
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
- 0, 71, 73, 0, 3, 6, 8, 9, 11, 13,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 32, 33, 34, 35, 37, 39,
+ 0, 71, 73, 0, 3, 6, 8, 9, 11, 12,
+ 14, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 33, 34, 35, 36, 39,
44, 45, 46, 49, 52, 58, 59, 61, 63, 64,
65, 68, 72, 74, 75, 79, 82, 83, 92, 93,
94, 95, 100, 101, 102, 103, 104, 105, 111, 112,
117, 121, 123, 125, 127, 129, 131, 133, 135, 137,
139, 140, 141, 142, 143, 144, 145, 146, 147, 150,
- 151, 155, 159, 160, 39, 158, 158, 39, 49, 74,
- 142, 144, 79, 1, 68, 162, 162, 145, 146, 115,
- 117, 162, 117, 49, 82, 142, 39, 84, 86, 142,
- 162, 162, 142, 142, 53, 38, 39, 44, 46, 79,
- 80, 156, 157, 142, 142, 142, 142, 50, 66, 152,
- 153, 154, 117, 47, 39, 162, 1, 50, 52, 161,
- 31, 54, 30, 55, 56, 57, 41, 14, 15, 43,
- 42, 58, 59, 60, 61, 62, 32, 33, 35, 40,
- 51, 120, 65, 67, 68, 148, 65, 67, 148, 161,
- 161, 38, 39, 44, 46, 28, 1, 116, 117, 26,
- 118, 119, 122, 124, 126, 128, 130, 132, 134, 136,
- 138, 139, 144, 148, 161, 117, 161, 38, 5, 12,
- 113, 114, 51, 88, 89, 50, 161, 116, 117, 79,
- 38, 79, 38, 50, 53, 50, 66, 50, 66, 121,
- 69, 36, 162, 39, 77, 78, 121, 127, 121, 129,
- 131, 133, 135, 137, 139, 139, 139, 140, 141, 141,
- 142, 142, 142, 121, 121, 117, 39, 69, 121, 149,
- 117, 39, 162, 1, 69, 163, 39, 85, 87, 96,
- 50, 31, 54, 30, 55, 56, 57, 41, 15, 43,
- 14, 51, 120, 163, 162, 82, 114, 121, 86, 163,
- 163, 157, 121, 153, 154, 39, 78, 50, 163, 53,
- 66, 50, 69, 66, 116, 79, 51, 90, 91, 50,
- 98, 14, 1, 52, 164, 122, 144, 128, 122, 130,
- 132, 134, 136, 138, 139, 139, 116, 122, 122, 49,
- 106, 39, 79, 79, 53, 66, 121, 162, 163, 39,
- 49, 121, 121, 163, 10, 122, 87, 164, 116, 115,
- 53, 163, 4, 107, 108, 109, 163, 121, 78, 49,
- 73, 76, 161, 79, 115, 163, 97, 122, 79, 117,
- 7, 38, 110, 109, 82, 163, 76, 38, 99, 79,
- 164, 53, 53, 107, 49, 38, 164, 115, 80, 81,
- 81, 38, 76, 115, 163, 38, 163, 79, 79
+ 151, 155, 161, 162, 39, 158, 158, 39, 49, 74,
+ 142, 144, 79, 1, 68, 164, 164, 145, 146, 115,
+ 117, 164, 117, 49, 82, 142, 39, 84, 86, 142,
+ 164, 164, 142, 142, 53, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 38, 39, 44, 46, 79, 80, 156,
+ 157, 159, 160, 142, 142, 142, 142, 50, 66, 152,
+ 153, 154, 117, 47, 39, 164, 1, 50, 52, 163,
+ 32, 54, 31, 55, 56, 57, 41, 15, 16, 43,
+ 42, 58, 59, 60, 61, 62, 33, 34, 36, 40,
+ 51, 120, 65, 67, 68, 148, 65, 67, 148, 163,
+ 163, 3, 6, 8, 9, 11, 12, 14, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 38, 39, 44, 46, 29, 1, 116, 117,
+ 27, 118, 119, 122, 124, 126, 128, 130, 132, 134,
+ 136, 138, 139, 144, 148, 163, 117, 163, 38, 5,
+ 13, 113, 114, 51, 88, 89, 50, 163, 116, 117,
+ 79, 38, 79, 38, 50, 53, 50, 66, 50, 66,
+ 121, 69, 37, 164, 39, 77, 78, 121, 127, 121,
+ 129, 131, 133, 135, 137, 139, 139, 139, 140, 141,
+ 141, 142, 142, 142, 121, 121, 117, 159, 69, 121,
+ 149, 117, 159, 164, 1, 69, 165, 39, 85, 87,
+ 96, 50, 32, 54, 31, 55, 56, 57, 41, 16,
+ 43, 15, 51, 120, 165, 164, 82, 114, 121, 86,
+ 165, 165, 157, 121, 153, 154, 39, 78, 50, 165,
+ 53, 66, 50, 69, 66, 116, 79, 51, 90, 91,
+ 50, 98, 15, 1, 52, 166, 122, 144, 128, 122,
+ 130, 132, 134, 136, 138, 139, 139, 116, 122, 122,
+ 49, 106, 39, 79, 79, 53, 66, 121, 164, 165,
+ 39, 49, 121, 121, 165, 10, 122, 87, 166, 116,
+ 115, 53, 165, 4, 107, 108, 109, 165, 121, 78,
+ 49, 73, 76, 163, 79, 115, 165, 97, 122, 79,
+ 117, 7, 38, 110, 109, 82, 165, 76, 38, 99,
+ 79, 166, 53, 53, 107, 49, 38, 166, 115, 80,
+ 81, 81, 38, 76, 115, 165, 38, 165, 79, 79
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
@@ -1110,8 +1168,11 @@ static const yytype_uint8 yyr1[] =
147, 147, 148, 148, 149, 149, 150, 150, 150, 150,
150, 150, 151, 151, 151, 151, 152, 152, 153, 153,
154, 154, 155, 155, 156, 156, 157, 157, 157, 158,
- 158, 159, 159, 159, 159, 159, 159, 160, 160, 160,
- 161, 161, 162, 162, 163, 163, 164, 164
+ 158, 159, 159, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 161, 161, 161, 161, 161, 161, 162, 162, 162,
+ 163, 163, 164, 164, 165, 165, 166, 166
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
@@ -1138,6 +1199,9 @@ static const yytype_uint8 yyr2[] =
1, 3, 2, 3, 3, 5, 2, 4, 1, 2,
0, 1, 2, 3, 3, 5, 1, 1, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1
};
@@ -1821,1281 +1885,1468 @@ yyreduce:
switch (yyn)
{
case 2:
-#line 253 "parser.y" /* yacc.c:1646 */
+#line 254 "parser.y" /* yacc.c:1646 */
{ program_parsed(ctx, (yyvsp[-2].source_elements)); }
-#line 1827 "parser.tab.c" /* yacc.c:1646 */
+#line 1891 "parser.tab.c" /* yacc.c:1646 */
break;
case 3:
-#line 256 "parser.y" /* yacc.c:1646 */
+#line 257 "parser.y" /* yacc.c:1646 */
{}
-#line 1833 "parser.tab.c" /* yacc.c:1646 */
+#line 1897 "parser.tab.c" /* yacc.c:1646 */
break;
case 4:
-#line 257 "parser.y" /* yacc.c:1646 */
+#line 258 "parser.y" /* yacc.c:1646 */
{}
-#line 1839 "parser.tab.c" /* yacc.c:1646 */
+#line 1903 "parser.tab.c" /* yacc.c:1646 */
break;
case 5:
-#line 261 "parser.y" /* yacc.c:1646 */
+#line 262 "parser.y" /* yacc.c:1646 */
{ (yyval.source_elements) = new_source_elements(ctx); }
-#line 1845 "parser.tab.c" /* yacc.c:1646 */
+#line 1909 "parser.tab.c" /* yacc.c:1646 */
break;
case 6:
-#line 263 "parser.y" /* yacc.c:1646 */
+#line 264 "parser.y" /* yacc.c:1646 */
{ (yyval.source_elements) =
source_elements_add_statement((yyvsp[-1].source_elements), (yyvsp[0].statement)); }
-#line 1851 "parser.tab.c" /* yacc.c:1646 */
+#line 1915 "parser.tab.c" /* yacc.c:1646 */
break;
case 7:
-#line 268 "parser.y" /* yacc.c:1646 */
+#line 269 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_function_expression(ctx, NULL, (yyvsp[-4].parameter_list),
(yyvsp[-1].source_elements), NULL, (yyvsp[-6].srcptr),
(yyvsp[0].srcptr)-(yyvsp[-6].srcptr)+1); }
-#line 1857 "parser.tab.c" /* yacc.c:1646 */
+#line 1921 "parser.tab.c" /* yacc.c:1646 */
break;
case 8:
-#line 270 "parser.y" /* yacc.c:1646 */
+#line 271 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_function_expression(ctx, (yyvsp[-6].identifier),
(yyvsp[-4].parameter_list), (yyvsp[-1].source_elements), NULL, (yyvsp[-7].srcptr),
(yyvsp[0].srcptr)-(yyvsp[-7].srcptr)+1); }
-#line 1863 "parser.tab.c" /* yacc.c:1646 */
+#line 1927 "parser.tab.c" /* yacc.c:1646 */
break;
case 9:
-#line 272 "parser.y" /* yacc.c:1646 */
+#line 273 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_function_expression(ctx, (yyvsp[-6].identifier),
(yyvsp[-4].parameter_list), (yyvsp[-1].source_elements), (yyvsp[-8].identifier),
(yyvsp[-9].srcptr), (yyvsp[0].srcptr)-(yyvsp[-9].srcptr)+1); }
-#line 1869 "parser.tab.c" /* yacc.c:1646 */
+#line 1933 "parser.tab.c" /* yacc.c:1646 */
break;
case 10:
-#line 275 "parser.y" /* yacc.c:1646 */
- { (yyval.srcptr) = (yyvsp[0].srcptr); }
-#line 1875 "parser.tab.c" /* yacc.c:1646 */
+#line 276 "parser.y" /* yacc.c:1646 */
+ { (yyval.srcptr) = ctx->ptr - 8; }
+#line 1939 "parser.tab.c" /* yacc.c:1646 */
break;
case 11:
-#line 279 "parser.y" /* yacc.c:1646 */
+#line 280 "parser.y" /* yacc.c:1646 */
{ (yyval.source_elements) = (yyvsp[0].source_elements); }
-#line 1881 "parser.tab.c" /* yacc.c:1646 */
+#line 1945 "parser.tab.c" /* yacc.c:1646 */
break;
case 12:
-#line 283 "parser.y" /* yacc.c:1646 */
+#line 284 "parser.y" /* yacc.c:1646 */
{ (yyval.parameter_list) = new_parameter_list(ctx, (yyvsp[0].identifier)); }
-#line 1887 "parser.tab.c" /* yacc.c:1646 */
+#line 1951 "parser.tab.c" /* yacc.c:1646 */
break;
case 13:
-#line 285 "parser.y" /* yacc.c:1646 */
+#line 286 "parser.y" /* yacc.c:1646 */
{ (yyval.parameter_list) = parameter_list_add(ctx, (yyvsp[-2].parameter_list),
(yyvsp[0].identifier)); }
-#line 1893 "parser.tab.c" /* yacc.c:1646 */
+#line 1957 "parser.tab.c" /* yacc.c:1646 */
break;
case 14:
-#line 289 "parser.y" /* yacc.c:1646 */
+#line 290 "parser.y" /* yacc.c:1646 */
{ (yyval.parameter_list) = NULL; }
-#line 1899 "parser.tab.c" /* yacc.c:1646 */
+#line 1963 "parser.tab.c" /* yacc.c:1646 */
break;
case 15:
-#line 290 "parser.y" /* yacc.c:1646 */
+#line 291 "parser.y" /* yacc.c:1646 */
{ (yyval.parameter_list) = (yyvsp[0].parameter_list); }
-#line 1905 "parser.tab.c" /* yacc.c:1646 */
+#line 1969 "parser.tab.c" /* yacc.c:1646 */
break;
case 16:
-#line 294 "parser.y" /* yacc.c:1646 */
+#line 295 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 1911 "parser.tab.c" /* yacc.c:1646 */
+#line 1975 "parser.tab.c" /* yacc.c:1646 */
break;
case 17:
-#line 295 "parser.y" /* yacc.c:1646 */
+#line 296 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 1917 "parser.tab.c" /* yacc.c:1646 */
+#line 1981 "parser.tab.c" /* yacc.c:1646 */
break;
case 18:
-#line 296 "parser.y" /* yacc.c:1646 */
+#line 297 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 1923 "parser.tab.c" /* yacc.c:1646 */
+#line 1987 "parser.tab.c" /* yacc.c:1646 */
break;
case 19:
-#line 297 "parser.y" /* yacc.c:1646 */
+#line 298 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_expression_statement(ctx, (yyvsp[0].expr)); }
-#line 1929 "parser.tab.c" /* yacc.c:1646 */
+#line 1993 "parser.tab.c" /* yacc.c:1646 */
break;
case 20:
-#line 298 "parser.y" /* yacc.c:1646 */
+#line 299 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 1935 "parser.tab.c" /* yacc.c:1646 */
+#line 1999 "parser.tab.c" /* yacc.c:1646 */
break;
case 21:
-#line 299 "parser.y" /* yacc.c:1646 */
+#line 300 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 1941 "parser.tab.c" /* yacc.c:1646 */
+#line 2005 "parser.tab.c" /* yacc.c:1646 */
break;
case 22:
-#line 300 "parser.y" /* yacc.c:1646 */
+#line 301 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 1947 "parser.tab.c" /* yacc.c:1646 */
+#line 2011 "parser.tab.c" /* yacc.c:1646 */
break;
case 23:
-#line 301 "parser.y" /* yacc.c:1646 */
+#line 302 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 1953 "parser.tab.c" /* yacc.c:1646 */
+#line 2017 "parser.tab.c" /* yacc.c:1646 */
break;
case 24:
-#line 302 "parser.y" /* yacc.c:1646 */
+#line 303 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 1959 "parser.tab.c" /* yacc.c:1646 */
+#line 2023 "parser.tab.c" /* yacc.c:1646 */
break;
case 25:
-#line 303 "parser.y" /* yacc.c:1646 */
+#line 304 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 1965 "parser.tab.c" /* yacc.c:1646 */
+#line 2029 "parser.tab.c" /* yacc.c:1646 */
break;
case 26:
-#line 304 "parser.y" /* yacc.c:1646 */
+#line 305 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 1971 "parser.tab.c" /* yacc.c:1646 */
+#line 2035 "parser.tab.c" /* yacc.c:1646 */
break;
case 27:
-#line 305 "parser.y" /* yacc.c:1646 */
+#line 306 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 1977 "parser.tab.c" /* yacc.c:1646 */
+#line 2041 "parser.tab.c" /* yacc.c:1646 */
break;
case 28:
-#line 306 "parser.y" /* yacc.c:1646 */
+#line 307 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 1983 "parser.tab.c" /* yacc.c:1646 */
+#line 2047 "parser.tab.c" /* yacc.c:1646 */
break;
case 29:
-#line 307 "parser.y" /* yacc.c:1646 */
+#line 308 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 1989 "parser.tab.c" /* yacc.c:1646 */
+#line 2053 "parser.tab.c" /* yacc.c:1646 */
break;
case 30:
-#line 308 "parser.y" /* yacc.c:1646 */
+#line 309 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 1995 "parser.tab.c" /* yacc.c:1646 */
+#line 2059 "parser.tab.c" /* yacc.c:1646 */
break;
case 31:
-#line 312 "parser.y" /* yacc.c:1646 */
+#line 313 "parser.y" /* yacc.c:1646 */
{ (yyval.statement_list) = new_statement_list(ctx, (yyvsp[0].statement)); }
-#line 2001 "parser.tab.c" /* yacc.c:1646 */
+#line 2065 "parser.tab.c" /* yacc.c:1646 */
break;
case 32:
-#line 314 "parser.y" /* yacc.c:1646 */
+#line 315 "parser.y" /* yacc.c:1646 */
{ (yyval.statement_list) = statement_list_add((yyvsp[-1].statement_list),
(yyvsp[0].statement)); }
-#line 2007 "parser.tab.c" /* yacc.c:1646 */
+#line 2071 "parser.tab.c" /* yacc.c:1646 */
break;
case 33:
-#line 318 "parser.y" /* yacc.c:1646 */
+#line 319 "parser.y" /* yacc.c:1646 */
{ (yyval.statement_list) = NULL; }
-#line 2013 "parser.tab.c" /* yacc.c:1646 */
+#line 2077 "parser.tab.c" /* yacc.c:1646 */
break;
case 34:
-#line 319 "parser.y" /* yacc.c:1646 */
+#line 320 "parser.y" /* yacc.c:1646 */
{ (yyval.statement_list) = (yyvsp[0].statement_list); }
-#line 2019 "parser.tab.c" /* yacc.c:1646 */
+#line 2083 "parser.tab.c" /* yacc.c:1646 */
break;
case 35:
-#line 323 "parser.y" /* yacc.c:1646 */
+#line 324 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_block_statement(ctx, (yyvsp[-1].statement_list)); }
-#line 2025 "parser.tab.c" /* yacc.c:1646 */
+#line 2089 "parser.tab.c" /* yacc.c:1646 */
break;
case 36:
-#line 324 "parser.y" /* yacc.c:1646 */
+#line 325 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_block_statement(ctx, NULL); }
-#line 2031 "parser.tab.c" /* yacc.c:1646 */
+#line 2095 "parser.tab.c" /* yacc.c:1646 */
break;
case 37:
-#line 329 "parser.y" /* yacc.c:1646 */
+#line 330 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_var_statement(ctx, (yyvsp[-1].variable_list)); }
-#line 2037 "parser.tab.c" /* yacc.c:1646 */
+#line 2101 "parser.tab.c" /* yacc.c:1646 */
break;
case 38:
-#line 333 "parser.y" /* yacc.c:1646 */
+#line 334 "parser.y" /* yacc.c:1646 */
{ (yyval.variable_list) = new_variable_list(ctx, (yyvsp[0].variable_declaration)); }
-#line 2043 "parser.tab.c" /* yacc.c:1646 */
+#line 2107 "parser.tab.c" /* yacc.c:1646 */
break;
case 39:
-#line 335 "parser.y" /* yacc.c:1646 */
+#line 336 "parser.y" /* yacc.c:1646 */
{ (yyval.variable_list) = variable_list_add(ctx, (yyvsp[-2].variable_list),
(yyvsp[0].variable_declaration)); }
-#line 2049 "parser.tab.c" /* yacc.c:1646 */
+#line 2113 "parser.tab.c" /* yacc.c:1646 */
break;
case 40:
-#line 340 "parser.y" /* yacc.c:1646 */
+#line 341 "parser.y" /* yacc.c:1646 */
{ (yyval.variable_list) = new_variable_list(ctx, (yyvsp[0].variable_declaration)); }
-#line 2055 "parser.tab.c" /* yacc.c:1646 */
+#line 2119 "parser.tab.c" /* yacc.c:1646 */
break;
case 41:
-#line 342 "parser.y" /* yacc.c:1646 */
+#line 343 "parser.y" /* yacc.c:1646 */
{ (yyval.variable_list) = variable_list_add(ctx, (yyvsp[-2].variable_list),
(yyvsp[0].variable_declaration)); }
-#line 2061 "parser.tab.c" /* yacc.c:1646 */
+#line 2125 "parser.tab.c" /* yacc.c:1646 */
break;
case 42:
-#line 347 "parser.y" /* yacc.c:1646 */
+#line 348 "parser.y" /* yacc.c:1646 */
{ (yyval.variable_declaration) = new_variable_declaration(ctx,
(yyvsp[-1].identifier), (yyvsp[0].expr)); }
-#line 2067 "parser.tab.c" /* yacc.c:1646 */
+#line 2131 "parser.tab.c" /* yacc.c:1646 */
break;
case 43:
-#line 352 "parser.y" /* yacc.c:1646 */
+#line 353 "parser.y" /* yacc.c:1646 */
{ (yyval.variable_declaration) = new_variable_declaration(ctx,
(yyvsp[-1].identifier), (yyvsp[0].expr)); }
-#line 2073 "parser.tab.c" /* yacc.c:1646 */
+#line 2137 "parser.tab.c" /* yacc.c:1646 */
break;
case 44:
-#line 356 "parser.y" /* yacc.c:1646 */
+#line 357 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = NULL; }
-#line 2079 "parser.tab.c" /* yacc.c:1646 */
+#line 2143 "parser.tab.c" /* yacc.c:1646 */
break;
case 45:
-#line 357 "parser.y" /* yacc.c:1646 */
+#line 358 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2085 "parser.tab.c" /* yacc.c:1646 */
+#line 2149 "parser.tab.c" /* yacc.c:1646 */
break;
case 46:
-#line 362 "parser.y" /* yacc.c:1646 */
+#line 363 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2091 "parser.tab.c" /* yacc.c:1646 */
+#line 2155 "parser.tab.c" /* yacc.c:1646 */
break;
case 47:
-#line 366 "parser.y" /* yacc.c:1646 */
+#line 367 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = NULL; }
-#line 2097 "parser.tab.c" /* yacc.c:1646 */
+#line 2161 "parser.tab.c" /* yacc.c:1646 */
break;
case 48:
-#line 367 "parser.y" /* yacc.c:1646 */
+#line 368 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2103 "parser.tab.c" /* yacc.c:1646 */
+#line 2167 "parser.tab.c" /* yacc.c:1646 */
break;
case 49:
-#line 372 "parser.y" /* yacc.c:1646 */
+#line 373 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2109 "parser.tab.c" /* yacc.c:1646 */
+#line 2173 "parser.tab.c" /* yacc.c:1646 */
break;
case 50:
-#line 376 "parser.y" /* yacc.c:1646 */
+#line 377 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_statement(ctx, STAT_EMPTY, 0); }
-#line 2115 "parser.tab.c" /* yacc.c:1646 */
+#line 2179 "parser.tab.c" /* yacc.c:1646 */
break;
case 51:
-#line 381 "parser.y" /* yacc.c:1646 */
+#line 382 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_expression_statement(ctx, (yyvsp[-1].expr)); }
-#line 2121 "parser.tab.c" /* yacc.c:1646 */
+#line 2185 "parser.tab.c" /* yacc.c:1646 */
break;
case 52:
-#line 386 "parser.y" /* yacc.c:1646 */
+#line 387 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_if_statement(ctx, (yyvsp[-4].expr), (yyvsp[-2].statement),
(yyvsp[0].statement)); }
-#line 2127 "parser.tab.c" /* yacc.c:1646 */
+#line 2191 "parser.tab.c" /* yacc.c:1646 */
break;
case 53:
-#line 388 "parser.y" /* yacc.c:1646 */
+#line 389 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_if_statement(ctx, (yyvsp[-2].expr), (yyvsp[0].statement),
NULL); }
-#line 2133 "parser.tab.c" /* yacc.c:1646 */
+#line 2197 "parser.tab.c" /* yacc.c:1646 */
break;
case 54:
-#line 393 "parser.y" /* yacc.c:1646 */
+#line 394 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_while_statement(ctx, TRUE, (yyvsp[-2].expr),
(yyvsp[-5].statement)); }
-#line 2139 "parser.tab.c" /* yacc.c:1646 */
+#line 2203 "parser.tab.c" /* yacc.c:1646 */
break;
case 55:
-#line 395 "parser.y" /* yacc.c:1646 */
+#line 396 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_while_statement(ctx, FALSE, (yyvsp[-2].expr),
(yyvsp[0].statement)); }
-#line 2145 "parser.tab.c" /* yacc.c:1646 */
+#line 2209 "parser.tab.c" /* yacc.c:1646 */
break;
case 56:
-#line 397 "parser.y" /* yacc.c:1646 */
+#line 398 "parser.y" /* yacc.c:1646 */
{ if(!explicit_error(ctx, (yyvsp[0].expr), ';')) YYABORT; }
-#line 2151 "parser.tab.c" /* yacc.c:1646 */
+#line 2215 "parser.tab.c" /* yacc.c:1646 */
break;
case 57:
-#line 399 "parser.y" /* yacc.c:1646 */
+#line 400 "parser.y" /* yacc.c:1646 */
{ if(!explicit_error(ctx, (yyvsp[0].expr), ';')) YYABORT; }
-#line 2157 "parser.tab.c" /* yacc.c:1646 */
+#line 2221 "parser.tab.c" /* yacc.c:1646 */
break;
case 58:
-#line 401 "parser.y" /* yacc.c:1646 */
+#line 402 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_for_statement(ctx, NULL, (yyvsp[-8].expr),
(yyvsp[-5].expr), (yyvsp[-2].expr), (yyvsp[0].statement)); }
-#line 2163 "parser.tab.c" /* yacc.c:1646 */
+#line 2227 "parser.tab.c" /* yacc.c:1646 */
break;
case 59:
-#line 403 "parser.y" /* yacc.c:1646 */
+#line 404 "parser.y" /* yacc.c:1646 */
{ if(!explicit_error(ctx, (yyvsp[0].variable_list), ';')) YYABORT; }
-#line 2169 "parser.tab.c" /* yacc.c:1646 */
+#line 2233 "parser.tab.c" /* yacc.c:1646 */
break;
case 60:
-#line 405 "parser.y" /* yacc.c:1646 */
+#line 406 "parser.y" /* yacc.c:1646 */
{ if(!explicit_error(ctx, (yyvsp[0].expr), ';')) YYABORT; }
-#line 2175 "parser.tab.c" /* yacc.c:1646 */
+#line 2239 "parser.tab.c" /* yacc.c:1646 */
break;
case 61:
-#line 407 "parser.y" /* yacc.c:1646 */
+#line 408 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_for_statement(ctx, (yyvsp[-8].variable_list), NULL,
(yyvsp[-5].expr), (yyvsp[-2].expr), (yyvsp[0].statement)); }
-#line 2181 "parser.tab.c" /* yacc.c:1646 */
+#line 2245 "parser.tab.c" /* yacc.c:1646 */
break;
case 62:
-#line 409 "parser.y" /* yacc.c:1646 */
+#line 410 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_forin_statement(ctx, NULL, (yyvsp[-4].expr),
(yyvsp[-2].expr), (yyvsp[0].statement)); }
-#line 2187 "parser.tab.c" /* yacc.c:1646 */
+#line 2251 "parser.tab.c" /* yacc.c:1646 */
break;
case 63:
-#line 411 "parser.y" /* yacc.c:1646 */
+#line 412 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_forin_statement(ctx, (yyvsp[-4].variable_declaration),
NULL, (yyvsp[-2].expr), (yyvsp[0].statement)); }
-#line 2193 "parser.tab.c" /* yacc.c:1646 */
+#line 2257 "parser.tab.c" /* yacc.c:1646 */
break;
case 64:
-#line 416 "parser.y" /* yacc.c:1646 */
+#line 417 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_continue_statement(ctx, (yyvsp[-1].identifier)); }
-#line 2199 "parser.tab.c" /* yacc.c:1646 */
+#line 2263 "parser.tab.c" /* yacc.c:1646 */
break;
case 65:
-#line 421 "parser.y" /* yacc.c:1646 */
+#line 422 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_break_statement(ctx, (yyvsp[-1].identifier)); }
-#line 2205 "parser.tab.c" /* yacc.c:1646 */
+#line 2269 "parser.tab.c" /* yacc.c:1646 */
break;
case 66:
-#line 426 "parser.y" /* yacc.c:1646 */
+#line 427 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_return_statement(ctx, (yyvsp[-1].expr)); }
-#line 2211 "parser.tab.c" /* yacc.c:1646 */
+#line 2275 "parser.tab.c" /* yacc.c:1646 */
break;
case 67:
-#line 431 "parser.y" /* yacc.c:1646 */
+#line 432 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_with_statement(ctx, (yyvsp[-2].expr),
(yyvsp[0].statement)); }
-#line 2217 "parser.tab.c" /* yacc.c:1646 */
+#line 2281 "parser.tab.c" /* yacc.c:1646 */
break;
case 68:
-#line 436 "parser.y" /* yacc.c:1646 */
+#line 437 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_labelled_statement(ctx, (yyvsp[-2].identifier),
(yyvsp[0].statement)); }
-#line 2223 "parser.tab.c" /* yacc.c:1646 */
+#line 2287 "parser.tab.c" /* yacc.c:1646 */
break;
case 69:
-#line 441 "parser.y" /* yacc.c:1646 */
+#line 442 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_switch_statement(ctx, (yyvsp[-2].expr),
(yyvsp[0].case_clausule)); }
-#line 2229 "parser.tab.c" /* yacc.c:1646 */
+#line 2293 "parser.tab.c" /* yacc.c:1646 */
break;
case 70:
-#line 446 "parser.y" /* yacc.c:1646 */
+#line 447 "parser.y" /* yacc.c:1646 */
{ (yyval.case_clausule) = new_case_block(ctx, (yyvsp[-1].case_list), NULL, NULL); }
-#line 2235 "parser.tab.c" /* yacc.c:1646 */
+#line 2299 "parser.tab.c" /* yacc.c:1646 */
break;
case 71:
-#line 448 "parser.y" /* yacc.c:1646 */
+#line 449 "parser.y" /* yacc.c:1646 */
{ (yyval.case_clausule) = new_case_block(ctx, (yyvsp[-3].case_list),
(yyvsp[-2].case_clausule), (yyvsp[-1].case_list)); }
-#line 2241 "parser.tab.c" /* yacc.c:1646 */
+#line 2305 "parser.tab.c" /* yacc.c:1646 */
break;
case 72:
-#line 452 "parser.y" /* yacc.c:1646 */
+#line 453 "parser.y" /* yacc.c:1646 */
{ (yyval.case_list) = NULL; }
-#line 2247 "parser.tab.c" /* yacc.c:1646 */
+#line 2311 "parser.tab.c" /* yacc.c:1646 */
break;
case 73:
-#line 453 "parser.y" /* yacc.c:1646 */
+#line 454 "parser.y" /* yacc.c:1646 */
{ (yyval.case_list) = (yyvsp[0].case_list); }
-#line 2253 "parser.tab.c" /* yacc.c:1646 */
+#line 2317 "parser.tab.c" /* yacc.c:1646 */
break;
case 74:
-#line 457 "parser.y" /* yacc.c:1646 */
+#line 458 "parser.y" /* yacc.c:1646 */
{ (yyval.case_list) = new_case_list(ctx, (yyvsp[0].case_clausule)); }
-#line 2259 "parser.tab.c" /* yacc.c:1646 */
+#line 2323 "parser.tab.c" /* yacc.c:1646 */
break;
case 75:
-#line 459 "parser.y" /* yacc.c:1646 */
+#line 460 "parser.y" /* yacc.c:1646 */
{ (yyval.case_list) = case_list_add(ctx, (yyvsp[-1].case_list),
(yyvsp[0].case_clausule)); }
-#line 2265 "parser.tab.c" /* yacc.c:1646 */
+#line 2329 "parser.tab.c" /* yacc.c:1646 */
break;
case 76:
-#line 464 "parser.y" /* yacc.c:1646 */
+#line 465 "parser.y" /* yacc.c:1646 */
{ (yyval.case_clausule) = new_case_clausule(ctx, (yyvsp[-2].expr),
(yyvsp[0].statement_list)); }
-#line 2271 "parser.tab.c" /* yacc.c:1646 */
+#line 2335 "parser.tab.c" /* yacc.c:1646 */
break;
case 77:
-#line 469 "parser.y" /* yacc.c:1646 */
+#line 470 "parser.y" /* yacc.c:1646 */
{ (yyval.case_clausule) = new_case_clausule(ctx, NULL, (yyvsp[0].statement_list)); }
-#line 2277 "parser.tab.c" /* yacc.c:1646 */
+#line 2341 "parser.tab.c" /* yacc.c:1646 */
break;
case 78:
-#line 474 "parser.y" /* yacc.c:1646 */
+#line 475 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_throw_statement(ctx, (yyvsp[-1].expr)); }
-#line 2283 "parser.tab.c" /* yacc.c:1646 */
+#line 2347 "parser.tab.c" /* yacc.c:1646 */
break;
case 79:
-#line 478 "parser.y" /* yacc.c:1646 */
+#line 479 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_try_statement(ctx, (yyvsp[-1].statement),
(yyvsp[0].catch_block), NULL); }
-#line 2289 "parser.tab.c" /* yacc.c:1646 */
+#line 2353 "parser.tab.c" /* yacc.c:1646 */
break;
case 80:
-#line 479 "parser.y" /* yacc.c:1646 */
+#line 480 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_try_statement(ctx, (yyvsp[-1].statement), NULL,
(yyvsp[0].statement)); }
-#line 2295 "parser.tab.c" /* yacc.c:1646 */
+#line 2359 "parser.tab.c" /* yacc.c:1646 */
break;
case 81:
-#line 481 "parser.y" /* yacc.c:1646 */
+#line 482 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = new_try_statement(ctx, (yyvsp[-2].statement),
(yyvsp[-1].catch_block), (yyvsp[0].statement)); }
-#line 2301 "parser.tab.c" /* yacc.c:1646 */
+#line 2365 "parser.tab.c" /* yacc.c:1646 */
break;
case 82:
-#line 486 "parser.y" /* yacc.c:1646 */
+#line 487 "parser.y" /* yacc.c:1646 */
{ (yyval.catch_block) = new_catch_block(ctx, (yyvsp[-2].identifier),
(yyvsp[0].statement)); }
-#line 2307 "parser.tab.c" /* yacc.c:1646 */
+#line 2371 "parser.tab.c" /* yacc.c:1646 */
break;
case 83:
-#line 490 "parser.y" /* yacc.c:1646 */
+#line 491 "parser.y" /* yacc.c:1646 */
{ (yyval.statement) = (yyvsp[0].statement); }
-#line 2313 "parser.tab.c" /* yacc.c:1646 */
+#line 2377 "parser.tab.c" /* yacc.c:1646 */
break;
case 84:
-#line 494 "parser.y" /* yacc.c:1646 */
+#line 495 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = NULL; }
-#line 2319 "parser.tab.c" /* yacc.c:1646 */
+#line 2383 "parser.tab.c" /* yacc.c:1646 */
break;
case 85:
-#line 495 "parser.y" /* yacc.c:1646 */
+#line 496 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2325 "parser.tab.c" /* yacc.c:1646 */
+#line 2389 "parser.tab.c" /* yacc.c:1646 */
break;
case 86:
-#line 498 "parser.y" /* yacc.c:1646 */
+#line 499 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2331 "parser.tab.c" /* yacc.c:1646 */
+#line 2395 "parser.tab.c" /* yacc.c:1646 */
break;
case 87:
-#line 499 "parser.y" /* yacc.c:1646 */
+#line 500 "parser.y" /* yacc.c:1646 */
{ set_error(ctx, JS_E_SYNTAX); YYABORT; }
-#line 2337 "parser.tab.c" /* yacc.c:1646 */
+#line 2401 "parser.tab.c" /* yacc.c:1646 */
break;
case 88:
-#line 503 "parser.y" /* yacc.c:1646 */
+#line 504 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2343 "parser.tab.c" /* yacc.c:1646 */
+#line 2407 "parser.tab.c" /* yacc.c:1646 */
break;
case 89:
-#line 505 "parser.y" /* yacc.c:1646 */
+#line 506 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_COMMA, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2349 "parser.tab.c" /* yacc.c:1646 */
+#line 2413 "parser.tab.c" /* yacc.c:1646 */
break;
case 90:
-#line 509 "parser.y" /* yacc.c:1646 */
+#line 510 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = NULL; }
-#line 2355 "parser.tab.c" /* yacc.c:1646 */
+#line 2419 "parser.tab.c" /* yacc.c:1646 */
break;
case 91:
-#line 510 "parser.y" /* yacc.c:1646 */
+#line 511 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2361 "parser.tab.c" /* yacc.c:1646 */
+#line 2425 "parser.tab.c" /* yacc.c:1646 */
break;
case 92:
-#line 515 "parser.y" /* yacc.c:1646 */
+#line 516 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2367 "parser.tab.c" /* yacc.c:1646 */
+#line 2431 "parser.tab.c" /* yacc.c:1646 */
break;
case 93:
-#line 517 "parser.y" /* yacc.c:1646 */
+#line 518 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_COMMA, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2373 "parser.tab.c" /* yacc.c:1646 */
+#line 2437 "parser.tab.c" /* yacc.c:1646 */
break;
case 94:
-#line 520 "parser.y" /* yacc.c:1646 */
+#line 521 "parser.y" /* yacc.c:1646 */
{ (yyval.ival) = (yyvsp[0].ival); }
-#line 2379 "parser.tab.c" /* yacc.c:1646 */
+#line 2443 "parser.tab.c" /* yacc.c:1646 */
break;
case 95:
-#line 521 "parser.y" /* yacc.c:1646 */
+#line 522 "parser.y" /* yacc.c:1646 */
{ (yyval.ival) = EXPR_ASSIGNDIV; }
-#line 2385 "parser.tab.c" /* yacc.c:1646 */
+#line 2449 "parser.tab.c" /* yacc.c:1646 */
break;
case 96:
-#line 525 "parser.y" /* yacc.c:1646 */
+#line 526 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2391 "parser.tab.c" /* yacc.c:1646 */
+#line 2455 "parser.tab.c" /* yacc.c:1646 */
break;
case 97:
-#line 527 "parser.y" /* yacc.c:1646 */
+#line 528 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_ASSIGN, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2397 "parser.tab.c" /* yacc.c:1646 */
+#line 2461 "parser.tab.c" /* yacc.c:1646 */
break;
case 98:
-#line 529 "parser.y" /* yacc.c:1646 */
+#line 530 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2403 "parser.tab.c" /* yacc.c:1646 */
+#line 2467 "parser.tab.c" /* yacc.c:1646 */
break;
case 99:
-#line 534 "parser.y" /* yacc.c:1646 */
+#line 535 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2409 "parser.tab.c" /* yacc.c:1646 */
+#line 2473 "parser.tab.c" /* yacc.c:1646 */
break;
case 100:
-#line 536 "parser.y" /* yacc.c:1646 */
+#line 537 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_ASSIGN, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2415 "parser.tab.c" /* yacc.c:1646 */
+#line 2479 "parser.tab.c" /* yacc.c:1646 */
break;
case 101:
-#line 538 "parser.y" /* yacc.c:1646 */
+#line 539 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2421 "parser.tab.c" /* yacc.c:1646 */
+#line 2485 "parser.tab.c" /* yacc.c:1646 */
break;
case 102:
-#line 542 "parser.y" /* yacc.c:1646 */
+#line 543 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2427 "parser.tab.c" /* yacc.c:1646 */
+#line 2491 "parser.tab.c" /* yacc.c:1646 */
break;
case 103:
-#line 544 "parser.y" /* yacc.c:1646 */
+#line 545 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_conditional_expression(ctx, (yyvsp[-4].expr), (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2433 "parser.tab.c" /* yacc.c:1646 */
+#line 2497 "parser.tab.c" /* yacc.c:1646 */
break;
case 104:
-#line 549 "parser.y" /* yacc.c:1646 */
+#line 550 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2439 "parser.tab.c" /* yacc.c:1646 */
+#line 2503 "parser.tab.c" /* yacc.c:1646 */
break;
case 105:
-#line 551 "parser.y" /* yacc.c:1646 */
+#line 552 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_conditional_expression(ctx, (yyvsp[-4].expr), (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2445 "parser.tab.c" /* yacc.c:1646 */
+#line 2509 "parser.tab.c" /* yacc.c:1646 */
break;
case 106:
-#line 555 "parser.y" /* yacc.c:1646 */
+#line 556 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2451 "parser.tab.c" /* yacc.c:1646 */
+#line 2515 "parser.tab.c" /* yacc.c:1646 */
break;
case 107:
-#line 557 "parser.y" /* yacc.c:1646 */
+#line 558 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_OR, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2457 "parser.tab.c" /* yacc.c:1646 */
+#line 2521 "parser.tab.c" /* yacc.c:1646 */
break;
case 108:
-#line 562 "parser.y" /* yacc.c:1646 */
+#line 563 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2463 "parser.tab.c" /* yacc.c:1646 */
+#line 2527 "parser.tab.c" /* yacc.c:1646 */
break;
case 109:
-#line 564 "parser.y" /* yacc.c:1646 */
+#line 565 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_OR, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2469 "parser.tab.c" /* yacc.c:1646 */
+#line 2533 "parser.tab.c" /* yacc.c:1646 */
break;
case 110:
-#line 568 "parser.y" /* yacc.c:1646 */
+#line 569 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2475 "parser.tab.c" /* yacc.c:1646 */
+#line 2539 "parser.tab.c" /* yacc.c:1646 */
break;
case 111:
-#line 570 "parser.y" /* yacc.c:1646 */
+#line 571 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_AND, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2481 "parser.tab.c" /* yacc.c:1646 */
+#line 2545 "parser.tab.c" /* yacc.c:1646 */
break;
case 112:
-#line 575 "parser.y" /* yacc.c:1646 */
+#line 576 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2487 "parser.tab.c" /* yacc.c:1646 */
+#line 2551 "parser.tab.c" /* yacc.c:1646 */
break;
case 113:
-#line 577 "parser.y" /* yacc.c:1646 */
+#line 578 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_AND, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2493 "parser.tab.c" /* yacc.c:1646 */
+#line 2557 "parser.tab.c" /* yacc.c:1646 */
break;
case 114:
-#line 581 "parser.y" /* yacc.c:1646 */
+#line 582 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2499 "parser.tab.c" /* yacc.c:1646 */
+#line 2563 "parser.tab.c" /* yacc.c:1646 */
break;
case 115:
-#line 583 "parser.y" /* yacc.c:1646 */
+#line 584 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_BOR, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2505 "parser.tab.c" /* yacc.c:1646 */
+#line 2569 "parser.tab.c" /* yacc.c:1646 */
break;
case 116:
-#line 588 "parser.y" /* yacc.c:1646 */
+#line 589 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2511 "parser.tab.c" /* yacc.c:1646 */
+#line 2575 "parser.tab.c" /* yacc.c:1646 */
break;
case 117:
-#line 590 "parser.y" /* yacc.c:1646 */
+#line 591 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_BOR, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2517 "parser.tab.c" /* yacc.c:1646 */
+#line 2581 "parser.tab.c" /* yacc.c:1646 */
break;
case 118:
-#line 594 "parser.y" /* yacc.c:1646 */
+#line 595 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2523 "parser.tab.c" /* yacc.c:1646 */
+#line 2587 "parser.tab.c" /* yacc.c:1646 */
break;
case 119:
-#line 596 "parser.y" /* yacc.c:1646 */
+#line 597 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_BXOR, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2529 "parser.tab.c" /* yacc.c:1646 */
+#line 2593 "parser.tab.c" /* yacc.c:1646 */
break;
case 120:
-#line 601 "parser.y" /* yacc.c:1646 */
+#line 602 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2535 "parser.tab.c" /* yacc.c:1646 */
+#line 2599 "parser.tab.c" /* yacc.c:1646 */
break;
case 121:
-#line 603 "parser.y" /* yacc.c:1646 */
+#line 604 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_BXOR, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2541 "parser.tab.c" /* yacc.c:1646 */
+#line 2605 "parser.tab.c" /* yacc.c:1646 */
break;
case 122:
-#line 607 "parser.y" /* yacc.c:1646 */
+#line 608 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2547 "parser.tab.c" /* yacc.c:1646 */
+#line 2611 "parser.tab.c" /* yacc.c:1646 */
break;
case 123:
-#line 609 "parser.y" /* yacc.c:1646 */
+#line 610 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_BAND, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2553 "parser.tab.c" /* yacc.c:1646 */
+#line 2617 "parser.tab.c" /* yacc.c:1646 */
break;
case 124:
-#line 614 "parser.y" /* yacc.c:1646 */
+#line 615 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2559 "parser.tab.c" /* yacc.c:1646 */
+#line 2623 "parser.tab.c" /* yacc.c:1646 */
break;
case 125:
-#line 616 "parser.y" /* yacc.c:1646 */
+#line 617 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_BAND, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2565 "parser.tab.c" /* yacc.c:1646 */
+#line 2629 "parser.tab.c" /* yacc.c:1646 */
break;
case 126:
-#line 620 "parser.y" /* yacc.c:1646 */
+#line 621 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2571 "parser.tab.c" /* yacc.c:1646 */
+#line 2635 "parser.tab.c" /* yacc.c:1646 */
break;
case 127:
-#line 622 "parser.y" /* yacc.c:1646 */
+#line 623 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2577 "parser.tab.c" /* yacc.c:1646 */
+#line 2641 "parser.tab.c" /* yacc.c:1646 */
break;
case 128:
-#line 626 "parser.y" /* yacc.c:1646 */
+#line 627 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2583 "parser.tab.c" /* yacc.c:1646 */
+#line 2647 "parser.tab.c" /* yacc.c:1646 */
break;
case 129:
-#line 628 "parser.y" /* yacc.c:1646 */
+#line 629 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2589 "parser.tab.c" /* yacc.c:1646 */
+#line 2653 "parser.tab.c" /* yacc.c:1646 */
break;
case 130:
-#line 632 "parser.y" /* yacc.c:1646 */
+#line 633 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2595 "parser.tab.c" /* yacc.c:1646 */
+#line 2659 "parser.tab.c" /* yacc.c:1646 */
break;
case 131:
-#line 634 "parser.y" /* yacc.c:1646 */
+#line 635 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2601 "parser.tab.c" /* yacc.c:1646 */
+#line 2665 "parser.tab.c" /* yacc.c:1646 */
break;
case 132:
-#line 636 "parser.y" /* yacc.c:1646 */
+#line 637 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_INSTANCEOF, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2607 "parser.tab.c" /* yacc.c:1646 */
+#line 2671 "parser.tab.c" /* yacc.c:1646 */
break;
case 133:
-#line 638 "parser.y" /* yacc.c:1646 */
+#line 639 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_IN, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2613 "parser.tab.c" /* yacc.c:1646 */
+#line 2677 "parser.tab.c" /* yacc.c:1646 */
break;
case 134:
-#line 642 "parser.y" /* yacc.c:1646 */
+#line 643 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2619 "parser.tab.c" /* yacc.c:1646 */
+#line 2683 "parser.tab.c" /* yacc.c:1646 */
break;
case 135:
-#line 644 "parser.y" /* yacc.c:1646 */
+#line 645 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2625 "parser.tab.c" /* yacc.c:1646 */
+#line 2689 "parser.tab.c" /* yacc.c:1646 */
break;
case 136:
-#line 646 "parser.y" /* yacc.c:1646 */
+#line 647 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_INSTANCEOF, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2631 "parser.tab.c" /* yacc.c:1646 */
+#line 2695 "parser.tab.c" /* yacc.c:1646 */
break;
case 137:
-#line 650 "parser.y" /* yacc.c:1646 */
+#line 651 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2637 "parser.tab.c" /* yacc.c:1646 */
+#line 2701 "parser.tab.c" /* yacc.c:1646 */
break;
case 138:
-#line 652 "parser.y" /* yacc.c:1646 */
+#line 653 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2643 "parser.tab.c" /* yacc.c:1646 */
+#line 2707 "parser.tab.c" /* yacc.c:1646 */
break;
case 139:
-#line 657 "parser.y" /* yacc.c:1646 */
+#line 658 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2649 "parser.tab.c" /* yacc.c:1646 */
+#line 2713 "parser.tab.c" /* yacc.c:1646 */
break;
case 140:
-#line 659 "parser.y" /* yacc.c:1646 */
+#line 660 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_ADD, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2655 "parser.tab.c" /* yacc.c:1646 */
+#line 2719 "parser.tab.c" /* yacc.c:1646 */
break;
case 141:
-#line 661 "parser.y" /* yacc.c:1646 */
+#line 662 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_SUB, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2661 "parser.tab.c" /* yacc.c:1646 */
+#line 2725 "parser.tab.c" /* yacc.c:1646 */
break;
case 142:
-#line 665 "parser.y" /* yacc.c:1646 */
+#line 666 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2667 "parser.tab.c" /* yacc.c:1646 */
+#line 2731 "parser.tab.c" /* yacc.c:1646 */
break;
case 143:
-#line 667 "parser.y" /* yacc.c:1646 */
+#line 668 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_MUL, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2673 "parser.tab.c" /* yacc.c:1646 */
+#line 2737 "parser.tab.c" /* yacc.c:1646 */
break;
case 144:
-#line 669 "parser.y" /* yacc.c:1646 */
+#line 670 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_DIV, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2679 "parser.tab.c" /* yacc.c:1646 */
+#line 2743 "parser.tab.c" /* yacc.c:1646 */
break;
case 145:
-#line 671 "parser.y" /* yacc.c:1646 */
+#line 672 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_MOD, (yyvsp[-2].expr),
(yyvsp[0].expr)); }
-#line 2685 "parser.tab.c" /* yacc.c:1646 */
+#line 2749 "parser.tab.c" /* yacc.c:1646 */
break;
case 146:
-#line 675 "parser.y" /* yacc.c:1646 */
+#line 676 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2691 "parser.tab.c" /* yacc.c:1646 */
+#line 2755 "parser.tab.c" /* yacc.c:1646 */
break;
case 147:
-#line 677 "parser.y" /* yacc.c:1646 */
+#line 678 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_DELETE, (yyvsp[0].expr)); }
-#line 2697 "parser.tab.c" /* yacc.c:1646 */
+#line 2761 "parser.tab.c" /* yacc.c:1646 */
break;
case 148:
-#line 678 "parser.y" /* yacc.c:1646 */
+#line 679 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_VOID, (yyvsp[0].expr)); }
-#line 2703 "parser.tab.c" /* yacc.c:1646 */
+#line 2767 "parser.tab.c" /* yacc.c:1646 */
break;
case 149:
-#line 680 "parser.y" /* yacc.c:1646 */
+#line 681 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_TYPEOF, (yyvsp[0].expr)); }
-#line 2709 "parser.tab.c" /* yacc.c:1646 */
+#line 2773 "parser.tab.c" /* yacc.c:1646 */
break;
case 150:
-#line 681 "parser.y" /* yacc.c:1646 */
+#line 682 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_PREINC, (yyvsp[0].expr)); }
-#line 2715 "parser.tab.c" /* yacc.c:1646 */
+#line 2779 "parser.tab.c" /* yacc.c:1646 */
break;
case 151:
-#line 682 "parser.y" /* yacc.c:1646 */
+#line 683 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_PREDEC, (yyvsp[0].expr)); }
-#line 2721 "parser.tab.c" /* yacc.c:1646 */
+#line 2785 "parser.tab.c" /* yacc.c:1646 */
break;
case 152:
-#line 683 "parser.y" /* yacc.c:1646 */
+#line 684 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_PLUS, (yyvsp[0].expr)); }
-#line 2727 "parser.tab.c" /* yacc.c:1646 */
+#line 2791 "parser.tab.c" /* yacc.c:1646 */
break;
case 153:
-#line 684 "parser.y" /* yacc.c:1646 */
+#line 685 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_MINUS, (yyvsp[0].expr)); }
-#line 2733 "parser.tab.c" /* yacc.c:1646 */
+#line 2797 "parser.tab.c" /* yacc.c:1646 */
break;
case 154:
-#line 685 "parser.y" /* yacc.c:1646 */
+#line 686 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_BITNEG, (yyvsp[0].expr)); }
-#line 2739 "parser.tab.c" /* yacc.c:1646 */
+#line 2803 "parser.tab.c" /* yacc.c:1646 */
break;
case 155:
-#line 686 "parser.y" /* yacc.c:1646 */
+#line 687 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_LOGNEG, (yyvsp[0].expr)); }
-#line 2745 "parser.tab.c" /* yacc.c:1646 */
+#line 2809 "parser.tab.c" /* yacc.c:1646 */
break;
case 156:
-#line 691 "parser.y" /* yacc.c:1646 */
+#line 692 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2751 "parser.tab.c" /* yacc.c:1646 */
+#line 2815 "parser.tab.c" /* yacc.c:1646 */
break;
case 157:
-#line 693 "parser.y" /* yacc.c:1646 */
+#line 694 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_POSTINC, (yyvsp[-1].expr)); }
-#line 2757 "parser.tab.c" /* yacc.c:1646 */
+#line 2821 "parser.tab.c" /* yacc.c:1646 */
break;
case 158:
-#line 695 "parser.y" /* yacc.c:1646 */
+#line 696 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_unary_expression(ctx, EXPR_POSTDEC, (yyvsp[-1].expr)); }
-#line 2763 "parser.tab.c" /* yacc.c:1646 */
+#line 2827 "parser.tab.c" /* yacc.c:1646 */
break;
case 159:
-#line 700 "parser.y" /* yacc.c:1646 */
+#line 701 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2769 "parser.tab.c" /* yacc.c:1646 */
+#line 2833 "parser.tab.c" /* yacc.c:1646 */
break;
case 160:
-#line 701 "parser.y" /* yacc.c:1646 */
+#line 702 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2775 "parser.tab.c" /* yacc.c:1646 */
+#line 2839 "parser.tab.c" /* yacc.c:1646 */
break;
case 161:
-#line 705 "parser.y" /* yacc.c:1646 */
+#line 706 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2781 "parser.tab.c" /* yacc.c:1646 */
+#line 2845 "parser.tab.c" /* yacc.c:1646 */
break;
case 162:
-#line 706 "parser.y" /* yacc.c:1646 */
+#line 707 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_new_expression(ctx, (yyvsp[0].expr), NULL); }
-#line 2787 "parser.tab.c" /* yacc.c:1646 */
+#line 2851 "parser.tab.c" /* yacc.c:1646 */
break;
case 163:
-#line 710 "parser.y" /* yacc.c:1646 */
+#line 711 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2793 "parser.tab.c" /* yacc.c:1646 */
+#line 2857 "parser.tab.c" /* yacc.c:1646 */
break;
case 164:
-#line 711 "parser.y" /* yacc.c:1646 */
+#line 712 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2799 "parser.tab.c" /* yacc.c:1646 */
+#line 2863 "parser.tab.c" /* yacc.c:1646 */
break;
case 165:
-#line 713 "parser.y" /* yacc.c:1646 */
+#line 714 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_ARRAY, (yyvsp[-3].expr),
(yyvsp[-1].expr)); }
-#line 2805 "parser.tab.c" /* yacc.c:1646 */
+#line 2869 "parser.tab.c" /* yacc.c:1646 */
break;
case 166:
-#line 715 "parser.y" /* yacc.c:1646 */
+#line 716 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_member_expression(ctx, (yyvsp[-2].expr), (yyvsp[0].identifier));
}
-#line 2811 "parser.tab.c" /* yacc.c:1646 */
+#line 2875 "parser.tab.c" /* yacc.c:1646 */
break;
case 167:
-#line 717 "parser.y" /* yacc.c:1646 */
+#line 718 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_new_expression(ctx, (yyvsp[-1].expr), (yyvsp[0].argument_list));
}
-#line 2817 "parser.tab.c" /* yacc.c:1646 */
+#line 2881 "parser.tab.c" /* yacc.c:1646 */
break;
case 168:
-#line 722 "parser.y" /* yacc.c:1646 */
+#line 723 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_call_expression(ctx, (yyvsp[-1].expr),
(yyvsp[0].argument_list)); }
-#line 2823 "parser.tab.c" /* yacc.c:1646 */
+#line 2887 "parser.tab.c" /* yacc.c:1646 */
break;
case 169:
-#line 724 "parser.y" /* yacc.c:1646 */
+#line 725 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_call_expression(ctx, (yyvsp[-1].expr),
(yyvsp[0].argument_list)); }
-#line 2829 "parser.tab.c" /* yacc.c:1646 */
+#line 2893 "parser.tab.c" /* yacc.c:1646 */
break;
case 170:
-#line 726 "parser.y" /* yacc.c:1646 */
+#line 727 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_binary_expression(ctx, EXPR_ARRAY, (yyvsp[-3].expr),
(yyvsp[-1].expr)); }
-#line 2835 "parser.tab.c" /* yacc.c:1646 */
+#line 2899 "parser.tab.c" /* yacc.c:1646 */
break;
case 171:
-#line 728 "parser.y" /* yacc.c:1646 */
+#line 729 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_member_expression(ctx, (yyvsp[-2].expr), (yyvsp[0].identifier));
}
-#line 2841 "parser.tab.c" /* yacc.c:1646 */
+#line 2905 "parser.tab.c" /* yacc.c:1646 */
break;
case 172:
-#line 732 "parser.y" /* yacc.c:1646 */
+#line 733 "parser.y" /* yacc.c:1646 */
{ (yyval.argument_list) = NULL; }
-#line 2847 "parser.tab.c" /* yacc.c:1646 */
+#line 2911 "parser.tab.c" /* yacc.c:1646 */
break;
case 173:
-#line 733 "parser.y" /* yacc.c:1646 */
+#line 734 "parser.y" /* yacc.c:1646 */
{ (yyval.argument_list) = (yyvsp[-1].argument_list); }
-#line 2853 "parser.tab.c" /* yacc.c:1646 */
+#line 2917 "parser.tab.c" /* yacc.c:1646 */
break;
case 174:
-#line 737 "parser.y" /* yacc.c:1646 */
+#line 738 "parser.y" /* yacc.c:1646 */
{ (yyval.argument_list) = new_argument_list(ctx, (yyvsp[0].expr)); }
-#line 2859 "parser.tab.c" /* yacc.c:1646 */
+#line 2923 "parser.tab.c" /* yacc.c:1646 */
break;
case 175:
-#line 739 "parser.y" /* yacc.c:1646 */
+#line 740 "parser.y" /* yacc.c:1646 */
{ (yyval.argument_list) = argument_list_add(ctx, (yyvsp[-2].argument_list),
(yyvsp[0].expr)); }
-#line 2865 "parser.tab.c" /* yacc.c:1646 */
+#line 2929 "parser.tab.c" /* yacc.c:1646 */
break;
case 176:
-#line 743 "parser.y" /* yacc.c:1646 */
+#line 744 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_expression(ctx, EXPR_THIS, 0); }
-#line 2871 "parser.tab.c" /* yacc.c:1646 */
+#line 2935 "parser.tab.c" /* yacc.c:1646 */
break;
case 177:
-#line 744 "parser.y" /* yacc.c:1646 */
+#line 745 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_identifier_expression(ctx, (yyvsp[0].identifier)); }
-#line 2877 "parser.tab.c" /* yacc.c:1646 */
+#line 2941 "parser.tab.c" /* yacc.c:1646 */
break;
case 178:
-#line 745 "parser.y" /* yacc.c:1646 */
+#line 746 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_literal_expression(ctx, (yyvsp[0].literal)); }
-#line 2883 "parser.tab.c" /* yacc.c:1646 */
+#line 2947 "parser.tab.c" /* yacc.c:1646 */
break;
case 179:
-#line 746 "parser.y" /* yacc.c:1646 */
+#line 747 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2889 "parser.tab.c" /* yacc.c:1646 */
+#line 2953 "parser.tab.c" /* yacc.c:1646 */
break;
case 180:
-#line 747 "parser.y" /* yacc.c:1646 */
+#line 748 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 2895 "parser.tab.c" /* yacc.c:1646 */
+#line 2959 "parser.tab.c" /* yacc.c:1646 */
break;
case 181:
-#line 748 "parser.y" /* yacc.c:1646 */
+#line 749 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = (yyvsp[-1].expr); }
-#line 2901 "parser.tab.c" /* yacc.c:1646 */
+#line 2965 "parser.tab.c" /* yacc.c:1646 */
break;
case 182:
-#line 752 "parser.y" /* yacc.c:1646 */
+#line 753 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_array_literal_expression(ctx, NULL, 0); }
-#line 2907 "parser.tab.c" /* yacc.c:1646 */
+#line 2971 "parser.tab.c" /* yacc.c:1646 */
break;
case 183:
-#line 753 "parser.y" /* yacc.c:1646 */
+#line 754 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_array_literal_expression(ctx, NULL, (yyvsp[-1].ival)+1); }
-#line 2913 "parser.tab.c" /* yacc.c:1646 */
+#line 2977 "parser.tab.c" /* yacc.c:1646 */
break;
case 184:
-#line 754 "parser.y" /* yacc.c:1646 */
+#line 755 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_array_literal_expression(ctx, (yyvsp[-1].element_list), 0); }
-#line 2919 "parser.tab.c" /* yacc.c:1646 */
+#line 2983 "parser.tab.c" /* yacc.c:1646 */
break;
case 185:
-#line 756 "parser.y" /* yacc.c:1646 */
+#line 757 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_array_literal_expression(ctx, (yyvsp[-3].element_list),
(yyvsp[-1].ival)+1); }
-#line 2925 "parser.tab.c" /* yacc.c:1646 */
+#line 2989 "parser.tab.c" /* yacc.c:1646 */
break;
case 186:
-#line 761 "parser.y" /* yacc.c:1646 */
+#line 762 "parser.y" /* yacc.c:1646 */
{ (yyval.element_list) = new_element_list(ctx, (yyvsp[-1].ival), (yyvsp[0].expr)); }
-#line 2931 "parser.tab.c" /* yacc.c:1646 */
+#line 2995 "parser.tab.c" /* yacc.c:1646 */
break;
case 187:
-#line 763 "parser.y" /* yacc.c:1646 */
+#line 764 "parser.y" /* yacc.c:1646 */
{ (yyval.element_list) = element_list_add(ctx, (yyvsp[-3].element_list),
(yyvsp[-1].ival), (yyvsp[0].expr)); }
-#line 2937 "parser.tab.c" /* yacc.c:1646 */
+#line 3001 "parser.tab.c" /* yacc.c:1646 */
break;
case 188:
-#line 767 "parser.y" /* yacc.c:1646 */
+#line 768 "parser.y" /* yacc.c:1646 */
{ (yyval.ival) = 1; }
-#line 2943 "parser.tab.c" /* yacc.c:1646 */
+#line 3007 "parser.tab.c" /* yacc.c:1646 */
break;
case 189:
-#line 768 "parser.y" /* yacc.c:1646 */
+#line 769 "parser.y" /* yacc.c:1646 */
{ (yyval.ival) = (yyvsp[-1].ival) + 1; }
-#line 2949 "parser.tab.c" /* yacc.c:1646 */
+#line 3013 "parser.tab.c" /* yacc.c:1646 */
break;
case 190:
-#line 772 "parser.y" /* yacc.c:1646 */
+#line 773 "parser.y" /* yacc.c:1646 */
{ (yyval.ival) = 0; }
-#line 2955 "parser.tab.c" /* yacc.c:1646 */
+#line 3019 "parser.tab.c" /* yacc.c:1646 */
break;
case 191:
-#line 773 "parser.y" /* yacc.c:1646 */
+#line 774 "parser.y" /* yacc.c:1646 */
{ (yyval.ival) = (yyvsp[0].ival); }
-#line 2961 "parser.tab.c" /* yacc.c:1646 */
+#line 3025 "parser.tab.c" /* yacc.c:1646 */
break;
case 192:
-#line 777 "parser.y" /* yacc.c:1646 */
+#line 778 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_prop_and_value_expression(ctx, NULL); }
-#line 2967 "parser.tab.c" /* yacc.c:1646 */
+#line 3031 "parser.tab.c" /* yacc.c:1646 */
break;
case 193:
-#line 779 "parser.y" /* yacc.c:1646 */
+#line 780 "parser.y" /* yacc.c:1646 */
{ (yyval.expr) = new_prop_and_value_expression(ctx, (yyvsp[-1].property_list)); }
-#line 2973 "parser.tab.c" /* yacc.c:1646 */
+#line 3037 "parser.tab.c" /* yacc.c:1646 */
break;
case 194:
-#line 784 "parser.y" /* yacc.c:1646 */
+#line 785 "parser.y" /* yacc.c:1646 */
{ (yyval.property_list) = new_property_list(ctx, (yyvsp[-2].literal),
(yyvsp[0].expr)); }
-#line 2979 "parser.tab.c" /* yacc.c:1646 */
+#line 3043 "parser.tab.c" /* yacc.c:1646 */
break;
case 195:
-#line 786 "parser.y" /* yacc.c:1646 */
+#line 787 "parser.y" /* yacc.c:1646 */
{ (yyval.property_list) = property_list_add(ctx, (yyvsp[-4].property_list),
(yyvsp[-2].literal), (yyvsp[0].expr)); }
-#line 2985 "parser.tab.c" /* yacc.c:1646 */
+#line 3049 "parser.tab.c" /* yacc.c:1646 */
break;
case 196:
-#line 790 "parser.y" /* yacc.c:1646 */
+#line 791 "parser.y" /* yacc.c:1646 */
{ (yyval.literal) = new_string_literal(ctx, (yyvsp[0].identifier)); }
-#line 2991 "parser.tab.c" /* yacc.c:1646 */
+#line 3055 "parser.tab.c" /* yacc.c:1646 */
break;
case 197:
-#line 791 "parser.y" /* yacc.c:1646 */
+#line 792 "parser.y" /* yacc.c:1646 */
{ (yyval.literal) = new_string_literal(ctx, (yyvsp[0].wstr)); }
-#line 2997 "parser.tab.c" /* yacc.c:1646 */
+#line 3061 "parser.tab.c" /* yacc.c:1646 */
break;
case 198:
-#line 792 "parser.y" /* yacc.c:1646 */
+#line 793 "parser.y" /* yacc.c:1646 */
{ (yyval.literal) = (yyvsp[0].literal); }
-#line 3003 "parser.tab.c" /* yacc.c:1646 */
+#line 3067 "parser.tab.c" /* yacc.c:1646 */
break;
case 199:
-#line 796 "parser.y" /* yacc.c:1646 */
+#line 797 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = NULL; }
-#line 3009 "parser.tab.c" /* yacc.c:1646 */
+#line 3073 "parser.tab.c" /* yacc.c:1646 */
break;
case 200:
-#line 797 "parser.y" /* yacc.c:1646 */
+#line 798 "parser.y" /* yacc.c:1646 */
{ (yyval.identifier) = (yyvsp[0].identifier); }
-#line 3015 "parser.tab.c" /* yacc.c:1646 */
+#line 3079 "parser.tab.c" /* yacc.c:1646 */
break;
case 201:
-#line 801 "parser.y" /* yacc.c:1646 */
- { (yyval.literal) = new_null_literal(ctx); }
-#line 3021 "parser.tab.c" /* yacc.c:1646 */
+#line 802 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3085 "parser.tab.c" /* yacc.c:1646 */
break;
case 202:
-#line 802 "parser.y" /* yacc.c:1646 */
- { (yyval.literal) = (yyvsp[0].literal); }
-#line 3027 "parser.tab.c" /* yacc.c:1646 */
+#line 804 "parser.y" /* yacc.c:1646 */
+ {
+ if(ctx->script->version < SCRIPTLANGUAGEVERSION_ES5) {
+ WARN("%s keyword used as an identifier in legacy mode.\n",
+ debugstr_w((yyvsp[0].identifier)));
+ YYABORT;
+ }
+ (yyval.identifier) = (yyvsp[0].identifier);
+ }
+#line 3098 "parser.tab.c" /* yacc.c:1646 */
break;
case 203:
-#line 803 "parser.y" /* yacc.c:1646 */
- { (yyval.literal) = (yyvsp[0].literal); }
-#line 3033 "parser.tab.c" /* yacc.c:1646 */
+#line 814 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3104 "parser.tab.c" /* yacc.c:1646 */
break;
case 204:
-#line 804 "parser.y" /* yacc.c:1646 */
- { (yyval.literal) = new_string_literal(ctx, (yyvsp[0].wstr)); }
-#line 3039 "parser.tab.c" /* yacc.c:1646 */
+#line 815 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3110 "parser.tab.c" /* yacc.c:1646 */
break;
case 205:
-#line 805 "parser.y" /* yacc.c:1646 */
- { (yyval.literal) = parse_regexp(ctx);
- if(!(yyval.literal)) YYABORT; }
-#line 3046 "parser.tab.c" /* yacc.c:1646 */
+#line 816 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3116 "parser.tab.c" /* yacc.c:1646 */
break;
case 206:
-#line 807 "parser.y" /* yacc.c:1646 */
- { (yyval.literal) = parse_regexp(ctx);
- if(!(yyval.literal)) YYABORT; }
-#line 3053 "parser.tab.c" /* yacc.c:1646 */
+#line 817 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3122 "parser.tab.c" /* yacc.c:1646 */
break;
case 207:
-#line 812 "parser.y" /* yacc.c:1646 */
- { (yyval.literal) = new_boolean_literal(ctx, VARIANT_TRUE); }
-#line 3059 "parser.tab.c" /* yacc.c:1646 */
+#line 818 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3128 "parser.tab.c" /* yacc.c:1646 */
break;
case 208:
-#line 813 "parser.y" /* yacc.c:1646 */
- { (yyval.literal) = new_boolean_literal(ctx, VARIANT_FALSE); }
-#line 3065 "parser.tab.c" /* yacc.c:1646 */
+#line 819 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3134 "parser.tab.c" /* yacc.c:1646 */
break;
case 209:
-#line 814 "parser.y" /* yacc.c:1646 */
- { (yyval.literal) = (yyvsp[0].literal); }
-#line 3071 "parser.tab.c" /* yacc.c:1646 */
+#line 820 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3140 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 210:
+#line 821 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3146 "parser.tab.c" /* yacc.c:1646 */
break;
case 211:
-#line 818 "parser.y" /* yacc.c:1646 */
- { if(!allow_auto_semicolon(ctx)) {YYABORT;} }
-#line 3077 "parser.tab.c" /* yacc.c:1646 */
+#line 822 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3152 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 212:
+#line 823 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3158 "parser.tab.c" /* yacc.c:1646 */
break;
case 213:
-#line 822 "parser.y" /* yacc.c:1646 */
- { set_error(ctx, JS_E_MISSING_LBRACKET); YYABORT; }
-#line 3083 "parser.tab.c" /* yacc.c:1646 */
+#line 824 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3164 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 214:
+#line 825 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3170 "parser.tab.c" /* yacc.c:1646 */
break;
case 215:
#line 826 "parser.y" /* yacc.c:1646 */
- { set_error(ctx, JS_E_MISSING_RBRACKET); YYABORT; }
-#line 3089 "parser.tab.c" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3176 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 216:
+#line 827 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3182 "parser.tab.c" /* yacc.c:1646 */
break;
case 217:
+#line 828 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3188 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 218:
+#line 829 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3194 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 219:
#line 830 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3200 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 220:
+#line 831 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3206 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 221:
+#line 832 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3212 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 222:
+#line 833 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3218 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 223:
+#line 834 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3224 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 224:
+#line 835 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3230 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 225:
+#line 836 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3236 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 226:
+#line 837 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3242 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 227:
+#line 838 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3248 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 228:
+#line 839 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3254 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 229:
+#line 840 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3260 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 230:
+#line 841 "parser.y" /* yacc.c:1646 */
+ { (yyval.identifier) = (yyvsp[0].identifier); }
+#line 3266 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 231:
+#line 845 "parser.y" /* yacc.c:1646 */
+ { (yyval.literal) = new_null_literal(ctx); }
+#line 3272 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 232:
+#line 846 "parser.y" /* yacc.c:1646 */
+ { (yyval.literal) = (yyvsp[0].literal); }
+#line 3278 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 233:
+#line 847 "parser.y" /* yacc.c:1646 */
+ { (yyval.literal) = (yyvsp[0].literal); }
+#line 3284 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 234:
+#line 848 "parser.y" /* yacc.c:1646 */
+ { (yyval.literal) = new_string_literal(ctx, (yyvsp[0].wstr)); }
+#line 3290 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 235:
+#line 849 "parser.y" /* yacc.c:1646 */
+ { (yyval.literal) = parse_regexp(ctx);
+ if(!(yyval.literal)) YYABORT; }
+#line 3297 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 236:
+#line 851 "parser.y" /* yacc.c:1646 */
+ { (yyval.literal) = parse_regexp(ctx);
+ if(!(yyval.literal)) YYABORT; }
+#line 3304 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 237:
+#line 856 "parser.y" /* yacc.c:1646 */
+ { (yyval.literal) = new_boolean_literal(ctx, VARIANT_TRUE); }
+#line 3310 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 238:
+#line 857 "parser.y" /* yacc.c:1646 */
+ { (yyval.literal) = new_boolean_literal(ctx, VARIANT_FALSE); }
+#line 3316 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 239:
+#line 858 "parser.y" /* yacc.c:1646 */
+ { (yyval.literal) = (yyvsp[0].literal); }
+#line 3322 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 241:
+#line 862 "parser.y" /* yacc.c:1646 */
+ { if(!allow_auto_semicolon(ctx)) {YYABORT;} }
+#line 3328 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 243:
+#line 866 "parser.y" /* yacc.c:1646 */
+ { set_error(ctx, JS_E_MISSING_LBRACKET); YYABORT; }
+#line 3334 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 245:
+#line 870 "parser.y" /* yacc.c:1646 */
+ { set_error(ctx, JS_E_MISSING_RBRACKET); YYABORT; }
+#line 3340 "parser.tab.c" /* yacc.c:1646 */
+ break;
+
+ case 247:
+#line 874 "parser.y" /* yacc.c:1646 */
{ set_error(ctx, JS_E_MISSING_SEMICOLON); YYABORT; }
-#line 3095 "parser.tab.c" /* yacc.c:1646 */
+#line 3346 "parser.tab.c" /* yacc.c:1646 */
break;
-#line 3099 "parser.tab.c" /* yacc.c:1646 */
+#line 3350 "parser.tab.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -3323,7 +3574,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 832 "parser.y" /* yacc.c:1906 */
+#line 876 "parser.y" /* yacc.c:1906 */
static BOOL allow_auto_semicolon(parser_ctx_t *ctx)
diff --git a/dll/win32/jscript/parser.tab.h b/dll/win32/jscript/parser.tab.h
index 096db230a2..181c030c8b 100644
--- a/dll/win32/jscript/parser.tab.h
+++ b/dll/win32/jscript/parser.tab.h
@@ -53,33 +53,33 @@ extern int parser_debug;
kDELETE = 263,
kDO = 264,
kELSE = 265,
- kIF = 266,
- kFINALLY = 267,
- kFOR = 268,
- kIN = 269,
- kINSTANCEOF = 270,
- kNEW = 271,
- kNULL = 272,
- kRETURN = 273,
- kSWITCH = 274,
- kTHIS = 275,
- kTHROW = 276,
- kTRUE = 277,
- kFALSE = 278,
- kTRY = 279,
- kTYPEOF = 280,
- kVAR = 281,
- kVOID = 282,
- kWHILE = 283,
- kWITH = 284,
- tANDAND = 285,
- tOROR = 286,
- tINC = 287,
- tDEC = 288,
- tHTMLCOMMENT = 289,
- kDIVEQ = 290,
- kDCOL = 291,
- kFUNCTION = 292,
+ kFUNCTION = 266,
+ kIF = 267,
+ kFINALLY = 268,
+ kFOR = 269,
+ kIN = 270,
+ kINSTANCEOF = 271,
+ kNEW = 272,
+ kNULL = 273,
+ kRETURN = 274,
+ kSWITCH = 275,
+ kTHIS = 276,
+ kTHROW = 277,
+ kTRUE = 278,
+ kFALSE = 279,
+ kTRY = 280,
+ kTYPEOF = 281,
+ kVAR = 282,
+ kVOID = 283,
+ kWHILE = 284,
+ kWITH = 285,
+ tANDAND = 286,
+ tOROR = 287,
+ tINC = 288,
+ tDEC = 289,
+ tHTMLCOMMENT = 290,
+ kDIVEQ = 291,
+ kDCOL = 292,
tIdentifier = 293,
tAssignOper = 294,
tEqOper = 295,
diff --git a/dll/win32/jscript/parser.y b/dll/win32/jscript/parser.y
index 59e67575fc..a40b813de1 100644
--- a/dll/win32/jscript/parser.y
+++ b/dll/win32/jscript/parser.y
@@ -164,11 +164,11 @@ static source_elements_t
*source_elements_add_statement(source_elements_t*,state
}
/* keywords */
-%token kBREAK kCASE kCATCH kCONTINUE kDEFAULT kDELETE kDO kELSE kIF kFINALLY kFOR kIN
-%token kINSTANCEOF kNEW kNULL kRETURN kSWITCH kTHIS kTHROW kTRUE kFALSE kTRY kTYPEOF kVAR
kVOID kWHILE kWITH
+%token <identifier> kBREAK kCASE kCATCH kCONTINUE kDEFAULT kDELETE kDO kELSE
kFUNCTION kIF kFINALLY kFOR kIN
+%token <identifier> kINSTANCEOF kNEW kNULL kRETURN kSWITCH kTHIS kTHROW kTRUE
kFALSE kTRY kTYPEOF kVAR kVOID kWHILE kWITH
%token tANDAND tOROR tINC tDEC tHTMLCOMMENT kDIVEQ kDCOL
-%token <srcptr> kFUNCTION '}'
+%token <srcptr> '}'
/* tokens */
%token <identifier> tIdentifier
@@ -241,6 +241,7 @@ static source_elements_t
*source_elements_add_statement(source_elements_t*,state
%type <literal> BooleanLiteral
%type <srcptr> KFunction
%type <ival> AssignOper
+%type <identifier> IdentifierName ReservedAsIdentifier
%nonassoc LOWER_THAN_ELSE
%nonassoc kELSE
@@ -272,7 +273,7 @@ FunctionExpression
{ $$ = new_function_expression(ctx, $4, $6, $9, $2, $1,
$10-$1+1); }
KFunction
- : kFUNCTION { $$ = $1; }
+ : kFUNCTION { $$ = ctx->ptr - 8; }
/* ECMA-262 3rd Edition 13 */
FunctionBody
@@ -711,7 +712,7 @@ MemberExpression
| FunctionExpression { $$ = $1; }
| MemberExpression '[' Expression ']'
{ $$ = new_binary_expression(ctx, EXPR_ARRAY, $1, $3); }
- | MemberExpression '.' tIdentifier
+ | MemberExpression '.' IdentifierName
{ $$ = new_member_expression(ctx, $1, $3); }
| kNEW MemberExpression Arguments
{ $$ = new_new_expression(ctx, $2, $3); }
@@ -724,7 +725,7 @@ CallExpression
{ $$ = new_call_expression(ctx, $1, $2); }
| CallExpression '[' Expression ']'
{ $$ = new_binary_expression(ctx, EXPR_ARRAY, $1, $3); }
- | CallExpression '.' tIdentifier
+ | CallExpression '.' IdentifierName
{ $$ = new_member_expression(ctx, $1, $3); }
/* ECMA-262 3rd Edition 11.2 */
@@ -787,7 +788,7 @@ PropertyNameAndValueList
/* ECMA-262 3rd Edition 11.1.5 */
PropertyName
- : tIdentifier { $$ = new_string_literal(ctx, $1); }
+ : IdentifierName { $$ = new_string_literal(ctx, $1); }
| tStringLiteral { $$ = new_string_literal(ctx, $1); }
| tNumericLiteral { $$ = $1; }
@@ -796,6 +797,49 @@ Identifier_opt
: /* empty*/ { $$ = NULL; }
| tIdentifier { $$ = $1; }
+/* ECMA-262 5.1 Edition 7.6 */
+IdentifierName
+ : tIdentifier { $$ = $1; }
+ | ReservedAsIdentifier
+ {
+ if(ctx->script->version < SCRIPTLANGUAGEVERSION_ES5) {
+ WARN("%s keyword used as an identifier in legacy mode.\n",
+ debugstr_w($1));
+ YYABORT;
+ }
+ $$ = $1;
+ }
+
+ReservedAsIdentifier
+ : kBREAK { $$ = $1; }
+ | kCASE { $$ = $1; }
+ | kCATCH { $$ = $1; }
+ | kCONTINUE { $$ = $1; }
+ | kDEFAULT { $$ = $1; }
+ | kDELETE { $$ = $1; }
+ | kDO { $$ = $1; }
+ | kELSE { $$ = $1; }
+ | kFALSE { $$ = $1; }
+ | kFINALLY { $$ = $1; }
+ | kFOR { $$ = $1; }
+ | kFUNCTION { $$ = $1; }
+ | kIF { $$ = $1; }
+ | kIN { $$ = $1; }
+ | kINSTANCEOF { $$ = $1; }
+ | kNEW { $$ = $1; }
+ | kNULL { $$ = $1; }
+ | kRETURN { $$ = $1; }
+ | kSWITCH { $$ = $1; }
+ | kTHIS { $$ = $1; }
+ | kTHROW { $$ = $1; }
+ | kTRUE { $$ = $1; }
+ | kTRY { $$ = $1; }
+ | kTYPEOF { $$ = $1; }
+ | kVAR { $$ = $1; }
+ | kVOID { $$ = $1; }
+ | kWHILE { $$ = $1; }
+ | kWITH { $$ = $1; }
+
/* ECMA-262 3rd Edition 7.8 */
Literal
: kNULL { $$ = new_null_literal(ctx); }
diff --git a/dll/win32/jscript/resource.h b/dll/win32/jscript/resource.h
index bb78ec19f0..dde1b13c59 100644
--- a/dll/win32/jscript/resource.h
+++ b/dll/win32/jscript/resource.h
@@ -65,3 +65,9 @@
#define IDS_PRECISION_OUT_OF_RANGE 0x13A3
#define IDS_INVALID_LENGTH 0x13A5
#define IDS_ARRAY_EXPECTED 0x13A7
+#define IDS_INVALID_WRITABLE_PROP_DESC 0x13AC
+#define IDS_NONCONFIGURABLE_REDEFINED 0x13D6
+#define IDS_NONWRITABLE_MODIFIED 0x13D7
+/* FIXME: This is not compatible with native, but we would
+ * conflict with IDS_UNSUPPORTED_ACTION otherwise */
+#define IDS_PROP_DESC_MISMATCH 0x1F00
diff --git a/dll/win32/jscript/string.c b/dll/win32/jscript/string.c
index ad978f245c..e6e4997e3e 100644
--- a/dll/win32/jscript/string.c
+++ b/dll/win32/jscript/string.c
@@ -63,6 +63,7 @@ static const WCHAR toLowerCaseW[] =
{'t','o','L','o','w','e','r','C','a','s','e'
static const WCHAR toUpperCaseW[] =
{'t','o','U','p','p','e','r','C','a','s','e',0};
static const WCHAR toLocaleLowerCaseW[] =
{'t','o','L','o','c','a','l','e','L','o','w','e','r','C','a','s','e',0};
static const WCHAR toLocaleUpperCaseW[] =
{'t','o','L','o','c','a','l','e','U','p','p','e','r','C','a','s','e',0};
+static const WCHAR trimW[] = {'t','r','i','m',0};
static const WCHAR localeCompareW[] =
{'l','o','c','a','l','e','C','o','m','p','a','r','e',0};
static const WCHAR fromCharCodeW[] =
{'f','r','o','m','C','h','a','r','C','o','d','e',0};
@@ -119,12 +120,6 @@ static HRESULT String_get_length(script_ctx_t *ctx, jsdisp_t *jsthis,
jsval_t *r
return S_OK;
}
-static HRESULT String_set_length(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t value)
-{
- FIXME("%p\n", jsthis);
- return E_NOTIMPL;
-}
-
static HRESULT stringobj_to_string(vdisp_t *jsthis, jsval_t *r)
{
StringInstance *string;
@@ -1471,6 +1466,41 @@ static HRESULT String_toLocaleUpperCase(script_ctx_t *ctx, vdisp_t
*jsthis, WORD
return E_NOTIMPL;
}
+static HRESULT String_trim(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned
argc,
+ jsval_t *argv, jsval_t *r)
+{
+ const WCHAR *str, *begin, *end;
+ jsstr_t *jsstr;
+ unsigned len;
+ HRESULT hres;
+
+ hres = to_flat_string(ctx, jsval_disp(jsthis->u.disp), &jsstr, &str);
+ if(FAILED(hres)) {
+ WARN("to_flat_string failed: %08x\n", hres);
+ return hres;
+ }
+ len = jsstr_length(jsstr);
+ TRACE("%s\n", debugstr_wn(str, len));
+
+ for(begin = str, end = str + len; begin < end && isspaceW(*begin);
begin++);
+ while(end > begin + 1 && isspaceW(*(end-1))) end--;
+
+ if(r) {
+ jsstr_t *ret;
+
+ if(begin == str && end == str + len)
+ ret = jsstr_addref(jsstr);
+ else
+ ret = jsstr_alloc_len(begin, end - begin);
+ if(ret)
+ *r = jsval_string(ret);
+ else
+ hres = E_OUTOFMEMORY;
+ }
+ jsstr_release(jsstr);
+ return hres;
+}
+
static HRESULT String_localeCompare(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
unsigned argc, jsval_t *argv,
jsval_t *r)
{
@@ -1539,7 +1569,7 @@ static const builtin_prop_t String_props[] = {
{indexOfW, String_indexOf, PROPF_METHOD|2},
{italicsW, String_italics, PROPF_METHOD},
{lastIndexOfW, String_lastIndexOf, PROPF_METHOD|2},
- {lengthW, NULL,0, String_get_length,
String_set_length},
+ {lengthW, NULL,0, String_get_length},
{linkW, String_link, PROPF_METHOD|1},
{localeCompareW, String_localeCompare, PROPF_METHOD|1},
{matchW, String_match, PROPF_METHOD|1},
@@ -1558,6 +1588,7 @@ static const builtin_prop_t String_props[] = {
{toLowerCaseW, String_toLowerCase, PROPF_METHOD},
{toStringW, String_toString, PROPF_METHOD},
{toUpperCaseW, String_toUpperCase, PROPF_METHOD},
+ {trimW, String_trim, PROPF_ES5|PROPF_METHOD},
{valueOfW, String_valueOf, PROPF_METHOD}
};
@@ -1571,7 +1602,7 @@ static const builtin_info_t String_info = {
};
static const builtin_prop_t StringInst_props[] = {
- {lengthW, NULL,0, String_get_length,
String_set_length}
+ {lengthW, NULL,0, String_get_length}
};
static const builtin_info_t StringInst_info = {
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 037d88371c..3db38f6dd3 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -85,7 +85,7 @@ reactos/dll/win32/inseng # Synced to WineStaging-3.3
reactos/dll/win32/iphlpapi # Out of sync
reactos/dll/win32/itircl # Synced to WineStaging-3.3
reactos/dll/win32/itss # Synced to WineStaging-3.9
-reactos/dll/win32/jscript # Synced to WineStaging-3.3
+reactos/dll/win32/jscript # Synced to WineStaging-3.9
reactos/dll/win32/jsproxy # Synced to WineStaging-3.3
reactos/dll/win32/loadperf # Synced to WineStaging-3.3
reactos/dll/win32/lz32 # Synced to WineStaging-3.3