6091 Commits

Author SHA1 Message Date
igor%mir2.org
2270c57c1d 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.


git-svn-id: svn://10.0.0.236/trunk@162971 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-29 20:58:16 +00:00
igor%mir2.org
72a361039f Transform name access to var access only if function does not require activation: previously the tests missed the check for .() that caused activation to be created.
git-svn-id: svn://10.0.0.236/trunk@162970 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-29 20:49:05 +00:00
igor%mir2.org
811d2f3f10 Define var and arguments as PERMANENT properties as required by ECMA.
git-svn-id: svn://10.0.0.236/trunk@162963 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-29 19:04:47 +00:00
igor%mir2.org
c34838285c 1. I fixed a recent regression that caused "arguments" array to be constructed before initialization of standard objects: Global.init() should be called in procesFiles as well.
2. I replaced a couple of anonymous classes implementing ContextAction by Use single IProxy class to shrink compiled code size.


git-svn-id: svn://10.0.0.236/trunk@162935 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-29 05:41:00 +00:00
igor%mir2.org
acf3abd2a3 Store optimization level and language version in ShellContextFactory
so all Context instances created on other threads or from JavaAdapter
calls would have proper setup.


git-svn-id: svn://10.0.0.236/trunk@162912 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-28 21:58:01 +00:00
igor%mir2.org
c29a6222f4 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.


git-svn-id: svn://10.0.0.236/trunk@162911 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-28 21:56:33 +00:00
igor%mir2.org
0bde6be515 I added methods to check for valid version and optimization levels that
Rhino embeddings can use to check the validity of data.


git-svn-id: svn://10.0.0.236/trunk@162909 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-28 21:52:19 +00:00
igor%mir2.org
75be5fa708 NotAFuctionException is not deprecated for now
git-svn-id: svn://10.0.0.236/trunk@162869 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-28 07:20:27 +00:00
igor%mir2.org
4b51d7b16d *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@162861 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-27 23:24:27 +00:00
igor%mir2.org
b12610fa52 Use Context.emptyArgs, not null to denote null-arity method call for consistency.
git-svn-id: svn://10.0.0.236/trunk@162853 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-27 20:48:44 +00:00
igor%mir2.org
dda6523b33 In ScriptableObject.callMethod use object itself as possible top scope source for to support of dynamic scoping.
git-svn-id: svn://10.0.0.236/trunk@162835 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-27 12:08:24 +00:00
igor%mir2.org
f6c52aa5fa Removal of OptLocalVariable: the class is replaced by varRegisters array in Codegen and numberVarFlags in OptFunctionNode. The later is initilized only when optimizer deduces that there are variables used in pure number context.
git-svn-id: svn://10.0.0.236/trunk@162834 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-27 12:04:52 +00:00
igor%mir2.org
d65a52cf56 Replace explicit parse tree walk to associate OptLocalVariable with tree nodes by lazy initialization of the association on first OptLocalVariable access. It shrinks code while making optimization to run slightly faster.
git-svn-id: svn://10.0.0.236/trunk@162832 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-27 09:33:50 +00:00
igor%mir2.org
18fc904f13 Updating links to xmlbeans home and refer to xbean.jar, not xmlbeans.jar in the documentation.
git-svn-id: svn://10.0.0.236/trunk@162826 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-26 22:35:29 +00:00
igor%mir2.org
682520c823 I added ScriptRuntime.setObjectProtoAndParent to initialize prototype and parent of objects created outside the standard constructor calls. It allowed to replace scattered setPrototype/setParentScope and shrink code size.
git-svn-id: svn://10.0.0.236/trunk@162820 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-26 14:36:01 +00:00
igor%mir2.org
977118b569 Avoid duplicated getMessage* code in ScriptRuntime and Context: now all the necessary code is moved to ScriptRuntime and the rest of code is updated to call ScriptRuntime
git-svn-id: svn://10.0.0.236/trunk@162805 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-25 18:11:44 +00:00
igor%mir2.org
a0b171eb5b Better compatibility of continuation implementation with the version from cocoondev.org: use current top call scope as scope for Continuation, not library scope.
git-svn-id: svn://10.0.0.236/trunk@162791 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-25 10:34:05 +00:00
igor%mir2.org
47a5bbf870 For compatibility allow jsFunction_* to return non-scriptable type. Not to
perform type conversion checks for methods that do return proper JS type the
type check is done only once in the constructor and if necessary a flag is set
to call WrapFaactory.wrap on method return.


git-svn-id: svn://10.0.0.236/trunk@162790 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-25 09:24:43 +00:00
igor%mir2.org
2ababf13f0 Allow to specify explicit ContextFactory with the debugger.
git-svn-id: svn://10.0.0.236/trunk@162757 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-24 20:35:42 +00:00
igor%mir2.org
b6a3aeb747 Make sure that all functionality that Main.(main|mainEmbedded) use to initialize debug GUI is available for applications through public methods.
git-svn-id: svn://10.0.0.236/trunk@162746 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-24 16:46:50 +00:00
igor%mir2.org
2e69724dd1 More compatibility changes: added Main.isVisible
git-svn-id: svn://10.0.0.236/trunk@162745 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-24 16:38:09 +00:00
igor%mir2.org
666a594952 Move getObjectIndex/setObjectIndex that take double as index from optimizer/OptRuntime to ScriptRuntime and use it in the Interpreter to avoid code duplication.
git-svn-id: svn://10.0.0.236/trunk@162744 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-24 16:27:27 +00:00
igor%mir2.org
ce2e31ba2b Revert wrong commit of build.properties with temporary changes
git-svn-id: svn://10.0.0.236/trunk@162743 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-24 16:19:26 +00:00
igor%mir2.org
6835db3779 Added few methods to redirect calls from main to DebugGui for compatibility.
git-svn-id: svn://10.0.0.236/trunk@162742 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-24 16:14:02 +00:00
igor%mir2.org
5e83c8f19c Use single function, Kit.xDigitToInt, to convert character representing hex digit to number. The function replaces duplicated code in TokenStream/NativeGlobal/NativeRegExp.
git-svn-id: svn://10.0.0.236/trunk@162740 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-24 13:14:01 +00:00
igor%mir2.org
fbd3077fc8 Code reorganisation to shrink the size of JVM class files.
git-svn-id: svn://10.0.0.236/trunk@162739 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-24 13:11:02 +00:00
brendan%mozilla.org
445c660f77 Undo last change, it broke ports and is not strictly speaking part of the fix for bug 253241.
git-svn-id: svn://10.0.0.236/trunk@162738 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-24 03:31:55 +00:00
brendan%mozilla.org
5d5746632e Home sp always before calling js_ConcatStrings (261321, r/a=me).
git-svn-id: svn://10.0.0.236/trunk@162736 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-24 02:17:30 +00:00
brendan%mozilla.org
4371838064 Check in patch from Nicholas Miell <nmiell@comcast.net> for bug 253241 (r=shaver, a=asa).
git-svn-id: svn://10.0.0.236/trunk@162728 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-23 23:32:51 +00:00
igor%mir2.org
adb3b1d57c Resolving bug 261278: strict mode implementation
git-svn-id: svn://10.0.0.236/trunk@162720 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-23 21:34:22 +00:00
igor%mir2.org
36499c5df2 Preparations for RC2 for 1.6R1
git-svn-id: svn://10.0.0.236/trunk@162662 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-22 10:59:39 +00:00
igor%mir2.org
05431b52f3 Added some information about experimental support for continuations
git-svn-id: svn://10.0.0.236/trunk@162661 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-22 10:43:52 +00:00
igor%mir2.org
157f6c2e53 1. Extend index and offset jump limits to 2^16 - 1 from 2^15 - 1 using unsigned indexes.
2. Use linked list of read-only REPogState to implement state stack instead of array of struct. It fixes bug 258417 while making creation of back track stack data much cheaper since there is no need to copy read-only structures.


git-svn-id: svn://10.0.0.236/trunk@162660 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-22 09:48:17 +00:00
igor%mir2.org
950e6f90b2 In NativeRegExp.executeREBytecode I moved code to manipulate regexp program
stack to separated pushProgStack|popProgStack methods to localize changes to
for the following patch to use linked list for state stack.


git-svn-id: svn://10.0.0.236/trunk@162612 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-21 18:38:46 +00:00
igor%mir2.org
1374898b0a I merged REMatchState into REGlobalData and replaced all REMatchState usages as function return type by boolean. It simplified matching code while reducing code bloat.
git-svn-id: svn://10.0.0.236/trunk@162597 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-21 15:00:43 +00:00
brendan%mozilla.org
b482fb5e81 Avoid recursive death in exn_toString (260541, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@162572 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-21 01:18:00 +00:00
brendan%mozilla.org
fb1bc8f1ea Make JSOP_SET{PROP,ELEM} be detecting (259935, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@162566 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-21 00:25:46 +00:00
igor%mir2.org
2e93d03dd1 1. Use direct reference to backTraceStack top to save/restore backTraceStack reference when matching REOP_ASSERT/REOP_ASSERT_NOT
2. Coalesce duplicated code in NativeRegExp.executeREBytecode


git-svn-id: svn://10.0.0.236/trunk@162562 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-20 22:44:51 +00:00
igor%mir2.org
07b2e2d452 Resolving bug 258844: implementation of continuation support for Rhino interpret
er inspired by Christopher Oliver work for custom Rhino version for cocoon.apach
e.org.


git-svn-id: svn://10.0.0.236/trunk@162470 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-16 19:04:34 +00:00
igor%mir2.org
08fb99664c Resolving bug 258844: implementation of continuation support for Rhino interpreter inspired by Christopher Oliver work for custom Rhino version for cocoon.apache.org.
git-svn-id: svn://10.0.0.236/trunk@162466 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-16 18:27:42 +00:00
igor%mir2.org
c3498cc0f1 Replacing back track array in RegExp matching code by linked list to address bug 258419.
git-svn-id: svn://10.0.0.236/trunk@162463 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-16 17:30:01 +00:00
igor%mir2.org
3ef1a3e62f 1. Using explicit ShellContextFactory in shell to avoid interference from changes in global ContextFactory.
2. Initializing global scope before the first execution to allow to customize ShellContextFactory before calls to Context.initStandardObjects()


git-svn-id: svn://10.0.0.236/trunk@162366 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-15 16:00:30 +00:00
igor%mir2.org
738170a55f 1. Call contextData.pushFrame(this) from StackFrame.onEnter and not from StackFrame.constructor to allow multiple invocations of enter/exit per single debug frame. The continuation support will use it.
2. Expand tabs


git-svn-id: svn://10.0.0.236/trunk@162363 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-15 14:59:36 +00:00
igor%mir2.org
790007841c 1. Ignoring recursive invocation of Dim.interrupted on event thread: when Gui
processes breakpoint hit and another breakpoint is met during event processing,
then on Linux recursive invocations of EventQueue.getNextEvent()/dispatchEvent
lead to eventual GUI deadlock. It is easy to observe when the break on function
enter is enabled and a JS function is called that is attached to an action
handler of some button. With recursive bahaviour repeated clicks lead to deeper
and deeper invocation of EventQueue.getNextEvent() and GUI deadlock on Linux.

So to improve debugger stubility I modify Dim.interrupted to ignore calls from
event thread when another invocation of Dim.interrupted already waits for GUI
result.

2. To decrease class and jar bloat I merges various implementations of Runnable
and and other interfaces to single class with switch dispatch. It saved about
6K from js.jar.


git-svn-id: svn://10.0.0.236/trunk@162361 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-15 14:45:10 +00:00
igor%mir2.org
f94f742b18 1. Using UniqueTag.DOUBLE_MARK in interpreter instaed of Object instance to mark double values on stack for better debug printouts.
2. In parse tree use Node instances, not Node.Target to denote target nodes as later just leads to code bloat without safty benefits.


git-svn-id: svn://10.0.0.236/trunk@162357 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-15 13:51:19 +00:00
igor%mir2.org
73725fe78e Added UniqueTag.DOUBLE_MARK for better debug printouts in interpreter and potential support for serialization of Interpreter.CallFrame.
git-svn-id: svn://10.0.0.236/trunk@162356 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-15 13:42:26 +00:00
igor%mir2.org
7e7faa8f8c 1. Marking NativeCall.parentActivationCall transient so serialization would not see it.
2. Removal of never used NativeCall.thisObj field and code to initialize it.

3. Renaming NativeCall.funObj to NativeCall.function for better readability.


git-svn-id: svn://10.0.0.236/trunk@162303 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-14 14:59:21 +00:00
brendan%mozilla.org
97d5ac0507 Fix function redeclaration and with deprecation warnings to apply to start of statement (256036, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@162266 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-14 01:38:19 +00:00
igor%mir2.org
d94c9ad815 1. Allow to monitor from application top script or function calls: now they go through ContextFactory.doTopCall which can be overridden.
2. Context.observeInstructionCount now calls ContxtFactory.observeInstructionCount so it can overridden without extra Context class.


git-svn-id: svn://10.0.0.236/trunk@162209 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-13 13:19:17 +00:00
igor%mir2.org
69dc24d69a My take on the patch from Attila Szegedi <szegedia@freemail.hu> to resolve 258959.
git-svn-id: svn://10.0.0.236/trunk@162164 18797224-902f-48f8-a5cc-f745e15eee43
2004-09-12 16:41:04 +00:00