Commit Graph

15988 Commits

Author SHA1 Message Date
Marcus Lagergren
af9c882b95 8008206: The allInteger case for SwitchNode generation in CodeGenerator assumes integer LITERALS only
Reviewed-by: sundar, jlaskey
2013-02-14 13:52:12 +01:00
Attila Szegedi
82f8cef55c 8008085: Integrate Dynalink source code into Nashorn codebase
Reviewed-by: jlaskey, lagergren, sundar
2013-02-14 13:22:26 +01:00
Marcus Lagergren
7c466c84eb 8008199: Lazy compilation and trampoline implementation
The code pipeline now supports lazy compilation, which can be used to only compile certain FunctionNodes and leave others be, saving startup time. When these uncompiled nodes are hit, a trampoline will force them to be recompiled. This can also be used to specialize compilation fixing parameter types and return types to a callsite specific compilation. This will give performance.

Reviewed-by: attila, sundar
2013-02-14 13:01:52 +01:00
Athijegannathan Sundararajan
022533a749 8008197: Cross script engine function calls do not work as expected
Reviewed-by: lagergren, hannesw
2013-02-14 14:16:58 +05:30
Athijegannathan Sundararajan
9f6e3f08f2 8008193: test262 tests should be run with security manager enabled
Reviewed-by: jlaskey
2013-02-14 09:14:31 +05:30
Athijegannathan Sundararajan
ecc2be22e3 8008103: Source object should maintain URL of the script source as a private field
Reviewed-by: lagergren, jlaskey
2013-02-13 19:59:30 +05:30
Hannes Wallnöfer
b8d10c0a0e 8008096: TokenStream buffer should grow exponentially
Reviewed-by: attila, lagergren, sundar
2013-02-13 13:30:21 +01:00
Attila Szegedi
d50e3823e4 8007900: Function binding is inefficient
Reviewed-by: jlaskey, lagergren
2013-02-12 12:47:51 +01:00
Hannes Wallnöfer
b98a77d26c 8007956: Wrong or obsolete system properties in docs/DEVELOPER_README
Reviewed-by: attila, jlaskey
2013-02-12 13:55:05 +01:00
Athijegannathan Sundararajan
1e1537c13f 8007915: Nashorn IR, codegen, parser packages and Context instance should be inaccessible to user code
Reviewed-by: lagergren, jlaskey, attila
2013-02-11 21:26:06 +05:30
Attila Szegedi
710f06674d 8006943: Fix order of function method arguments to be (callee, thisObject)
Reviewed-by: jlaskey, lagergren
2013-02-09 16:58:48 +01:00
James Laskey
32d71c7cb9 8006222: Move slot from SpillProperty to Property
Reviewed-by: hannesw, lagergren
2013-02-08 09:19:38 -04:00
Hannes Wallnöfer
f2dc010c16 8007718: Make static RegExp properties fully compatible to other engines
Reviewed-by: lagergren, sundar
2013-02-07 15:33:17 +01:00
Hannes Wallnöfer
37905fb387 8007627: Support @Getter annotation on constructor
Reviewed-by: attila, lagergren
2013-02-07 14:58:41 +01:00
Athijegannathan Sundararajan
b247ddfcc3 8007715: Make sure that not all tests run with AllPermission
Reviewed-by: lagergren, attila
2013-02-07 17:17:29 +05:30
James Laskey
57ef7ce075 8007643: Add testing for quit and exit
Reviewed-by: sundar
2013-02-06 12:51:09 -04:00
James Laskey
574016d0d3 8007629: Remove extraneous quit from shell.js
Reviewed-by: sundar, hannesw
2013-02-06 11:57:51 -04:00
James Laskey
5900e641b0 8007545: jjs input evalinput need to be NOT_ENUMERABLE
Reviewed-by: sundar, lagergren
2013-02-06 08:42:19 -04:00
Athijegannathan Sundararajan
c95d492268 8007619: Add support for deprecated properties of RegExp constructor
Reviewed-by: lagergren, hannesw
2013-02-06 17:56:12 +05:30
Hannes Wallnöfer
4eee363f14 8007273: Creation of ScriptFunctions can be refactored
Reviewed-by: lagergren, attila
2013-02-06 10:31:58 +01:00
Athijegannathan Sundararajan
292a819b53 8007523: VerifyError on script that uses regular expression literals with ternary operator
Reviewed-by: lagergren
2013-02-05 22:07:04 +05:30
Athijegannathan Sundararajan
ac9ca521ad 8007522: IllegalStateException thrown from String.prototype.search function
Reviewed-by: jlaskey
2013-02-05 21:00:04 +05:30
Athijegannathan Sundararajan
be500502ec 8007521: $ENV should be undefined when security manager is present
Reviewed-by: hannesw, jlaskey
2013-02-05 18:44:54 +05:30
Athijegannathan Sundararajan
31aa060b11 8007452: add scripting programmers doc changes for nashorn
Reviewed-by: jlaskey, hannesw
2013-02-05 09:11:03 +05:30
James Laskey
233a9042cf 8006191: cmd -> exec("cmd") in script mode
Reviewed-by: sundar, lagergren, hannesw
2013-02-04 14:48:35 -04:00
Marcus Lagergren
8b7a8d75b3 8007215: Varargs broken for the case of passing more than the arg limit arguments
Reviewed-by: jlaskey, attila
2013-02-04 16:20:05 +01:00
Attila Szegedi
bd2303d9e4 8007460: var assignment to a parameter in a varargs method causes compilation error
Reviewed-by: jlaskey, lagergren
2013-02-04 15:59:44 +01:00
James Laskey
58f1fb6ecd 8007455: Extraneous $(ECHO) in make/Makefile
Reviewed-by: sundar
2013-02-04 08:13:05 -04:00
Hannes Wallnöfer
4f2891ca8d 8007060: Primitive wrap filter throws ClassCastException in test262parallel
Reviewed-by: sundar, jlaskey, lagergren
2013-02-01 02:24:15 +01:00
Attila Szegedi
fe52eb5992 8006529: Methods always get callee - it should be conditional
This commit streamlines the bytecode function signatures, prologue, local variable use, scope creation, and invocation. It started out quite innocently when we noticed that we always emit __callee__ parameters for all functions even when they are not needed, but it turned out to be quite a deep rabbit hole. In the end, I identified exact conditions when functions need to have a callee parameter, when they need to receive parent scope, when they need to create their own scope, when they need to have variable arity signature, and when they need to have an "arguments" object, and made sure that callee parameters in signatures only show up when they are needed, that parent function's scope is only passed to a child function when it is needed, that the function only creates its own scope when it is needed. In crypto.js, the number of scopes dropped from 446 to 244, and the number of callees dropped from 315 to 145.

Reviewed-by: jlaskey, lagergren
2013-01-31 18:34:42 +01:00
Athijegannathan Sundararajan
bdcffc23f7 8007286: Add JavaAdapter and importPackage to compatibility script
Reviewed-by: lagergren, jlaskey
2013-01-31 20:07:40 +05:30
Athijegannathan Sundararajan
fcd28bdcc5 8007140: Java.extend crashes when attempting to extend java.lang.Object
Reviewed-by: lagergren, hannesw
2013-01-30 21:15:14 +05:30
Hannes Wallnöfer
411b70d54a 8007109: Regression: String(ConsString) does not flatten argument to String
Reviewed-by: sundar, lagergren
2013-01-30 14:57:19 +01:00
Athijegannathan Sundararajan
8cd63a75f2 8007132: Java objects returned from constructor functions are lost
Reviewed-by: hannesw, lagergren, attila
2013-01-30 17:52:54 +05:30
Marcus Lagergren
30b950d2d2 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes
Lower suffered from being a "God class" trying to do everything at once.  As Nashorn code generation has grown, so has Lower. It does several post processing passes, tries to do several things at once even though all type information isn't in place, adjusting state afterwards and so on. It also performs control flow analysis, type attribution and constant folding, and  everything else code generation related before byte code emission. I have now separated the compilation process into Lower (create low level nodes from high level ones, copy code such as finally block inlining etc), Attr (assign types and symbols to all nodes - freeze slot and scope information) and FinalizeTypes (insert explicit casts, specialize invoke dynamic types for scope accesses). I've removed the kludgy AccessSpecializer, as this now integrates naturally with typing. Everything is now much easier to read and each module performs only one thing. I have added separate loggers for the separate tiers. In the process I have also fixed: (1) problems with type coercion (see test/script/basic/typecoercion.js, basically our coercion was too late and our symbol inference was erroneous. This only manifested itself in very rare occasions where toNumber coercion has side effects, such as for example when valueOf is overridden)  (2) copying literal nodes (literal copy did not use the superclass copy, which made all the Node specific fields not to be copied  (3) erroneous literal tokenization (literals shouldn't always just inherit token information from whatever node that creates them) (4) splitter weighnodes - unary nodes were considered weightless  (4) removed the hateful and kludgy "VarNode.shouldAppend", which really isn't needed when we have an attribution phase that determines self reference symbols (the only thing it was used for) (5) duplicate line number issues in the parser (6) convert bug in CodeGenerator for intermediate results of scope accesses (see test/script/basic/access-specializer.js) ... Several of these things just stopped being problems with the new architecture "can't happen anymore" and are not bug fixes per se. All tests run. No performance regressions exist that I've been able to measure. Some increases in performance were measured, but in the statistical margin of error (which is very wide as HotSpot currently has warmup issues with LambdaForms/invoke dynamic). Compile speed has not measurably increased.

Reviewed-by: jlaskey, attila
2013-01-30 12:26:45 +01:00
James Laskey
b342e3c536 8007094: Apply version to nashorn.jar manifest
Reviewed-by: sundar
2013-01-29 14:25:39 -04:00
Athijegannathan Sundararajan
ae80adfc10 8007091: Provide private API to pass application class loader for nashorn script engine
Reviewed-by: jlaskey, lagergren
2013-01-29 19:57:25 +05:30
James Laskey
0b9014a9d6 8006676: Integrate Nashorn into new build system
Reviewed-by: jlaskey
2013-01-28 16:22:03 -04:00
Athijegannathan Sundararajan
97a071dc3d 8007004: nashorn script engine should not use thread context class loader as script 'application loader'
Reviewed-by: attila, hannesw
2013-01-28 21:29:05 +05:30
Athijegannathan Sundararajan
daaeb20eff 8006983: Introduce a command line option to switch off syntactic extensions of nashorn
Reviewed-by: lagergren, attila
2013-01-28 18:10:16 +05:30
Hannes Wallnöfer
327a6cf1b7 8006766: Array-like access to characters of a string is slow
Reviewed-by: lagergren, attila
2013-01-25 17:35:31 +01:00
Athijegannathan Sundararajan
5231fef61c 8006857: ClassCastException when interface implementing function uses arguments object
Reviewed-by: jlaskey, lagergren
2013-01-24 22:38:58 +05:30
James Laskey
c2bdb49b75 8006852: Move tests from JIRA for prepopulated map failures
Reviewed-by: sundar
2013-01-24 12:15:29 -04:00
Hannes Wallnöfer
d9ecc2ea0c 8006408: Clean up and specialize NativeString
Reviewed-by: jlaskey, lagergren
2013-01-24 14:55:57 +01:00
Athijegannathan Sundararajan
d3f071dc73 8006755: Functions inside with statements dont get correct scope
Reviewed-by: lagergren, attila
2013-01-24 17:49:03 +05:30
Athijegannathan Sundararajan
67db0ba236 8006575: Error in codegen for element access on primitive value
Reviewed-by: hannesw, lagergren
2013-01-24 16:21:32 +05:30
Athijegannathan Sundararajan
4135674f92 8006736: nashorn script engine should support the usage multiple global objects with same engine instance
Reviewed-by: lagergren, jlaskey, hannesw
2013-01-23 17:04:02 +05:30
Athijegannathan Sundararajan
7014b0cced 8006678: Avoid too many Context.getGlobal() calls
Reviewed-by: lagergren, jlaskey
2013-01-22 22:07:12 +05:30
Attila Szegedi
245ec829ff 8006677: Remove unused FunctionNode flags
Reviewed-by: hannesw, jlaskey
2013-01-22 14:36:28 +01:00
Hannes Wallnöfer
739b531642 8006570: This-value for non-strict functions should be converted to object
Reviewed-by: jlaskey, lagergren, attila
2013-01-22 14:14:37 +01:00