Commit Graph

5320 Commits

Author SHA1 Message Date
igor%mir2.org
c7382925ac Changing Main.eval implementation to use compileString/exec instead of evalString to avoid dependancy on NativeGlobal when passing explicit thisObj to Script instances when they implement Function interface which holds currently in Rhino. 2003-09-12 17:12:20 +00:00
igor%mir2.org
9aa6317814 Cosmetics: identation fixes 2003-09-12 15:04:21 +00:00
igor%mir2.org
ca657b86ae Siplified code to extract error message from Throwable to reflect recent changes in exception-related API semantics. 2003-09-11 15:41:06 +00:00
igor%mir2.org
cf45db3956 Changing Context.newObject to use ScriptRuntime.getExistingCtor to get constructor Function instance. In this way Context.newObject will throw the same set of exceptions that other parts of Rhino will throw on bad access to constructor.
With this change NotAFunctionException is no longer used so it is deprecated and changed to extend from Error not Exception for source compatibility: otherwise compiler will complain about unreachable catch handler.
2003-09-10 12:44:23 +00:00
igor%mir2.org
f0adcfbccd Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=218440 :
Making Script implementations by Interpreter and Optimizer scope independent while keeping while still supporting compiling of regexp literals only once per Script instance.
2003-09-10 11:06:25 +00:00
igor%mir2.org
207ceb33fe Restoring NativeJavaPackage(String) constructor as deprecated for compatibility with Batik. 2003-09-09 13:27:11 +00:00
igor%mir2.org
0296631e46 ScriptRuntime.getCatchObject is modified to allow to accept instances of EvaluatorException, not only its WrappedException subclass. 2003-09-09 13:25:15 +00:00
igor%mir2.org
68676e179e Restoring JavaScriptException(String) as deprecated constructor for compatibility with BSF. 2003-09-09 13:22:50 +00:00
pschwartau%netscape.com
5547869e54 Initial add. Regresssion test for bug 216320. 2003-09-09 00:37:49 +00:00
bryner%brianryner.com
9d11b3c424 Fix build on gcc 3.4 by removing extra semicolons (bug 218551). r/sr=dbaron, a=brendan. 2003-09-07 22:37:27 +00:00
igor%mir2.org
88c394e664 Explicit separation between regexp compilation and execution: all data structures that represent compiled regexp are moved to a separated RECompiled class. 2003-09-06 15:49:05 +00:00
igor%mir2.org
31b2256d97 To construct regexp objects the generated code now calls omj.RegExpProxy instead of explicit calls to NativeRegExp constructor. It removes dependence of compiled Script instances on details of RegExp implementation. 2003-09-06 15:44:41 +00:00
igor%mir2.org
f8c669f1dd Added ScriptRuntime.checkRegExpProxy which is used in Interpreter and NativeString to check for regexp package presence instead of own duplicating code.
RegExpProxy.find_split is changed to include Context argument to follow the rest of RegExpProxy functions.
2003-09-06 15:41:03 +00:00
igor%mir2.org
de7b10603e I made most internal functions of NativeRegExp static since they do not reference NativeRegExp. 2003-09-06 12:49:07 +00:00
igor%mir2.org
54f85a5212 ScriptRuntime.main now takes Script as the first argument since it is simpler instantiate Script directly and pass it to ScriptRuntime.main then load Script lass which will be then instantiated in ScriptRuntime.main 2003-09-06 07:51:02 +00:00
igor%mir2.org
c9d7ff074e Replace Context field In REGlobalData by boolean multiline since it is the only information that is needed for matching code from RegExpImpl which was previously accessed through Context. 2003-09-05 21:22:51 +00:00
igor%mir2.org
1fe8179c7b Fixing regression caused by optimizer changes to address http://bugzilla.mozilla.org/show_bug.cgi?id=198086 :
Now Script.exec can be called more then once.
2003-09-05 21:17:58 +00:00
igor%mir2.org
54563952a0 Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=213279 :
Replacing static caches by global scope based storage.
2003-09-05 14:35:09 +00:00
igor%mir2.org
008e6de35a Patch from Nicolas JOUVE to address http://bugzilla.mozilla.org/show_bug.cgi?id=218163 2003-09-05 09:04:36 +00:00
igor%mir2.org
fbd31b0fe2 Cosmetics: removal of EOL blanks 2003-09-03 14:26:39 +00:00
igor%mir2.org
2956f5b69d Work for http://bugzilla.mozilla.org/show_bug.cgi?id=213279 :
Code for NativeJavaPackage.TopLevelPackage is moved to a separated file NativeJavaTopPackage.java
2003-09-03 10:42:36 +00:00
brendan%mozilla.org
214fac7ac4 Fix js_FinishTakingSrcNotes edge-case (bug 216320, r=shaver, a=asa). 2003-09-03 02:10:38 +00:00
igor%mir2.org
6e967acb16 Fix from Merten Schumann to initialize lineNumber/sourceName in the constructor, see http://bugzilla.mozilla.org/show_bug.cgi?id=217584 . 2003-09-02 12:32:41 +00:00
igor%mir2.org
57f50e5f8d Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=214594 :
In IRFactory.createLoop propagate line number information to the condition subtree for "while" and "for" loops so exceptions generated in a loop condition would have proper line number.
2003-09-02 06:23:20 +00:00
igor%mir2.org
0b3c7a2041 Fix from Olivier Oeuillot to address http://bugzilla.mozilla.org/show_bug.cgi?id=212395 . 2003-09-01 13:32:33 +00:00
igor%mir2.org
1dadf61103 Fix from Ming-Yee Iu to address http://bugzilla.mozilla.org/show_bug.cgi?id=217951 2003-09-01 11:06:03 +00:00
igor%mir2.org
2aa340aba8 Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=217379 :
The code in RegExpImpl.findReplen did not take into account that a particular
parenthesis pair can be null if it is not captured. The patch fixes that to
send undefined to the replace function for that case.
2003-09-01 09:05:52 +00:00
igor%mir2.org
6814bf31f0 Fix for DToA.JS_dtoa() to resolve http://bugzilla.mozilla.org/show_bug.cgi?id=217268 2003-08-31 19:42:58 +00:00
igor%mir2.org
46c31c6a73 Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=217346 :
I changed DToA.JS_dtobasestr to use BigInteger for its integer part when it does not fit long.
2003-08-30 15:34:44 +00:00
igor%mir2.org
4936fa3877 Finalizing work on http://bugzilla.mozilla.org/show_bug.cgi?id=198086 :
Now optimizer generates exactly one class per script and all its functions.
2003-08-30 12:02:19 +00:00
igor%mir2.org
d1be8de8ca Changing ScriptRuntime to return vois since it does not and should not change scope 2003-08-30 12:02:18 +00:00
igor%mir2.org
b8655920a5 More fixing for http://bugzilla.mozilla.org/show_bug.cgi?id=217584 :
Use Context.getSourcePositionFromStack in the EvaluatorException(String details) constructor to get line number information.
2003-08-30 11:59:15 +00:00
pkw%us.ibm.com
48c6e651e5 Bug 217499: Clean up AIX libpath and configure script
r=cls@seawood.org, a=asa@mozilla.org
2003-08-29 17:15:06 +00:00
igor%mir2.org
cd2ce4c17c Cosmetics: removal end-of-line blanks 2003-08-29 15:28:08 +00:00
igor%mir2.org
965090841f Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=217584 :
Implementation of Merten Schumann suggestion to add to EvaluatorException and JavaScripException information about script source name and error line .
2003-08-29 13:19:37 +00:00
igor%mir2.org
37375e32cf More work for http://bugzilla.mozilla.org/show_bug.cgi?id=198086 :
The patch changes omj.NativeScript to represent only instances of Script object
in scripts and removes its second role to server as a superclass for compiled
forms of JS scripts. In is not only allow to make optimizer to generate only
single class but also would make instances of Script generated by optimizer not
to depend on the scope. The later is essential for Script object reuse to
execute it against different scopes.
2003-08-29 10:42:23 +00:00
igor%mir2.org
3c9b841737 Working on http://bugzilla.mozilla.org/show_bug.cgi?id=198086 :
Now optimizer will generate only one class for all functions a script contains instead of class per function.
2003-08-28 12:40:10 +00:00
igor%mir2.org
89468875b8 Changing signature of addConstant from short to int and updating the code correspondingly to allow for constant indexes to exceed 32K since their type is unsigned short, not short and int allows to cover that while removing casts. 2003-08-28 12:29:01 +00:00
igor%mir2.org
6dd4d70e56 1. Removal of NativeScript.initScript which was empty and was never overridden by script function implementations.
2. Using in NativeScript.compile Context.compileString instead of compileReader to avoid unnecessary construction of StringReader.

3. Overriding NativeFunction.getEncodedSource() in NativeScript to call this method on the delegated script object so decompilation of scripts constructed via script.compile would work.
2003-08-27 11:53:01 +00:00
igor%mir2.org
18456e5ca1 NativeFunction.decompile abd NativeFunction.initScriptFunction are final since script function implementations should not override them. 2003-08-27 11:47:19 +00:00
igor%mir2.org
894383d75f New form of markTableSwitchCase that allows to mark a switch case jump target and adjust stack top. 2003-08-27 11:44:46 +00:00
igor%mir2.org
51bf324448 Added NativeFunction.initScriptFunction to initialize NativeFunction.argNames, NativeFunction.version and its usage in InterpretedFunction/InterpretedScript.
It will allow to make the protected fields in NativeFunction private when the optimizer will be updated to use the new function.
2003-08-26 18:06:10 +00:00
igor%mir2.org
2709c61a4d Using ScriptRuntime.emptyStrings to return emoty var array 2003-08-26 15:45:16 +00:00
igor%mir2.org
cb46fe1b41 Added public static final String[] emptyStrings to denote zero-length string array 2003-08-26 15:45:15 +00:00
igor%mir2.org
7d0e681b6a Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=217257 :
Patch from Larry Blair to fix decodeURIComponent()
2003-08-26 15:45:14 +00:00
igor%mir2.org
f9b335bf06 Making createObject public so optimizer implementation can access it outside BaseFunction subclass 2003-08-26 15:45:13 +00:00
igor%mir2.org
856b7cabb4 1. Support for generation tableswitch code
2. Utility method addLoadThis() as an alias for add(ByteCode.ALOAD_0)
2003-08-26 15:43:11 +00:00
igor%mir2.org
a803853242 Fixing line-table initialization issue: set itsLineNumberTableTop to 0 at the end of stopMethod so generation of multiple methods with source line information would work. 2003-08-22 09:10:14 +00:00
caillon%returnzero.com
f8e8aed8a7 Backing out the patch to bug 83536.
I will reland this when 1.6a re-opens.
r+sr=jst@netscape.com
a=chofmann
2003-08-22 03:06:53 +00:00
igor%mir2.org
9983fdb0e8 Cosmetics: removal of end-of-line blanks 2003-08-20 11:11:00 +00:00