Commit Graph

1632 Commits

Author SHA1 Message Date
igor%mir2.org
87d0f3525d Preparations for 1.6R1 2004-08-06 16:05:40 +00:00
igor%mir2.org
8bcaa1a262 Class-Path entry for Rhino: xmlbean.jar 2004-08-06 15:49:25 +00:00
igor%mir2.org
0d8bd6fe39 Cleanup of call code generation: now it is split into separated functions for optimized/standard function calls. 2004-08-06 15:08:38 +00:00
igor%mir2.org
11ce08544d Removal of no longer used debug name index in Token.CALL/Token.REF_CALL: ScriptRuntime.get(Elem|Prop|Name|Value)FunctionAndThis takes care about debugging themselves. 2004-08-06 15:02:48 +00:00
igor%mir2.org
743dad92a4 GeneratedClassLoader is API class and should be listed in apiClasses.properties 2004-08-05 06:06:30 +00:00
igor%mir2.org
0cf7fb3e59 Restoring ScriptRuntime.call: BSF uses it! 2004-08-04 17:42:56 +00:00
igor%mir2.org
53e6af4c84 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
ec4ab45708 Preparations for Rhino 1.6R1 RC1 2004-08-04 17:28:11 +00:00
igor%mir2.org
4a8da93dda 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
35ca775423 Preparations for 1.6R1 RC1 2004-08-03 17:13:40 +00:00
igor%mir2.org
b73081a5a8 Cosmetics: untabify 2004-08-02 17:49:04 +00:00
igor%mir2.org
73d09ce2c9 Added runtime support to allow custom wrapping of XML objects 2004-08-02 14:46:33 +00:00
igor%mir2.org
81e82296c8 Use ScriptRuntime.notAFunction to report bad ScriptableObject.callMethod arguments 2004-08-02 14:44:03 +00:00
igor%mir2.org
e32e12b401 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
49d1f565ca 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
52f9db3360 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
igor%mir2.org
1502b14734 The previous patch introduced regression: it is posible for slots array to be filled with slot objects and REMOVED tags. Thus getSlotPosition can loop through the whole table. This patch restores the old and proper state of affairs. 2004-07-30 07:52:30 +00:00
igor%mir2.org
6cc1245e38 Using single ScriptRuntime.toStringIdOrIndex to convert object id to string of index key instead of multiple calls to getStringId/getIntId. 2004-07-29 22:47:05 +00:00
igor%mir2.org
df2c699cd7 Calling proper ScriptRuntime.call taking scope argument instead of eprectaed old form. 2004-07-29 22:44:45 +00:00
igor%mir2.org
b6ed88ed6d New "scratch" field for int indexes to allow to return more then one result from index parsing functions. 2004-07-29 22:42:50 +00:00
igor%mir2.org
1bd4e8e9db Explicitly throw IllegalStateException to indicate code bug when hashtable scan end up in infinite loop. 2004-07-29 22:40:47 +00:00
igor%mir2.org
2bf6166f45 Adding E4X example contributed by John Schneider from AgileDelta, Inc., http://www.agiledelta.com/ . 2004-07-29 15:55:41 +00:00
igor%mir2.org
8a6fdf912e Fixing missed context wrapping in debugger/Dim and proper button enable/dosable in debugger/DebugGui 2004-07-29 12:51:35 +00:00
igor%mir2.org
47eb21b587 Fixing under allocation of ids array while enumerating properties. 2004-07-29 12:46:46 +00:00
igor%mir2.org
c62ea82d3d Better error propagation from failed class loading: RuntimeError instances are rethrown while ClassNotFound, LinkageError etc. are caught. 2004-07-29 12:45:55 +00:00
igor%mir2.org
43d1beb31a Renaming StringIdMap to Main and ipdating documentation 2004-07-29 10:44:59 +00:00
igor%mir2.org
7f304859c1 Cleanup patch from Mario Cormier <mcormier@miranda.com> to fix bug 253323:
Parser contained useless this.decompiler = decompiler assignment.
2004-07-29 08:28:42 +00:00
igor%mir2.org
88a3913994 Committing E4X runtime implementation: see enhancement report 242805.
This is based on code contributed to Rhino by AgileDelta, Inc, www.agiledelta.com and in particular by

Ethan Hugg
Terry Lucas
Milen Nankov
John Schneider

Thanks!
2004-07-28 23:43:17 +00:00
igor%mir2.org
0659e0b714 Committing E4X parser and runtime proxies: see enhancement report 242805.
This is based on code contributed to Rhino by AgileDelta, Inc, www.agiledelta.com and in particular by

Ethan Hugg
Terry Lucas
Milen Nankov
John Schneider

Thanks!
2004-07-28 21:11:02 +00:00
igor%mir2.org
ef41e24058 Added ScriptableObject.equivalentValues to allow for custom equality operator support. 2004-07-28 15:23:11 +00:00
igor%mir2.org
d3d45e59da Added Reference.has() for future use. 2004-07-28 15:21:02 +00:00
igor%mir2.org
8799f9f62b Ignore any exception during script class initialization unless it is an instance of RhinoException. In this way lazily class loading or incompatible with the current JVMs jars will simply hide the script variables. 2004-07-28 15:20:08 +00:00
igor%mir2.org
e47e67719d Always call Scriptable.has(name, start) as obj.has(name, obj) since the start argument is useless in Scriptable.has and in this way it is possible to add temporary assertions to the code checking this. 2004-07-28 13:27:39 +00:00
igor%mir2.org
cf9b20185b Redesigning IdScriptable implementation.
The new logic introduces 2 independent id namespaces, instance ids and prototype ids. Typically there are very few instance properties and instance ids corresponds exactly to them. The prototype ids allows to define functions and other constant objects that typically found in prototype objects.

The new implementation takes advantage of this difference to provide very different API to implement fast mapping both for instance and prototype ids.
2004-07-28 11:40:38 +00:00
igor%mir2.org
f02c491af8 Introduction of defaultParentScope and defaultPrototype in ScriptableObject for lazily initialization of scope and prototype. 2004-07-28 09:52:29 +00:00
igor%mir2.org
a87bb4edcd Making ScriptRuntime.typeError* public 2004-07-28 09:51:02 +00:00
igor%mir2.org
9ad83535e6 Allow to subclass NativeWith 2004-07-28 09:50:07 +00:00
igor%mir2.org
cbb0e19a28 Favour same type converssions during LiveConnect for better support of java methods taking instances of Scriptable 2004-07-28 09:49:19 +00:00
igor%mir2.org
5207d03135 1. Optimizing getClassPrototype and getDefaultValue in ScriptableObject.
2. Start of the changes for simpler to use IdScriptable implementation: new utility functions in IdFunction and removal of Context argument from IdScriptable.fillConstructorProperties.
2004-07-28 07:12:46 +00:00
igor%mir2.org
1a1653605f Context.getArrayElements implementation is moved to ScriptRuntime which also defined now isArrayObject 2004-07-28 07:06:35 +00:00
igor%mir2.org
fa889e8215 Making next release to be 1.6 release 1 2004-07-12 14:26:30 +00:00
igor%mir2.org
2c3f8b4844 Renaming ObjArray.setReadOnly() to ObjArray.seal() to follow the rest of Rhino code. 2004-07-09 13:28:48 +00:00
igor%mir2.org
fe6620df87 Fixing comments text to reflect real state of code 2004-07-07 14:47:46 +00:00
igor%mir2.org
faa2cc87fe Almost reverting the prevois commit: it was too preliminary. 2004-07-07 14:46:58 +00:00
igor%mir2.org
4588cccd39 Changing the way Java getter and setter are stored: a new special class ComplexValue is used to indicate a controllable value that may have associated getter/setter methods. In this way getter can be added after slot creation without the need to replace slots. 2004-07-06 14:37:56 +00:00
igor%mir2.org
80b96958c9 Token.ZERO and Token.ONE are used only by interpreter and moved to Interpreter as corresponding icode constants. 2004-07-05 15:08:34 +00:00
igor%mir2.org
3ffab68246 Removal of no-longer applicable comments refering to SM code 2004-07-05 15:07:25 +00:00
igor%mir2.org
cfec98bb95 Removal of Token.DOT in NodeTransformer: it is always processed in IRFactory. 2004-07-05 15:06:18 +00:00
igor%mir2.org
b0e98cbca8 When support for Context.FEATURE_MEMBER_EXPR_AS_FUNCTION_NAME is enables,
decompiler now does not turn them into assignment statements but keeps
original code with extension when printing function source. It allows for
better emulation of this JScript extension
2004-07-04 17:26:50 +00:00
igor%mir2.org
a084aaa65f Simplified handling of function expression statements: parser no longer
generate synthetic expression statement nodes for them.
2004-07-04 14:13:47 +00:00