igor%mir2.org
0b43005efc
Making next release to be 1.6 release 1
2004-07-12 14:26:30 +00:00
igor%mir2.org
6e592d434b
Renaming ObjArray.setReadOnly() to ObjArray.seal() to follow the rest of Rhino code.
2004-07-09 13:28:48 +00:00
igor%mir2.org
6c54cdec60
Fixing comments text to reflect real state of code
2004-07-07 14:47:46 +00:00
igor%mir2.org
4ada0b6a37
Almost reverting the prevois commit: it was too preliminary.
2004-07-07 14:46:58 +00:00
igor%mir2.org
943eb8493c
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
3ae6fdf9db
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
3c5cccc01d
Removal of no-longer applicable comments refering to SM code
2004-07-05 15:07:25 +00:00
igor%mir2.org
22e375a6d4
Removal of Token.DOT in NodeTransformer: it is always processed in IRFactory.
2004-07-05 15:06:18 +00:00
igor%mir2.org
8791bc23b5
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
428facfffa
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
d49fff6560
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
ed8b5cf4bf
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
c001992635
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
19a3f8f1df
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
f07023b676
Removal of Tiken.UNDEFINED: it was not used outside Interpreter
2004-07-01 16:40:44 +00:00
igor%mir2.org
6cda148128
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
860281245c
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
8c09378b4d
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
03fd126f9f
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
b7d599a40f
Fix menu enable/disable misbehavior.
2004-06-30 13:29:41 +00:00
igor%mir2.org
0943483fa1
Fixing JDK 1.3 compatibility: TableModel.getRot() should not return null there.
2004-06-30 09:38:54 +00:00
igor%mir2.org
49d3ea3724
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
9c694e01db
Make EvaluatorException(String) public for compatibility
2004-06-15 04:42:59 +00:00
igor%mir2.org
7b30a5de99
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
a8ca02b455
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
89f5fdbbf7
The last commit made Rhino uncompilable! Fixing that.
2004-06-09 08:25:59 +00:00
igor%mir2.org
7bc79c031f
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
49246d9273
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
bdfcefdff8
Default implemetation of toSource now lives in ScriptRuntime to allow its
...
reuse in othr objects.
2004-06-08 23:28:32 +00:00
igor%mir2.org
e565588063
Yet another change in IdFunction: now its constructor takes arity argument
...
which removes the need to have separated methodArity in IdFunctionMaster
intertface. The method, however, has to be preseved in IdScriptable since it
is used to find which arity should be used during IdFunction construction.
2004-06-08 22:25:57 +00:00
igor%mir2.org
7be4658c39
Using IdFunction in place of JIFunction in NativeJavaTopPackage
2004-06-08 15:29:34 +00:00
igor%mir2.org
4ab02a8202
Changin IdFunction/IdFunctionMaster iteraction:
...
1. execMethod and methodArity in IdFunctionMaster do not receive methodId explicitly but rather through the IdFunction instance. To ensure fastest access to method id it is made pubic final field.
2. IdFunction allows to associate an internal tag with itself that allows not to worry about id clashes and simply check for object tag before doing method dispatch.
2004-06-08 14:23:35 +00:00
igor%mir2.org
9409fd1750
JIFunction was wrong idea at the end: it is better to stick with IdFunction and teach it missed functionality. The patch changes JavaAdapter to use IdFunction for its constructor call.
2004-06-08 12:38:20 +00:00
igor%mir2.org
87e6a1e09c
API to set global SecurityController is moved to SecurityController not to clatter Context.
2004-06-08 11:09:40 +00:00
igor%mir2.org
f3d3d1d14a
Work on bug 244492: RhinoException is the new common base class for all exceptions.
2004-06-07 16:40:28 +00:00
igor%mir2.org
78729bc8b9
Switch to using Context.javaToJS instead of Context.toObject
2004-06-07 10:35:22 +00:00
igor%mir2.org
8404a66bdf
setGlobalSecurityController should be static
2004-06-07 10:34:22 +00:00
igor%mir2.org
a58e08501c
Introduction of ContextAction interface as a safe alternative for Context.enter/Context.exit. All usages of Context.enter/Context.exit in Rhino are replaced by
...
Context.call(new ContextAction() {
public Object run(Context cx) { ... }
});
or similar alternatives.
It prevents bugs with missed Context.exit and provides room for optimization of Context association with current thread and simplify implementation of safe environment for execution of untrusted applets and scripts.
In addition, Rhino now supports global SecurityController that take precedence over any per/Context controllers so the application can setup the controller once and for all.
2004-06-06 15:33:59 +00:00
igor%mir2.org
08117caf7c
ContextFactory is a new API class
2004-06-06 09:28:18 +00:00
igor%mir2.org
60c0074729
added ContextFactory which is used to create Context instances in JavaAdapter when there is no Context associated with the current thread.
2004-06-04 17:54:42 +00:00
igor%mir2.org
ca73e6aad1
Better JavaDoc comments for FEATURE_ constants
2004-06-04 17:51:27 +00:00
igor%mir2.org
46aea95d99
Allow to disable special treatment of __proto__ and __parent__ via overriding Context.hasFeature().
2004-06-04 14:57:31 +00:00
igor%mir2.org
29355807c9
Use consistent naming for property manipulation functions in ScriptRuntime and drop no longer used scope argument for ScriptRuntime.setProp that acts on strings.
2004-06-04 06:58:03 +00:00
igor%mir2.org
5a88756821
Code to create references to manipulate with __proto__ and __parent__ is moved to ScriptRuntime.specialReference not to expose too much implementation details
2004-06-02 14:56:25 +00:00
igor%mir2.org
a5438d7003
Changing Refrence.set(Object) to return Object to return the real stored value.
2004-06-02 11:33:09 +00:00
igor%mir2.org
4db86ff03e
Pass __proto__ and __parent__ special properties to code generation as strings to allow to support application-specific special properties without altering code generation.
2004-06-02 09:13:12 +00:00
igor%mir2.org
2c7e977b7e
Allow Rhino embeddings to support function as left-hand-side extension via overriding BaseFunction.specialCall().
2004-06-01 16:04:18 +00:00
igor%mir2.org
ef83ead18b
Making invalid left hand of assignment runtime reference error instead of syntax error as dictated by ECMAScript. Now interpreter/class compiler generates code that calls ScriptRuntime.genericReference() that in turn throws the error.
2004-05-31 15:49:19 +00:00
igor%mir2.org
2361dfc4fe
Work on bug 243057:
...
Introduction of support for calling function in reference context so with native functions code like f(args) = something or x.y(args)++ would be allowed.
The changes added necessary changes to parser and code generation but at runtime currently any such usage would throw an exception.
2004-05-31 14:51:20 +00:00
igor%mir2.org
a3039484fe
For prefix and postfix ++/-- use mask flags instead of enumeration to denote postfix/prefix and ++/-- operation.
2004-05-31 13:03:16 +00:00