gecko-dev/js/rhino/docs/changes.html

153 строки
7.1 KiB
HTML
Исходник Обычный вид История

2003-01-17 19:40:45 +03:00
<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
2004-08-03 21:13:40 +04:00
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Author" content="Igor Bukanov">
<meta name="KeyWords" content="Rhino, JavaScript, Java">
<title>Change Log</title>
<style>
P { text-align: justify; }
</style>
2003-01-17 19:40:45 +03:00
</head>
2002-06-10 21:44:44 +04:00
<body bgcolor="#ffffff">
2002-12-13 17:21:38 +03:00
<h1 align="center">
2004-08-03 21:13:40 +04:00
Change Log for Rhino</h1>
2004-10-22 17:34:44 +04:00
<h2>Rhino 1.6R1 Release Candidate 3</h2>
2004-08-03 21:13:40 +04:00
<h3>Release overview</h3>
<p>
2004-08-25 23:26:56 +04:00
Rhino 1.6R1 is the new major release of Rhino. It supports ECMAScript for XML (E4X) as specified by <a href="http://www.ecma-international.org/publications/standards/Ecma-357.htm">ECMA 357</a> standard. E4X is a set of language extensions adding native XML support for JavaScript without affecting the existing code base. <a href="http://lxr.mozilla.org/mozilla/source/js/rhino/examples/E4X/e4x_example.js">E4X example</a> demonstrates various E4X constructions and their usage in JavaScript code.
2004-08-03 21:13:40 +04:00
</p>
<p>
This version of Rhino should be binary compatible with the current embeddings that use only public <a href="apidocs/index.html">API</a> unless the code use the previously deperected classes as documented <a href="#Rhino1.5R1-deprecation-removal">below</a>. Please report any incompatibilitiy issues to <a href="http://bugzilla.mozilla.org/enter_bug.cgi?product=Rhino">Bugzilla</a>.
</p>
</h3>
<h3>E4X implementation</h3>
<p>
2004-08-16 18:19:44 +04:00
The E4X code was donated to the Rhino project by <a href="http://www.bea.com/">BEA</a> and developed by staff from <a href="http://www.bea.com/">BEA</a> and <a href="http://www.agiledelta.com/">AgileDelta</a>.
</p>
<p>
It uses <a href="http://xmlbeans.apache.org/">XMLBeans</a> library to implement E4X runtime. The implementation was tested against versions 1.0.2 and 1.0.3 of XMLBeans. Please make sure that <tt>xbean.jar</tt> is avaialble on the classpath if you use E4X in your scripts.
2004-08-03 21:13:40 +04:00
</p>
<p>
2004-11-19 16:01:16 +03:00
See <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=242805">Bugzilla 242805</a> for details. See also <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=270779">Bugzilla 270779</a>
for the list of known issues with E4X implementation in Rhino 1.6R1.
2004-08-03 21:13:40 +04:00
</p>
<h3>Other changes</h3>
2002-12-13 17:21:38 +03:00
2004-08-03 21:13:40 +04:00
<h4>Common root for Rhino execeptions</h4>
<p>
Now all Rhino execption classes are derived from <a href="apidocs/org/mozilla/javascript/RhinoException.html"><tt>org.mozilla.javascript.RhinoException</tt></a> which extends <tt>java.lang.RuntimeException</tt>.
The class gives the uniform way to access information about the script origin of the exception and simplifies execption handling in Rhino embeddings.
</p>
<p>
See <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=244492">Bugzilla 244492</a> for details.
</p>
2004-02-12 21:13:00 +03:00
<h4>Removal of code complexity limits in the interpreter</h4>
2004-08-03 21:13:40 +04:00
<p>
The interpreter mode in Rhino does not limit any longer the script size or code complexity. It should be possible to execute any script as long as JVM resources allow so.
</p>
<p>
2004-08-21 03:01:28 +04:00
See <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=244014">Bugzilla 244014</a> and <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=256339">Bugzilla 256339</a> for details.
2004-08-03 21:13:40 +04:00
</p>
<h4>Tail call elimination in the interpreter</h4>
<p>
The interpreter mode in Rhino implements tail call elimination to avoid excessive stack space consumption when a function returns result of a call to another function.
</p>
<p>
See <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=257128">Bugzilla 257128</a>.
</p>
<h4>Support for continuations in the interpreter</h4>
<p>
2004-10-22 17:34:44 +04:00
The interpreter mode in Rhino supports continuations. The code is based on the ideas from the original implementation of continuations by Christopher Oliver and
<a href="http://sisc.sourceforge.net/">SISC</a> project. To use the
continuations make sure that the interpreter mode is selected through <a
href="apidocs/org/mozilla/javascript/Context.html#setOptimizationLevel(int)">setting</a>
the optimization level to -1 or by adding <tt>-opt -1</tt> to the command line
of <a href="shell.html">Rhino shell</a>.
</p>
<p>
Please note that the details of implementation and Java and JavaScript API for continuations may change in future in incompatible way.
</p>
<p>
See <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=258844">Bugzilla 258844</a>.
</p>
2004-08-14 19:17:40 +04:00
<h4>JavaImporter constructor</h4>
2004-08-03 21:13:40 +04:00
<p>
<tt>JavaImporter</tt> is a new global constructor that allows to omit explicit package names when scripting Java:
</p>
<pre>
var SwingGui = JavaImporter(Packages.javax.swing,
Packages.javax.swing.event,
Packages.javax.swing.border,
java.awt.event,
java.awt.Point,
java.awt.Rectangle,
java.awt.Dimension);
...
with (SwingGui) {
var mybutton = new JButton(test);
var mypoint = new Point(10, 10);
var myframe = new JFrame();
...
}
</pre>
<p>
2004-10-22 17:34:44 +04:00
Previously such functionality was available only to embeddings that used <a href="apidocs/org/mozilla/javascript/ImporterTopLevel.html"><tt>org.mozilla.javascript.ImporterTopLevel</tt></a> class as the top level scope. The class provides additional <tt>importPackage()</tt> and <tt>importClass()</tt> global functions for scripts but their extensive usage has tendency to pollute the global name space with names of Java classes and prevents loaded classes from garbage collection.
2004-08-03 21:13:40 +04:00
</p>
<p>
See <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=245882">Bugzilla 245882</a> for details.
</p>
2004-08-14 19:17:40 +04:00
<h4>Context customization API</h4>
2004-08-15 13:05:30 +04:00
<a href="apidocs/org/mozilla/javascript/ContextFactory.html"><tt>org.mozilla.javascript.ContextFactory</tt></a> provides new API for customization of <tt>org.mozilla.javascript.Context</tt> and ensures that application-specific Context subclasses will always be used when Rhino runtime needs to create Context instances.
2004-08-14 19:17:40 +04:00
</p>
<p>
See <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=255595">Bugzilla 245882</a> for details.
</p>
2004-08-03 21:13:40 +04:00
2004-08-14 19:17:40 +04:00
<h4>Support for Date.now()</h4>
2004-04-14 15:04:55 +04:00
<p>
2004-08-06 20:05:40 +04:00
<tt>Date.now()</tt> function which is a SpiderMonkey extension to ECMAScript standard is available now in Rhino. The function returns number of milliseconds passed since 1970-01-01 00:00:00 UTC.
2004-04-14 15:04:55 +04:00
</p>
2002-12-24 04:34:45 +03:00
2004-08-03 21:13:40 +04:00
2004-08-15 13:05:30 +04:00
<h4><a name="Rhino1.5R1-deprecation-removal"></a>Removal of deprecated classes</h4>
2004-08-03 21:13:40 +04:00
<p>
The following classes that were deprecated in Rhino 1.5R5 are no longer available in Rhino 1.6R1:
<ul>
<li><tt>org.mozilla.javascript.ClassNameHelper</tt></li>
<li><tt>org.mozilla.javascript.ClassRepository</tt></li>
</ul>
See documentation for <a href="apidocs/org/mozilla/javascript/optimizer/ClassCompiler.html"><tt>org.mozilla.javascript.optimizer.ClassCompiler</tt></a> that provides replacement for ClassNameHelper and ClassRepository.
2004-08-03 21:13:40 +04:00
</p>
<h2>Change logs for previous Rhino releases</h2>
<ul>
<li><a href="rhino15R5.html">Rhino 1.5R5</a></li>
<li><a href="rhino15R41.html">Rhino 1.5R4.1</a></li>
<li><a href="rhino15R4.html">Rhino 1.5R4</a></li>
<li><a href="rhino15R3.html">Rhino 1.5R3</a></li>
<li><a href="rhino15R2.html">Rhino 1.5R2</a></li>
<li><a href="rhino15R1.html">Rhino 1.5R1</a></li>
</ul>
2002-06-10 21:44:44 +04:00
<hr width="100%"><br>
<a href="index.html">back to top</a></h3>
2002-12-13 17:21:38 +03:00
</body></html>