Bug 356248: incorrect decompilation for object literal with named getter function; property and function names are mashed together, r=brendan

This commit is contained in:
crowder%fiverocks.com 2007-04-14 00:13:02 +00:00
Родитель f0482e54d9
Коммит aff4d55f08
1 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -3927,11 +3927,8 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb)
#else
if (lastop == JSOP_GETTER || lastop == JSOP_SETTER) {
if (strncmp(rval, js_function_str, 8) || rval[8] != ' ') {
todo = Sprint(&ss->sprinter, "%s%s%s%s%s:%s", lval,
todo = Sprint(&ss->sprinter, "%s%s%s %s:%s", lval,
(lval[1] != '\0') ? ", " : "", xval,
(lastop == JSOP_GETTER ||
lastop == JSOP_SETTER)
? " " : "",
(lastop == JSOP_GETTER) ? js_getter_str :
(lastop == JSOP_SETTER) ? js_setter_str :
"",
@ -3939,12 +3936,13 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb)
} else {
rval += 8 + 1;
LOCAL_ASSERT(rval[strlen(rval)-1] == '}');
todo = Sprint(&ss->sprinter, "%s%s%s %s%s",
todo = Sprint(&ss->sprinter, "%s%s%s %s%s%s",
lval,
(lval[1] != '\0') ? ", " : "",
(lastop == JSOP_GETTER)
? js_get_str : js_set_str,
xval,
(rval[0] != '(') ? " " : "",
rval);
}
} else {