Commit Graph

1613 Commits

Author SHA1 Message Date
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
igor%mir2.org
15426336fd Normilizing numeration of Token constants after removal of few no longer used
constants in the previous patches
2004-07-04 14:12:01 +00:00
igor%mir2.org
53864e64b8 Splitting code generation in interpreter and class compiler into separated statement-only and expression only cases to add more checks. 2004-07-02 15:36:13 +00:00
igor%mir2.org
b91ef7e8a2 Replacing generic Token.EXPRSTMT by Token.EXPR_VOID and Token.EXPR_RESULT and removal of Token.POP and Token.POPV. Now parser creates appropriate expression statements itself so there is no need to replace the time in NodeTransformer. 2004-07-02 13:11:06 +00:00
igor%mir2.org
4ad826a35e Fixing bug 249471:
Fixing parseFloat logic and Context usage cleanup.

I changed number start detection code in parseFloat to check properly for lone
+/- while making the code IMO more redable.

In addtion patch removes unused Context parameter from various functions in
NativeGlobal including parseFloat which was remainder from pre IdFunction
code.
2004-07-02 06:55:21 +00:00
igor%mir2.org
4035bd2c91 Removal of Tiken.UNDEFINED: it was not used outside Interpreter 2004-07-01 16:40:44 +00:00
igor%mir2.org
f0ca03fe7c Replacing state flags in TokenStream by separated boolean values to simplify
code and to remove flags that were set/cleared but never queried.
2004-07-01 14:52:22 +00:00
igor%mir2.org
21a1489b59 Change IRFactory to return/accept Node, not Object as the type for parse tree
nodes. Parser already assumes in a few places that such Node and it is not
worth to pretend otherwise.
2004-07-01 10:39:28 +00:00
igor%mir2.org
05a6149911 Fixing JavaDoc: the previous changes removed Context(ContextFactory)
constructor as factory is associated automatically with Context but JavaDoc
continied to refer to this constructor form.
2004-06-30 15:28:04 +00:00
igor%mir2.org
f32fceb8a1 Deprecation of ContextListener in favour of ContextFactory.Listener:
the later is stored in the factory and not in static variables.
For compatibility an instance of ContextFactory stored in static variables
is used to provide support for old Context.addContextListener etc. API.

The static instance of the factory is also used by Context.enter to create
Context instances providing simple way to customize Context: one just need
to initialize the global static factory.
2004-06-30 15:23:39 +00:00
igor%mir2.org
012fd05901 Fix menu enable/disable misbehavior. 2004-06-30 13:29:41 +00:00
igor%mir2.org
4cc8c9cd28 Fixing JDK 1.3 compatibility: TableModel.getRot() should not return null there. 2004-06-30 09:38:54 +00:00
igor%mir2.org
c1a3a327c2 Fixing scope problems with IdFunction when IdScriptable is top scope itself:
scope for IdFunction instances is determined through getTopScope,
not getParentScope() which can be null.

To prevent null scope initialization problems in future IdFunction constructor
now throws an exception if scope argument is null.
2004-06-29 15:43:01 +00:00
igor%mir2.org
d9fd2cc2b9 Make EvaluatorException(String) public for compatibility 2004-06-15 04:42:59 +00:00
igor%mir2.org
7f56cb9f8f Fixing regression after previous commit for bug 245882: when used as top scope ImporterTopLevel should not define constructor property not to hide Object.prototype.constructor. 2004-06-09 17:01:01 +00:00
igor%mir2.org
204d41ff43 1. IdFunction.methodId is no longer public as some old Java compilers have troubles with it and accessor method has to be used instead.
2. IdFunction constructor now takes scope argument as well to prevent initialization bugs.
2004-06-09 12:54:04 +00:00
igor%mir2.org
45dd15a64f The last commit made Rhino uncompilable! Fixing that. 2004-06-09 08:25:59 +00:00
igor%mir2.org
407b7697c2 Implementing bug 245882: now ImporterTopLevel can be constructed from JavaScript using JavaImporter to allow to have class and package collections without namespace polluting. 2004-06-09 07:36:31 +00:00
igor%mir2.org
f0b3c4b63f Work on bug 245882: check that scope is not this when setting scope chain
to prevent scope chain loops.
2004-06-08 23:30:30 +00:00
igor%mir2.org
ec1dd303f9 Default implemetation of toSource now lives in ScriptRuntime to allow its
reuse in othr objects.
2004-06-08 23:28:32 +00:00