mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 00:25:27 +00:00
d589083a1e
----- The patch changes NativeCall to use IdScriptable. This is done mostly for uniformity with other Native* classes plus it would allow to call NativeCall.init directly and make NativeCall package private. ----- The patch changes NativeScript to use id-based properties. Due to inheritance from NativeFunction, id support requires to take into account the fact that there are instance ids available from BaseFunction. This is the reason to use "int prototypeIdShift" instead of "boolean prototypeFlag" so it can store instance id offset. The patch updates ScriptRuntime.callOrNewSpecial to check against IdFunction and not FunctionObject for the Script exec method where it also add finally clause to make sure that Context.exit would always be called after Context.enter in the evalScript method. ----- After converting NativeScript and NativeFunction to use IdScriptable, they get scope argument directly as a parameter of execMethod call, so cx.ctorScope is not used any more. The patch removes code to set/unset cx.ctorScope. ----- [This patch depends on conversion of NativeScript and NativeCall to use IdScriptable and the patch to remove access of ctorScope from FunctionObject] The patch changes Context.initStandardObjects to call NativeCall.init and NativeScript.init directly plus it unrolls the lazily initialization loop. Due to rather poor support of an array initialization in Java byte code, it actually decreases code size while eliminating are creation of array object. The patch also removes ctorScope field as unused. ----- The patch makes sure that ids used by NativeGlobal are visible only in the object instance that initializes global scope and removes some junk white space at line ends. ----- To use the idswitch tool to generate map for strings that can not be part of Id_ Java identifier like $*, I added code to the tool to look for "// #string=...#" in the id definition line. The attached README file also contains some documentation about the tool and should go to idswitch directory. The patch was made from toolsrc/org/mozilla/javascript/tools via: cvs diff -u > idswitch_patch |
||
---|---|---|
.. | ||
benchmarks | ||
js2 | ||
jsd | ||
jsdj | ||
jsj | ||
macbuild | ||
ref | ||
rhino | ||
semantics | ||
src | ||
tests | ||
.cvsignore | ||
landbranch.pl | ||
Makefile.in | ||
makefile.win |