hannes%helma.at
008b6e841e
Include testsrc/**.js and **.jstest files in distribution zip file.
...
git-svn-id: svn://10.0.0.236/trunk@262307 18797224-902f-48f8-a5cc-f745e15eee43
2011-05-10 09:52:49 +00:00
hannes%helma.at
bb3e33fbf2
Set prototype and parent scope for JavaAdapters extending ScriptableObject.
...
git-svn-id: svn://10.0.0.236/trunk@262228 18797224-902f-48f8-a5cc-f745e15eee43
2011-04-25 18:41:13 +00:00
hannes%helma.at
59010c8480
Fix JSON.parse() for negative index keys.
...
git-svn-id: svn://10.0.0.236/trunk@262207 18797224-902f-48f8-a5cc-f745e15eee43
2011-04-21 13:08:54 +00:00
hannes%helma.at
e536507734
Make JSON.parse use the same logic for property name to index conversion as object literals.
...
This fixes cases like JSON.parse('{"00": 1}') or JSON.parse('{" ": 1}') where the key should
not be converted to an index.
See http://groups.google.com/group/mozilla-rhino/browse_frm/thread/5350e704b40d761d
and bug #537483 .
git-svn-id: svn://10.0.0.236/trunk@262206 18797224-902f-48f8-a5cc-f745e15eee43
2011-04-21 11:38:57 +00:00
hannes%helma.at
fceb4c81d6
Enable location info in errors when shell is run with -debug flag.
...
git-svn-id: svn://10.0.0.236/trunk@262178 18797224-902f-48f8-a5cc-f745e15eee43
2011-04-12 08:09:46 +00:00
hannes%helma.at
c39cc02489
Bump version string to 1.7R3 (dropping the "prerelease")
...
git-svn-id: svn://10.0.0.236/trunk@262176 18797224-902f-48f8-a5cc-f745e15eee43
2011-04-10 08:05:52 +00:00
hannes%helma.at
295e5e7c89
Protect against endless loop caused by int overflow in ScriptableObject.readObject()
...
git-svn-id: svn://10.0.0.236/trunk@262170 18797224-902f-48f8-a5cc-f745e15eee43
2011-04-08 08:20:13 +00:00
hannes%helma.at
b031b2fb07
Recommitting file to hopefully get it fixed
...
git-svn-id: svn://10.0.0.236/trunk@262159 18797224-902f-48f8-a5cc-f745e15eee43
2011-04-07 23:33:11 +00:00
hannes%helma.at
b8e1e9134b
Removing file with bogus version.
...
git-svn-id: svn://10.0.0.236/trunk@262158 18797224-902f-48f8-a5cc-f745e15eee43
2011-04-07 23:32:08 +00:00
hannes%helma.at
f5b5d08de8
Move missing test file.
...
git-svn-id: svn://10.0.0.236/trunk@262154 18797224-902f-48f8-a5cc-f745e15eee43
2011-04-07 22:49:16 +00:00
hannes%helma.at
fca0c6e7c2
Move commonjs/module tests to o.m.j.tests, fix a few details to make sure they run properly
...
- Rename Java test classes from *Tests to *Test to match ant file pattern
- Update testRelativeId.js to no longer rely on module.id for relative require
- Convert to Unix line breaks
git-svn-id: svn://10.0.0.236/trunk@262150 18797224-902f-48f8-a5cc-f745e15eee43
2011-04-07 22:24:53 +00:00
hannes%helma.at
12fc8afce4
Move commonjs/module tests to o.m.j.tests, fix a few details to make sure they run properly
...
- Rename Java test classes from *Tests to *Test to match ant file pattern
- Update testRelativeId.js to no longer rely on module.id for relative require
- Convert to Unix line breaks
git-svn-id: svn://10.0.0.236/trunk@262149 18797224-902f-48f8-a5cc-f745e15eee43
2011-04-07 22:24:47 +00:00
hannes%helma.at
6d0873ebf8
Add CommonJS module options to Rhino shell.
...
git-svn-id: svn://10.0.0.236/trunk@262148 18797224-902f-48f8-a5cc-f745e15eee43
2011-04-07 20:33:07 +00:00
hannes%helma.at
f7eabe364b
Make CommonJS module implementation work with more real world code patterns.
...
This includes loading modules outside the module path, replacing the exports object
via module.exports, and lenient handling of module ids and file extensions.
git-svn-id: svn://10.0.0.236/trunk@262147 18797224-902f-48f8-a5cc-f745e15eee43
2011-04-07 20:26:12 +00:00
hannes%helma.at
d87aee83ba
Convert to Unix line breaks.
...
git-svn-id: svn://10.0.0.236/trunk@262128 18797224-902f-48f8-a5cc-f745e15eee43
2011-04-01 02:39:19 +00:00
hannes%helma.at
fe9e2e834d
Allow keywords as proeprty identifiers. Fixes bug 423557.
...
git-svn-id: svn://10.0.0.236/trunk@262118 18797224-902f-48f8-a5cc-f745e15eee43
2011-03-29 15:42:38 +00:00
hannes%helma.at
3558e35478
Allow use of reserved keywords as identifiers by default, following most modern JS engines.
...
git-svn-id: svn://10.0.0.236/trunk@262117 18797224-902f-48f8-a5cc-f745e15eee43
2011-03-29 15:17:49 +00:00
hannes%helma.at
200c84d364
Unify indentation + minor fixes
...
git-svn-id: svn://10.0.0.236/trunk@262094 18797224-902f-48f8-a5cc-f745e15eee43
2011-03-23 15:27:50 +00:00
hannes%helma.at
5cc9482804
Fix redundant slot fetching and possible NullPointerException in ScriptableObject.checkValidPropertyDefinition()
...
git-svn-id: svn://10.0.0.236/trunk@262093 18797224-902f-48f8-a5cc-f745e15eee43
2011-03-23 11:36:17 +00:00
hannes%helma.at
2b8bf99d0e
Improve regexp performance by avoiding conversion of input to char[].
...
git-svn-id: svn://10.0.0.236/trunk@262084 18797224-902f-48f8-a5cc-f745e15eee43
2011-03-21 20:12:29 +00:00
szegedia%freemail.hu
b0c299d777
Fix for source location in the error constructed by ScriptRuntime.throwError
...
git-svn-id: svn://10.0.0.236/trunk@262082 18797224-902f-48f8-a5cc-f745e15eee43
2011-03-21 02:40:23 +00:00
hannes%helma.at
693ca3d1af
Add serialVersionUID to TopLevel class
...
git-svn-id: svn://10.0.0.236/trunk@262057 18797224-902f-48f8-a5cc-f745e15eee43
2011-03-16 16:14:45 +00:00
hannes%helma.at
69c94fe002
Fix formatting
...
git-svn-id: svn://10.0.0.236/trunk@262035 18797224-902f-48f8-a5cc-f745e15eee43
2011-03-10 17:33:59 +00:00
hannes%helma.at
65fb232906
Optimize hash performance on empty slots query
...
git-svn-id: svn://10.0.0.236/trunk@262020 18797224-902f-48f8-a5cc-f745e15eee43
2011-03-09 00:00:55 +00:00
hannes%helma.at
a30f53ea1d
Significantly improve ScriptableObject hash performance
...
Changes include:
* Limit slot table size to powers of 2 so we can use bitwise and instead of modulo for index calculation
* Remove optimizations that don't carry their weight anymore such as cachingn of last accessed property slot
* Split up large methods like accessSlot, putImpl and getImpl into smaller pieces
git-svn-id: svn://10.0.0.236/trunk@262008 18797224-902f-48f8-a5cc-f745e15eee43
2011-03-06 21:44:41 +00:00
hannes%helma.at
23053eda13
Patch for bug 637587 - Functionality of built-in classes is exposed to changes in global object
...
This patch adds a new TopLevel class that extends IDScriptableObject and is
extended by ImporterTopLevel. TopLevel is meant to be used as top-level scope
and allows to cache built-in ECMAScript objects such as Object, Array,
Function, String etc.
The patch also adds two methods to ScriptRuntime called newBuiltinObject() and
setBuiltinProtoAndParent() that work similar to newObject() and
setObjectProtoAndParent() but directly access the cached built-ins in the
TopLevel scope.
If the top-level scope is not an instance of TopLevel or does not have its
built-in cache initialized, these methods will fall back to the old behaviour.
git-svn-id: svn://10.0.0.236/trunk@262006 18797224-902f-48f8-a5cc-f745e15eee43
2011-03-06 14:52:54 +00:00
hannes%helma.at
93cf9270e2
Fix bug 630111 - Codegen optimizer fails with Unsupported major.minor version 0.0 on JDK7
...
git-svn-id: svn://10.0.0.236/trunk@261986 18797224-902f-48f8-a5cc-f745e15eee43
2011-03-01 23:13:30 +00:00
hannes%helma.at
b021039e1e
Fix Bug 531600 - "while(true) continue;" will never trigger observeInstructionCount
...
git-svn-id: svn://10.0.0.236/trunk@261968 18797224-902f-48f8-a5cc-f745e15eee43
2011-02-23 16:27:55 +00:00
hannes%helma.at
783fc1b6f0
Fix bug 520545 - ScriptableObject.defineClass fails if method is defined both static and non-static
...
git-svn-id: svn://10.0.0.236/trunk@261967 18797224-902f-48f8-a5cc-f745e15eee43
2011-02-23 14:58:22 +00:00
hannes%helma.at
65ed47423b
Fix Bug 565361 - VariableDeclaration toSource missing semicolon
...
git-svn-id: svn://10.0.0.236/trunk@261966 18797224-902f-48f8-a5cc-f745e15eee43
2011-02-23 14:23:57 +00:00
hannes%helma.at
b79684fcd7
Include test file name in failed Mozilla test suite tests.
...
git-svn-id: svn://10.0.0.236/trunk@261959 18797224-902f-48f8-a5cc-f745e15eee43
2011-02-22 15:45:39 +00:00
hannes%helma.at
f80d9f4f56
Add LRU cache for compiled scripts to the shell's load() function
...
This helps a lot with tests and benchmarks, and generally should help
all applications where scripts are loaded repeatedly. The cache is
limited to 32 entries and uses MD5 hashes to detect updated scripts.
git-svn-id: svn://10.0.0.236/trunk@261911 18797224-902f-48f8-a5cc-f745e15eee43
2011-02-10 20:50:07 +00:00
hannes%helma.at
304caacf15
Fix strange interpreter performance regression introduced in rev. 1.357 of Interpreter.java ("More progress on strict mode").
...
The problem was extremely visible in V8-benchmark where score was reduced to roughly a 30% by the introduction of STRICT_SETNAME handling with Sun Java 1.6.0_22-b04 HotSpot Server VM. I think handling STRICT_SETNAME using the ScriptRuntime method in Interpreter is also more consistent.
git-svn-id: svn://10.0.0.236/trunk@261907 18797224-902f-48f8-a5cc-f745e15eee43
2011-02-09 10:55:42 +00:00
hannes%helma.at
98a5b5f846
Fix for bug 619296 - Java class wrapping not customizable via WrapFactory
...
This adds a wrapJavaClass() method to WrapFactory that can be overridden
to use something other than NativeJavaClass as java class wrapper.
git-svn-id: svn://10.0.0.236/trunk@261672 18797224-902f-48f8-a5cc-f745e15eee43
2010-12-16 11:08:05 +00:00
hannes%helma.at
f451f9c462
Print test file name in ShellTest error message.
...
git-svn-id: svn://10.0.0.236/trunk@261658 18797224-902f-48f8-a5cc-f745e15eee43
2010-12-15 10:21:22 +00:00
hannes%helma.at
b78eb4b603
Undo previous commit(s). Since bytecode is passed in as argument and the method is public, this constitutes a huge security flaw.
...
git-svn-id: svn://10.0.0.236/trunk@261650 18797224-902f-48f8-a5cc-f745e15eee43
2010-12-12 00:35:00 +00:00
hannes%helma.at
45438af85f
Reformat previous commit
...
git-svn-id: svn://10.0.0.236/trunk@261649 18797224-902f-48f8-a5cc-f745e15eee43
2010-12-11 18:02:03 +00:00
hannes%helma.at
ee76cb1f95
Use privileged action for script instantiation for script classes that don't have the required privileges (e.g. declared member access)
...
git-svn-id: svn://10.0.0.236/trunk@261648 18797224-902f-48f8-a5cc-f745e15eee43
2010-12-11 17:44:32 +00:00
hannes%helma.at
3a6202af86
Fix bug 614668 - Function expression binding takes precedence over local bindings
...
git-svn-id: svn://10.0.0.236/trunk@261596 18797224-902f-48f8-a5cc-f745e15eee43
2010-11-24 22:14:09 +00:00
hannes%helma.at
ac204c2508
Fix bug 568224 - handle "debugger" keyword in decompiler
...
git-svn-id: svn://10.0.0.236/trunk@261595 18797224-902f-48f8-a5cc-f745e15eee43
2010-11-24 21:19:01 +00:00
hannes%helma.at
6ec33d9ff5
Allow thisArg to be null or undefined in Function.prototype.bind()
...
git-svn-id: svn://10.0.0.236/trunk@261594 18797224-902f-48f8-a5cc-f745e15eee43
2010-11-24 20:45:53 +00:00
hannes%helma.at
322e5de1b6
Don't force interpreter mode in Rhino shell, JVM problems with class GC should belong to the path
...
git-svn-id: svn://10.0.0.236/trunk@261545 18797224-902f-48f8-a5cc-f745e15eee43
2010-11-10 15:34:35 +00:00
hannes%helma.at
5ba725fe07
Fix minor Javadoc issue Intellij complains about
...
git-svn-id: svn://10.0.0.236/trunk@261544 18797224-902f-48f8-a5cc-f745e15eee43
2010-11-10 15:30:09 +00:00
hannes%helma.at
288347c8f2
Replace tabs with spaces, plus some reformatting
...
git-svn-id: svn://10.0.0.236/trunk@261538 18797224-902f-48f8-a5cc-f745e15eee43
2010-11-09 11:54:56 +00:00
hannes%helma.at
57a86133d2
Add includeAntRuntime="false" attributes in javac tasks
...
git-svn-id: svn://10.0.0.236/trunk@261537 18797224-902f-48f8-a5cc-f745e15eee43
2010-11-09 10:56:15 +00:00
hannes%helma.at
a2ab36ada0
Do not append \n at beginning of constructed function
...
git-svn-id: svn://10.0.0.236/trunk@261357 18797224-902f-48f8-a5cc-f745e15eee43
2010-10-06 07:29:26 +00:00
hannes%helma.at
9a2539c149
Minor enhancement in ListIterator test
...
git-svn-id: svn://10.0.0.236/trunk@261355 18797224-902f-48f8-a5cc-f745e15eee43
2010-10-05 21:06:51 +00:00
hannes%helma.at
edb25c5b23
Fix bug 466207 - Implement java.util.List interface in NativeArray
...
This moves the implementation of java.util.Map from ScriptableObject
to NativeObject as Map and List have incompatible remove(Object) methods.
See bug 448816 for more details.
git-svn-id: svn://10.0.0.236/trunk@261354 18797224-902f-48f8-a5cc-f745e15eee43
2010-10-05 20:31:54 +00:00
hannes%helma.at
75fa19ac96
Fix Bug 598706 - Make some RegExpImpl fields protected
...
git-svn-id: svn://10.0.0.236/trunk@261320 18797224-902f-48f8-a5cc-f745e15eee43
2010-10-02 19:43:23 +00:00
hannes%helma.at
a43d99d7ff
Fix Bug 600479 - SyntaxError with new Function('return true//')
...
git-svn-id: svn://10.0.0.236/trunk@261317 18797224-902f-48f8-a5cc-f745e15eee43
2010-10-02 18:57:31 +00:00