igor%mir2.org
134428fef2
1. optimizer/Codegen now just generates byte code classes, the instantiation of classes is done in a separated class optimizer/ClassCompiler. This is done to provide in future a simple interface to generate class files instead of complicated ClassNameHelper and friends implementation.
...
2. Parser now stores TokenStream instance in its field instead of having it present in each and every method signature. It allowed to simplify interaction between Parser and IRFactory where the later now uses Parser.reportError so parser van recover from syntax errors and provide better error reporting.
2004-01-16 18:20:22 +00:00
igor%mir2.org
0fc143dd7c
Added setters for properties of CompilerEnvirons.java so it can be initialized
...
without having Context object.
2004-01-16 16:09:07 +00:00
igor%mir2.org
34ebe5f4c1
Renaming Context.hrowAsUncheckedException to Context.throwAsScriptRuntimeEx to better reflect its purpose, providing better documentation and making sure it throws only instances of EcmaError and EvaluatorException.
2004-01-16 15:14:25 +00:00
igor%mir2.org
497a0f766c
Fixing bug 228336 :
...
This is a Rhino version of Brandan's patch from attachment 138844, bug 228087
plus code to fix overflow problem reported in bug 230216.
2004-01-16 15:11:31 +00:00
igor%mir2.org
a7050e5460
throwAsUncheckedException is moved from ScriptRuntime to Context as a useful API to use in external applications.
2004-01-15 20:41:57 +00:00
igor%mir2.org
f26418ea3f
Fixing typo in comments
2004-01-15 20:40:56 +00:00
igor%mir2.org
96ea5ea515
Patch from Alex Bitney to fix bug 230883
2004-01-15 20:10:54 +00:00
igor%mir2.org
59ae0034a1
Fixing bug 229571 : code refactoring for speed optimization
2004-01-06 13:35:51 +00:00
igor%mir2.org
332cc13ae5
Move details of parsing/code generation from Context to interpreter/optimizer to allow more pluggable compilation interface.
2004-01-05 13:22:40 +00:00
igor%mir2.org
75d4dec8ea
Cosmetics: removal of tabs left by the previous commit
2003-12-27 21:36:00 +00:00
igor%mir2.org
3cab5b3e26
Decompling parsing from code generation: compiler instances are created only when parsing tree is build.
2003-12-27 21:32:35 +00:00
igor%mir2.org
44e703307d
Initial patch to separate parsing from code generation: changing IRFactory so it can be created in Context.
2003-12-27 09:53:57 +00:00
igor%mir2.org
d4590c48fa
Renaming Kit.badArg() -> Kit.argBug() for consistency with Kit.codeBug()
2003-12-27 09:38:57 +00:00
igor%mir2.org
65aea23579
Moving parsing code from FunctionNode.finishParsing to IRFactory to have better overview of parsing code. The optimizer now calls explicitly OptFunctionNode initialization instead of overriding FunctionNode.finishParsing in OptFunctionNode.
2003-12-26 17:17:21 +00:00
igor%mir2.org
10e91b97ff
Functions to report synatx errors are moved from TokenStream to Interpreter to remove dependancy on TokenStream in NodeTransformer.
2003-12-26 14:01:21 +00:00
igor%mir2.org
32ebb1d38d
Dropping scope argument from Context.compileString/compileReader since it is no longer used as Script instances are scope independent.
...
For compatibility the old form of Context.compileReader is preserved but marked as deprecated.
2003-12-25 22:37:57 +00:00
nboyd%atg.com
8390b6a651
Contribution from earestea@scanpak.com.
2003-12-18 20:55:30 +00:00
nboyd%atg.com
3384c4c1f5
Add Aviva info.
2003-12-18 16:53:32 +00:00
igor%mir2.org
d7a98d84dc
Message about overcapacity
2003-12-09 19:23:25 +00:00
igor%mir2.org
aeafac2fcf
Cosmetics: removal of tabs
2003-12-09 19:22:58 +00:00
igor%mir2.org
6625e3229d
To avoid bad performance when joining array with few small strings, js_join precalculate the resulting string size.
2003-12-09 19:22:11 +00:00
igor%mir2.org
f53203c746
Replacing custom buffer management in replace code with the standard StringBuffer
2003-12-08 17:10:23 +00:00
igor%mir2.org
528efdfe62
Inlining LabelTable into Interpreter and ClassFileWriter: to support jumps spanning over 64K in Interpreter in future LabelTable should be modified significantly and complexity of shared code would not justify it. In addition such inlining actually decrese total code size.
2003-12-08 14:16:53 +00:00
igor%mir2.org
44fae2ad68
Merger ReplaceData and MatchData helper classes into GlobData to reduce code size and rename helper methods to follow SpiderMonkey closely.
2003-12-08 13:24:49 +00:00
igor%mir2.org
aed233007b
Fixing missed cleanup of old values stored in RegExpImpl.parens: now it has type SubString[] and reinitialized after running regexps and see bug 220367.
2003-12-07 21:56:29 +00:00
igor%mir2.org
dcd6522b88
Patch to fix bug 223451 :
...
Check for unbalanced ) and fix for ArrayIndexOutOfBoundsException
Check for unbalanced ')' is done differently then in SM since rhino uses
recursive version of SM code while fix for ArrayIndexOutOfBoundsException is
just a variation of my patch for bug 227705 in SM.
2003-12-07 16:00:38 +00:00
igor%mir2.org
21f15557ab
Fixing bug 225926 : patch from Roger Lawrence
2003-12-07 15:35:40 +00:00
igor%mir2.org
c97a96edca
Fixing bug 225366 : port of SM patch
2003-12-05 23:22:10 +00:00
igor%mir2.org
449bf5eadc
In Object.toSource implementation if property is not valid Java identifier, print it as 'escaped_property' so the property will read as proper Java string.
2003-12-04 15:47:03 +00:00
igor%mir2.org
b1ba2b408e
Fixing bug 225831 : use before_225831_merge to get code before the far reaching fix
2003-12-04 14:41:22 +00:00
igor%mir2.org
2997e9f7ee
Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=226045 :
...
(new RegExp).toString/toSource() now gives /(?:)/ instead of // which is comments and does not work with uneval.
2003-11-24 15:51:44 +00:00
igor%mir2.org
46e97e6ab7
Fixing debug printout of icode: CALLSPECIAL prinout was not updated to reflect proper value of only 6 additional bytes for bytecode.
2003-11-17 18:31:55 +00:00
igor%mir2.org
a9bb9a44ac
To mark special properties __proto__ and __parent__ in parse tree use integer ids instead of strings so it is easier to check tree consitency.
2003-11-17 17:39:43 +00:00
igor%mir2.org
cbacb923d3
Finalizing toSource() support: do not put () arround {} for source representation of objects that are part of recursive toSource call.
...
For details, see http://bugzilla.mozilla.org/show_bug.cgi?id=225465
2003-11-17 17:37:21 +00:00
igor%mir2.org
02c0cb7a89
Changing wrapping of caught Java exceptions: now they are constructed with JavaException constructor, have fileName, lineNumber defined to point to script line that executed Java code triggering exception and have javaException property pointing to the wrapped exception object.
...
For details, see http://bugzilla.mozilla.org/show_bug.cgi?id=225817
2003-11-17 11:04:29 +00:00
igor%mir2.org
834efdbe71
Fixing http://bugzilla.mozilla.org/show_bug.cgi?id=225817 :
...
Proper support for fileName and lineNumber in Error objects.
2003-11-17 09:45:01 +00:00
igor%mir2.org
7c4e5d8424
Allow for scripts to catch instances of EvaluatorException
2003-11-14 20:38:06 +00:00
igor%mir2.org
8e546b9047
Transform StackOverflow during parsing into runtime exception so script can detect too deep recursion during parsing.
2003-11-14 20:33:43 +00:00
igor%mir2.org
7c0cff6574
Splitting Token.ASSIGN into Token.ASSIGN and Token.ASSIGNOP where the former represents only = while ASSIGNOP is used to denote +=, -= etc. Parse tree for the 2 operations is rather different and split allowed to simplify IRFactory code.
2003-11-14 16:03:31 +00:00
igor%mir2.org
2e75448c13
Implementing uneval/toSource functionality of SpiderMonkey. Foe details, see http://bugzilla.mozilla.org/show_bug.cgi?id=225465 .
2003-11-13 17:15:31 +00:00
igor%mir2.org
7d1e5eda47
Passing to decompiler information about function type so it can use it to customize its output in future.
2003-11-12 15:47:50 +00:00
igor%mir2.org
f2ba87fed2
Changing Decompiler.decompile to take just encoded source, flag argument controlling output format and property table so it would be possible to add more options to decompiler without changing the rest of code.
2003-11-12 12:22:12 +00:00
igor%mir2.org
e734cecce2
Changing return type of NativeFunction.getEncodedSource() to String from Object since the idea of having anything else but String would require changes in API in any case.
2003-11-12 10:23:53 +00:00
igor%mir2.org
b7d4dfaa28
In ClassFileWriter.addPush(double) use DNEG to generate more compact code for -0.0 and -1.0
2003-11-11 20:31:36 +00:00
igor%mir2.org
f260baaf11
Changing just introduced CodeBlock into Callable that define call method with exactly the same signature as Function.call and changing Function to extend Callable.
...
Now Context defines new method "call" that provide optimized version of the following code:
Context cx = Context.enter()
try {
callable.call(cx, scope, thisObj, args);
} finally {
Context.exit();
}
Since Function extends Callable, it can be passed to this method directly thus simplifying ScriptableObject.call method and Java adapter code.
The new interface is used in SecurityController implementation which allows to pass interpreted functions there directly as well removing the need to have intermediate class in Interpreter.
2003-11-11 20:30:08 +00:00
igor%mir2.org
dd1efd374f
Extend constant folding to cover few unary operations
2003-11-11 20:18:34 +00:00
igor%mir2.org
12c1d23434
1. Make sure that -0.0 from parser are treated properly: new constant folding code there may produce it.
...
2. Instead of generating code to call Double constructor use the new method OptRuntime.wrapDouble() that allows to cut amount of produced byte code.
2003-11-11 20:04:38 +00:00
igor%mir2.org
8313023fae
Patch from Dave Russo to wrap arguments array properly: the code has to allocate new Object[] array since Context.newObject needs instances of Object[], not SomeObjectSubclass[], to work properly.
2003-11-10 02:18:11 +00:00
igor%mir2.org
44c6535ad4
Check in Context.newArray(Scriptable scope, Object[] elements) that elements is instance of Object[] and not SomeObjectSubclass[] to expose broken usage of newArray as soon as possible.
2003-11-10 02:14:37 +00:00
igor%mir2.org
dc34ed3dc1
Changes in Security API: using CodeBlock interface instead of reusing Script to represent code that should be executed with different domain.
2003-11-07 22:29:59 +00:00