effect of ECMA-357, specifically x.namespaceDeclarations() should not include
the default namespace inherited from the <parent> tag wrapped around a string
argument "<x>...</x>" by ToXML, whereas x.inScopeNamespaces() should.
This case implies errata against 10.3.1, 10.4.1, and 13.4.4.24 (at least).
- Consolidate common code in an XMLArrayInsert function, renaming the misnamed
precursor to XMLArrayAddMember. XMLArrayInsert properly notifies any cursors
iterating over the array, fixing for/in and for-each/in bugs such as this:
var l = <><a/><c/><d/></>;
var i = 0;
for each (var x in l) {
print(x.toXMLString());
if (i == 1) l[0] += <b/>;
i++;
}
- Fix the bug induced by this erratum from ECMA-357:
9.2.1.2 step 2(c)(ii) sets _y.[[Parent]] = r_ where _r_ is the result of
[[ResolveValue]] called on _x.[[TargetObject]] in 2(a)(i). This can
result in text parenting text:
var MYXML = new XML();
MYXML.appendChild(new XML("<TEAM>Giants</TEAM>"));
(testcase from Werner Sharp <wsharp@macromedia.com>).
To match insertChildAfter, insertChildBefore, prependChild, and
setChildren, we should silently do nothing in this case.
- Fix PN2X_OUTERMOST not to overlay XSF_CACHE_VALID, causing it to appear to be
set when cx->xmlSettingFlags were "translated" into ParseNodeToXML flags. To
avoid further such stupidity, consolidated all similar flags into XSF_* bits
and eliminated the PN2X_* duals.
- Redo the way the default namespace is inherited by parsed XML from the
<parent> tag under ToXML and ToXMLList, and implicitly inherited in the
js_ParseNodeToXMLObject alternative path to ToXML.
- Handle null prefix (meaning undefined in ECMA-357, that is, no prefix was
passed to the Namespace constructor) and empty prefix (which is normalized
from null for the empty URI "no namespace" case) better in the parsing and
ToXMLString code.
- Fixed a bug in PutProperty where it implements 9.2.1.2 2(c)(vii)(1) (whew!).
Fixed another bug near that which stupidly assumed all XML nodes have names,
leading to an obvious null pointer crash.
This should be the final round of work for bug 246411. With the appropriate
testsuite patches, this passes all tests except e4x/Regress/regress-264369.js
(which probably should be invalidated by a correction to the ECMA-357 spec).
Rhino never claimed to support binary compatibility in the serialized objects and it is better to use the system generated ids always to catch errors about incompatible changes ASAP.
1. IdScriptableObject.maxInstanceId is replaced by overridden getMaxInstanceId()
2. BaseFunction.argumentsProperty is replaced by storing when necessary explicit "arguments" property in ScriptableObject hashmap.
3. NativeFunction.(argNames|argCount|version) is replaced by code that reconstruct the necessary values from embedded in class file or InterpreterData (see bug 264637)
-------- Original Message --------
Subject: RE: www.mozilla.org/rhino: NPL license Messages_fr.properties?
Date: Fri, 8 Oct 2004 13:52:39 -0400
From: Aresteanu, Eugene <eugenea@avivasolutions.com>
To: 'Igor Bukanov' <igor@fastmail.fm>
Hi Igor,
Yes, I agree,
Eugene Aresteanu
Do you agree to change the license as expressed in the license header
for the file:
mozilla/js/rhino/src/org/mozilla/javascript/resources/Messages_fr.properties
located at cvs.mozilla.org:/cvsroot to the following text:
#
# French JavaScript messages file.
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is Aviva Inc. code, released March 5, 2004.
#
# The Initial Developer of the Original Code is Aviva Inc.
# Portions created by Aviva Inc. are Copyright (C) 2004 Aviva Inc.
# All Rights Reserved.
#
# Contributor(s):
# Eugene Aresteanu
#
# Alternatively, the contents of this file may be used under the
# terms of the GNU Public License (the "GPL"), in which case the
# provisions of the GPL are applicable instead of those above.
# If you wish to allow use of your version of this file only
# under the terms of the GPL and not to allow others to use your
# version of this file under the NPL, indicate your decision by
# deleting the provisions above and replace them with the notice
# and other provisions required by the GPL. If you do not delete
# the provisions above, a recipient may use your version of this
# file under either the NPL or the GPL.
The change shall apply only to CVS HEAD version of the file.
-------- Original Message --------
Subject: Re: www.mozilla.org/rhino: Changing the license for Delegator
Date: Fri, 08 Oct 2004 16:08:01 +0100
From: Matthias Radestock <matthias@sorted.org>
To: Igor Bukanov <igor@fastmail.fm>
References: <41668055.2050404@fastmail.fm> <4166830A.3010900@sorted.org> <4166AD80.6070806@fastmail.fm>
Igor Bukanov wrote:
> Thanks, I would like to change the license header from the current:
>
> /* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset:
> 4 -*-
> * The contents of this file are subject to the Mozilla Public License
> * Version 1.1 (the "License"); you may not use this file except in
> * compliance with the License. You may obtain a copy of the License at
> * http://www.mozilla.org/MPL/
> *
> * Software distributed under the License is distributed on an "AS IS"
> * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
> * License for the specific language governing rights and limitations
> * under the License.
> *
> * The Original Code is Delegator.java, released Sep 27, 2000.
> *
> * The Initial Developer of the Original Code is Matthias Radestock.
> * <matthias@sorted.org>. Portions created by Matthias Radestock are
> * Copyright (C) 2000 Matthias Radestock. All Rights Reserved.
> *
> * Contributor(s):
> * Redfig Ltd (http://www.redfig.com)
> * LShift Ltd (http://www.lshift.net)
> *
> * Alternatively, the contents of this file may be used under the terms
> * of the GNU Public License (the "GPL License"), in which case the
> * provisions of the GPL License are applicable instead of those
> * above. If you wish to allow use of your version of this file only
> * under the terms of the GPL License and not to allow others to use
> * your version of this file under the MPL, indicate your decision by
> * deleting the provisions above and replace them with the notice and
> * other provisions required by the GPL License. If you do not delete
> * the provisions above, a recipient may use your version of this file
> * under either the MPL or the GPL License.
> */
>
>
> to the following one:
>
>
> /* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset:
> 4 -*-
> *
> * The contents of this file are subject to the Netscape Public
> * License Version 1.1 (the "License"); you may not use this file
> * except in compliance with the License. You may obtain a copy of
> * the License at http://www.mozilla.org/NPL/
> *
> * Software distributed under the License is distributed on an "AS
> * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
> * implied. See the License for the specific language governing
> * rights and limitations under the License.
> *
> * The Original Code is Delegator.java, released Sep 27, 2000.
> *
> * The Initial Developer of the Original Code is Matthias Radestock.
> * <matthias@sorted.org>. Portions created by Matthias Radestock are
> * Copyright (C) 2000 Matthias Radestock. All Rights Reserved.
> *
> * Contributor(s):
> *
> * Matthias Radestock, Redfig Ltd (http://www.redfig.com)
> * Matthias Radestock, LShift Ltd (http://www.lshift.net)
> *
> * Alternatively, the contents of this file may be used under the
> * terms of the GNU Public License (the "GPL"), in which case the
> * provisions of the GPL are applicable instead of those above.
> * If you wish to allow use of your version of this file only
> * under the terms of the GPL and not to allow others to use your
> * version of this file under the NPL, indicate your decision by
> * deleting the provisions above and replace them with the notice
> * and other provisions required by the GPL. If you do not delete
> * the provisions above, a recipient may use your version of this
> * file under either the NPL or the GPL.
> */
>
>
>
> Note that the new version replaces:
>
> * Contributor(s):
> * Redfig Ltd (http://www.redfig.com)
> * LShift Ltd (http://www.lshift.net)
>
> by the following text:
>
> * Contributor(s):
> *
> * Matthias Radestock, Redfig Ltd (http://www.redfig.com)
> * Matthias Radestock, LShift Ltd (http://www.lshift.net)
>
> since Contributors section should contain at lease the name of the
> person contributing.
>
> If it is Ok, then I need your authorisation to perform such license
> change for the following files:
>
> mozilla/js/rhino/src/org/mozilla/javascript/Delegator.java
> mozilla/js/rhino/src/org/mozilla/javascript/.java
>
> located at the CVS repository at cvs.mozilla.org:/cvsroot
>
> The license change shall apply only to the CVS HEAD version of the files.
>
Igor,
that's all fine. Go ahead and make the changes.
Matthias.
References now are represented by the pairs (ref, ref_target) where ref is Ref (former Reference) instance and ref_target is Scriptable to apply the reference for.
To return the pair from Reference creation function Context.scratchRefTarget is used to store the target part.
This change allowed to extend XMLName from Ref eliminating the need for XMLReference.
I changes just added toObject(Contetx cx, Object obj) to
toObjectOrNull(Contetx cx, Object obj) which returns null when obj is undefined
or null. It forces the caller to check to the return status but then much
better error report can be generated since the caller knows the operation that was called upon the undefined or null value.
To implement the function call redirection functionality XMLObject.getExtraMethodSource is added() to return an additional object to use as method source.
List of the affected files:
mozilla/js/rhino/src/org/mozilla/javascript/Callable.java
mozilla/js/rhino/src/org/mozilla/javascript/ClassCache.java
mozilla/js/rhino/src/org/mozilla/javascript/CompilerEnvirons.java
mozilla/js/rhino/src/org/mozilla/javascript/ContextAction.java
mozilla/js/rhino/src/org/mozilla/javascript/ContextFactory.java
mozilla/js/rhino/src/org/mozilla/javascript/Kit.java
mozilla/js/rhino/src/org/mozilla/javascript/Reference.java
mozilla/js/rhino/src/org/mozilla/javascript/SpecialRef.java
mozilla/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/GuiCallback.java
mozilla/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/test.js
mozilla/js/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLReference.java
Please contact igor@runitsoft.com if you have any questions about this.
Signatures in Reference are changed to include Context and reference-related methods in ScriptRuntime accept/return explicit Reference type instead of generic Object as code generation ensure proper type.
2. x..y use explicit reference instead of special descendants mark XMLName:
In this way less code is necessary to support x..y operations and support for .. in non-xml objects is possible.
to check for strict mode.
2. Fix name lokup bug in XMLReference that caused in cases like
foo.(@bar == 'something') to throw runtime exception if bar attribute
does not exist in foo.
perform type conversion checks for methods that do return proper JS type the
type check is done only once in the constructor and if necessary a flag is set
to call WrapFaactory.wrap on method return.
2. Use linked list of read-only REPogState to implement state stack instead of array of struct. It fixes bug 258417 while making creation of back track stack data much cheaper since there is no need to copy read-only structures.