with JSRESOLVE_ASSIGNING, wrongly), plus a few miscellaneous bugfixes.
- Combine the JSStackFrame members constructing, special, overrides, and
reserved into a uint32 flags member.
- Separate JOF_ASSIGNING from the JOF_SET bytecode format flag, and impute
JSRESOLVE_ASSIGNING from the presence of JOF_ASSIGNING among the current
opcode's format flags. To handle the for-in loop opcodes, which do more
than simply assign -- in particular, they do property lookups whose resolve
hook outcalls should not be flagged with JSRESOLVE_ASSIGNING -- a new frame
flag, JSFRAME_ASSIGNING, has been added.
- Fix interpreter version selection to respect JS_SetVersion, whose effect on
cx->version is "sticky".
- Fix js_DecompileValueGenerator to deal with JSOP_ENUMELEM -- it never had,
as this testcase shows (it crashes without this patch):
version(120);
eval("function fe(s) { for (it[s] in this); }");
try { fe('rdonly'); } catch (e) { print(e); }
git-svn-id: svn://10.0.0.236/trunk@104525 18797224-902f-48f8-a5cc-f745e15eee43
- Tabs expanded as much as I could stand, without taking too much cvsblame.
git-svn-id: svn://10.0.0.236/trunk@59716 18797224-902f-48f8-a5cc-f745e15eee43
Courtesy Bill Gibbons <bill@gibbons.org>
His comments:
Here are the changes to JSRef to make it compile either as C or C++. Mostly the changes are to add missing casts (since C++ doesn't have implict conversion from void* to other pointer types nor implicit casts from ints to enumerations) plus a few random things like the use of "private" as a variable name.
There are a few other minor bug fixes; in particular:
* A long statement with and'ed conditions is reformatted to make it easier to remove other builtin objects (e.g. Date).
* A #if was added to jsscript.c for the JS_HAS_SCRIPT_OBJECT off case.
* In jsmath a #ifdef was changed to #if.
My notes also mention...
* jsobj.c should include jsopcode.h
* jsfun.c - doesn't link if JS_HAS_ARGS_OBJECT is off
* jsarray.c - a reference to js_ValueToSource should be conditional on JS_HAS_TOSOURCE
r=mccabe
git-svn-id: svn://10.0.0.236/trunk@59455 18797224-902f-48f8-a5cc-f745e15eee43
and propertyIsEnumerable) for JS1.5.
- Optimize obj_propertyIsEnumerable to avoid extra lookup code bloat, requiring
fix to js_GetAttributes (unset out param on successful early retunr) that it
exposed.
- Use more righteous else-if style in shaver's jsarray.c change.
git-svn-id: svn://10.0.0.236/trunk@48796 18797224-902f-48f8-a5cc-f745e15eee43
hierarchy and names etc. Added attempt to make the base exceptions be
instanceof equal across contexts.
git-svn-id: svn://10.0.0.236/trunk@48586 18797224-902f-48f8-a5cc-f745e15eee43
"external" calls compiled from scripts, which have stack budget depth slots
under the return value slot for the call expression's generating pc.
- New internalCall packed boolean flag in JSStackFrame to distinguish callers
of js_InternalCall so the generating pc isn't mistakenly stored depth slots
below stack space allocated on-the-fly for internal call args/rval.
- Fixed bugzilla bug 8042, finally by storing the call expression's generating
pc -- but only for external calls.
- Whitespace policing, gratuitous parenthesization reduction, etc.
git-svn-id: svn://10.0.0.236/trunk@36986 18797224-902f-48f8-a5cc-f745e15eee43
Incorporated changes from JS_STABLE_DROP_04261999 to JS_STABLE_DROP_06221999
git-svn-id: svn://10.0.0.236/trunk@36563 18797224-902f-48f8-a5cc-f745e15eee43
+ merging of js/src and js/ref
+ elimination of most dependencies on NSPR
+ JS1.4 feature additions and accumulated bug fixes
More details are in last week's mozilla status report.
git-svn-id: svn://10.0.0.236/trunk@12797 18797224-902f-48f8-a5cc-f745e15eee43
and development branches, including but
not limited to:
- Preliminary exception handling per
ECMA proposal; try, multiple
catchblocks, and finally. Catchblocks
are of the form catch (v) or
catch(v:<guard>), where guard is an
optional boolean expression that is
evaluated to determine whether the
exception is to be caught by that block.
- ECMA-proposed 'in' operator; "'foo' in
o" or "4 in o" asks if o has property
foo or element 4.
- Added a new set of defines in
jsconfig.h for js 1.4
features-in-progress. (in, instanceof,
exception handling.) Default build
version is now 1.4. Fixed a few
conditional features that had become
broken.
- Progress towards porting to FreeBSD
and Alpha; casts of NaN and friends to
int are a little more localized. Not
there yet...
- New config files to compile on more
OSes; various fixes to improve
portability.
git-svn-id: svn://10.0.0.236/trunk@6907 18797224-902f-48f8-a5cc-f745e15eee43
and tested in that release):
#114564: Fix JS_Enumerate to return an empty id array instead of null
#115395: Fix JS garbage collection
#115200: Security dialog no longer blows assertion
#123211: Make sure output of sort array function is -1, 0, or 1.
#116195: Fix ImportProperty(), cope with an existing local variable
of the same name as the imported property
Unbusticate JS_invoke() so that closures work again
#115384,#115395: Handle bugs in toSource that strike when
getProperty is non-idempotent. Fix crash during JavaScript
garbage collection after enumerating object properties.
#??????: mjudge - Win16 files to make ptrdiff_t be 32 bits on Win16
git-svn-id: svn://10.0.0.236/trunk@3573 18797224-902f-48f8-a5cc-f745e15eee43
js> a = new Array()
js> a["3.00"] = "three"
three
js> a.length
4
Since "3.00" is not an array index as defined by ECMA, a.length should be 0.
git-svn-id: svn://10.0.0.236/trunk@3539 18797224-902f-48f8-a5cc-f745e15eee43
Array.prototype.sort(comparefn) was casting the result of the compare
to an int, which lost when the compare function returned (ecma-valid)
strange double values. These now get clamped to -1, 0, 1.
git-svn-id: svn://10.0.0.236/trunk@1570 18797224-902f-48f8-a5cc-f745e15eee43