Граф коммитов

51 Коммитов

Автор SHA1 Сообщение Дата
inonit%inonit.com 56ee789777 Improve/fix building optional E4X components, see also bug 367707 2007-02-08 15:55:14 +00:00
inonit%inonit.com f58f17e951 Fix XMLBeans out-of-the-box build problems 2007-02-08 01:05:26 +00:00
inonit%inonit.com 77d7578bbe Fix for bug 369536 (assignment to index of target property of XMLList overwrites attributes) 2007-02-07 22:14:33 +00:00
inonit%inonit.com 465ce47fd5 Fix bug 291930 (XML constructor called with comment followed by element) 2007-02-07 15:22:10 +00:00
inonit%inonit.com c860d361f4 Fix bug 288027 (XMLList not instanceof XML) 2007-02-06 23:00:00 +00:00
inonit%inonit.com 9f5a512ccb Fix license boilerplate on recent commits 2007-02-06 17:48:46 +00:00
inonit%inonit.com 308b2125a4 Don't rely on JAXP for ignoring comments (semantics are slightly different than E4X, or JRE parser has a bug, not sure which) 2007-02-05 19:08:07 +00:00
inonit%inonit.com 7f4ae43b95 Fix infinite-loop condition with >1 generated namespace prefix 2007-02-05 17:32:09 +00:00
inonit%inonit.com e715c1df49 Implement E4X without Apache XMLBeans, fix bug #355677 2007-02-05 15:24:52 +00:00
gerv%gerv.net fa75652059 Bug 236108 - changing licence from NPL/GPL to MPL/GPL to help the Apache people. The bug in question also suggests an eventual switch to MIT; that may come later. 2006-11-10 15:27:40 +00:00
szegedia%freemail.hu 16eebdc909 Dead code cleanup 2006-08-07 15:24:00 +00:00
szegedia%freemail.hu 0b48213442 Fix for #343021 2006-07-12 09:28:57 +00:00
szegedia%freemail.hu 885b8b4e97 Fix for #314163 "E4X XML object constructed from an XML Beans XmlObject is not consistent with a literal (inline) E4X XML object" 2006-07-11 12:52:35 +00:00
szegedia%freemail.hu 9bcf511fc6 Fix for #340682 2006-06-08 07:19:24 +00:00
szegedia%freemail.hu c157a1c4fd Bugfix for #335992 2006-05-28 17:19:33 +00:00
igor%mir2.org 1f38a6f8fc Fixing bug #306825: now shell.Global can be used as scope objects in servlets 2005-09-02 14:18:40 +00:00
igor%mir2.org 7a2481f9bd Implementing bug 306419: I added missed serialVersionUID declarations for Serializable classes. 2005-08-30 10:20:21 +00:00
igor%mir2.org 6e481078c3 Fixing 306258: now Rhino can be compiled with Ant under JDK 1.5 2005-08-28 19:51:23 +00:00
igor%mir2.org 178e4b2195 Fix to make things compilable: getElemFunctionAndThis returns Callable, not Function nowdays. 2005-08-01 13:48:32 +00:00
igor%mir2.org c57a9a3c25 Implementing bug 274467: Add JavaScript stack trace to exceptions
The changes are based on that patch from Attila Szegedi, szegedia@freemail.hu.
2005-02-16 19:57:03 +00:00
igor%mir2.org 356370801a Implementing bug 280047: Undefined no longer implements Scriptable 2005-01-27 16:35:39 +00:00
igor%mir2.org 6d48a85ee1 Reverting Ref to the original implementation which did not pass an additional
"Scriptable target" argument to Ref.(get|set|has|delete) methods. The idea was
to optimize away in many cases creation of Ref instances, but given that modern
JVM can GC short-lived objects efficiently it does not sound right to have code
complexity now in the hope of slightly more efficient implementation later.
2005-01-22 20:26:08 +00:00
igor%mir2.org 45600b4578 Fixing bug 277537: implementing isXMLName() 2005-01-14 14:13:56 +00:00
igor%mir2.org 0054cfa5c7 Fixing bug 271545: XML() should bahave exactly as XML("") 2004-11-24 23:16:38 +00:00
igor%mir2.org d41bf7368b XML no longer implements Wrapper interface. Instead getXmlObject method
is added to access the implementation. In this way all functionality
of Java API in XmlObject is available to scripts if they need it.
2004-11-10 23:13:04 +00:00
igor%mir2.org 3f5b0b9d22 Minimizing memory footprint by eliminating class fields:
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)
2004-10-25 15:44:24 +00:00
igor%mir2.org e68a272765 Directory with external jars is renamed from jarlib to lib for consistency with other projects. 2004-10-22 12:36:36 +00:00
igor%mir2.org effa03602d Changing (XML|XMLList).(propertyIsEnumeratable|attribute|child) to confirm to the published ECMA 357 specification. 2004-10-14 07:34:13 +00:00
igor%mir2.org 648f936a6c Removal of autowrapping of XmlObject as XML as it prevents to use full API of XmlObject in JS. Use XML(jsWrapOfXmObject) to get XML corresponding to XmlObject. 2004-10-10 22:54:01 +00:00
igor%mir2.org bf3840028d Implementing Wrapper interface in XML to unwrap to XmlObject and back 2004-10-08 21:04:41 +00:00
igor%mir2.org e35e735319 Yet another reference reorganization:
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.
2004-10-03 23:55:04 +00:00
igor%mir2.org 66523d9651 Better error reporting for undefined access:
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.
2004-10-02 22:14:02 +00:00
igor%mir2.org 79222f002b Removal of scope argument of runtime functions to access|modify object members. The only reason for the argument was the need to call toObject to convert target object to Scriptable, but since now there is topCallScope available, that one can always be used instead. 2004-10-02 09:45:44 +00:00
igor%mir2.org 5cec178ab1 Change ScriptRuntime.get(Elem|Prop)FunctionAndThis to treat XML objects specially to follow ECMA 357, 11.2.2.1, CalMethod. This is done to minimize the overhead of method calls as otherwise someXmlObject.method() would first construct XMLList and apply () to it later.
To implement the function call redirection functionality XMLObject.getExtraMethodSource is added() to return an additional object to use as method source.
2004-10-01 22:07:12 +00:00
igor%mir2.org 51da0ce769 RUnit Software AS as the single owner of copyrights for the following list of files present in Mozilla CVS as of 2004-10-01 15:10 UTC changes the license of the files to NPL/GPL. This is done for consistency with the rest of the source code in Rhino.
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.
2004-10-01 15:11:01 +00:00
igor%mir2.org a8119cb66f More Reference clenups: Reference.delete now returns boolean to follow JS semantic clother and Reference implementation for __proto__|__parent__ is moved to a separated file SpecialRef. 2004-10-01 13:32:14 +00:00
igor%mir2.org f269e33742 Replacing calls to XMLLib to construct special name objects to represent qulified names, attributes and descendants by calls to object to get Reference based on name type. It allowed to implement proper namespace resolution in qulified name without forcing activation creation and simplified code.
In addition XMLName is no longer leaked to interpretation stack which would allow to remove unnecessary casts to XMLName in future.
2004-09-30 22:52:40 +00:00
igor%mir2.org ee94cb397f 1. Reference cleanup:
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.
2004-09-29 20:58:16 +00:00
igor%mir2.org 0bc442b668 1. Pass Context argument to XMLReference creation method to use it later
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.
2004-09-28 21:56:33 +00:00
igor%mir2.org 675eab9782 1. Replacing IdScriptableObject.wrap_* methods by their ScriptRuntime.wrap* counterparts since the wrap methods are useful not only for subclasses of IdScriptableObject.
2. Reorganizing execIdCall in few classes inherited from IdScriptableObject to shrink code size.
2004-09-10 18:02:06 +00:00
igor%mir2.org 8bbc783f57 XMLLib.escapeXMLAttribute is required to add " arround the text to simplify code generation. 2004-09-10 17:40:59 +00:00
igor%mir2.org 73f67832ac Removal of "throws JavaSriptException" declaration:
JavaSriptException now inherits from RhinoException which inherits from RuntimeException and as such it does not necessary to declare it.

Moreover, it is wrong to use it for the documentation purpose since a  script can also throw EcmaError and WrappedException and a proper documentation would require to document those exceptions as well. But since almost all Rhino functions can potentially execute script code it means that wast majority of functions would bear the declarations, not only code overriding or calling explicitly Function.call/construct. And then the throw declarations would bring no information if it always would be "throws RhinoException". Thus it is better not to litter sources with the declarations at all.
2004-09-08 12:29:59 +00:00
igor%mir2.org 66ccb85667 Fixing bug 256691: forcing XML.hasSimpleContent() to return true for atributes and text. 2004-08-24 11:38:59 +00:00
igor%mir2.org bb56b55288 Resolving bug 256387: XML objects got toSource implementation 2004-08-21 12:26:43 +00:00
igor%mir2.org b0945b613c Resolving bug 256318: for consistancy with XMLObject.addValues ScriptableObject.equivalentValues also uses NOT_FOUND to indicate no operation available. 2004-08-20 18:05:50 +00:00
igor%mir2.org 686ca051d2 Allow to pass JS-wrapped instances of org.apache.xmlbeans.XmlCursor and org.apache.xmlbeans.XmlObject to XML constructor to make proper XML objects from them. 2004-08-04 17:32:48 +00:00
igor%mir2.org 5c76a0f4fa 1. Recently introduced ScriptableObject.default(Prototype|ParentScope)() methods had problems with serialization and are removed now. XML code explicitly sets parent/prototype. To simplify that ScriptableObject now contains a special constructor taking scope and prototype arguments.
2. xml/XMLObject do not define lib() method and instead defines few abstract methods to create "with" proxies and perform addition.

3. XMLLib implementation is stored in the scope using ScriptableObject.associateValue() and does not depend on presence of proper XML object.
2004-08-04 12:54:03 +00:00
igor%mir2.org 0875b1550b Explicit ScriptRuntime methods to get function and function this for all cases of method calls:
ScriptRuntime.get(Name|Prop|Elem|Value)FunctionAndThis provides uniform way to get function object and its this during function calls. It allowed to simplify handling of method calls both in interpreter and optimizer and opened a way to implement independent processing of function and property namespaces.
2004-08-01 23:21:17 +00:00
igor%mir2.org 061a717577 More compatibility renames: to simplify life for applications that use old IdScriptable/IdFunction/IdFunctionMaster I farther renamed:
IdFunction -> IdFunctionObject
IdFunctionMaster -> IdFunctionCall
2004-07-30 13:18:30 +00:00
igor%mir2.org ed22b8d5bc Compatibility rename: due to changes in IdScrittable any code that sublasses
it has to be updated. This is done for Rhino classes and since IdScriptable
is not a part of public API, it should not matter. But in reality someone can
subclass IdScriptable in application code.

To help with upgrade in such cases I renamed IdScriptable into
IdScriptableObject. In this way the application using IdScriptable code can add
old IdScriptable class to its CLASSPATH  and be able to run again without the
need to recompile/change anything in the source.
2004-07-30 10:31:00 +00:00