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
igor%mir2.org
e1d29463ec
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
f066506500
Using IdFunction in place of JIFunction in NativeJavaTopPackage
2004-06-08 15:29:34 +00:00
igor%mir2.org
8f28fc868a
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
f5bd7a5a11
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
e412382826
API to set global SecurityController is moved to SecurityController not to clatter Context.
2004-06-08 11:09:40 +00:00
igor%mir2.org
b538849b5b
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
be6494c229
Switch to using Context.javaToJS instead of Context.toObject
2004-06-07 10:35:22 +00:00
igor%mir2.org
c613550feb
setGlobalSecurityController should be static
2004-06-07 10:34:22 +00:00
igor%mir2.org
daf6b75edb
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
70af322f7a
ContextFactory is a new API class
2004-06-06 09:28:18 +00:00
igor%mir2.org
172c10e986
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
c3ac073e09
Better JavaDoc comments for FEATURE_ constants
2004-06-04 17:51:27 +00:00
igor%mir2.org
4fe37bb798
Allow to disable special treatment of __proto__ and __parent__ via overriding Context.hasFeature().
2004-06-04 14:57:31 +00:00
igor%mir2.org
7048fd0cd3
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
633428122c
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
20af7b885d
Changing Refrence.set(Object) to return Object to return the real stored value.
2004-06-02 11:33:09 +00:00
igor%mir2.org
1a9a123c14
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
ee2f62aef9
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
94302e5018
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