From cpettitt at linkedin.com Mon Jun 2 20:24:07 2014 From: cpettitt at linkedin.com (Chris Pettitt) Date: Mon, 2 Jun 2014 20:24:07 +0000 Subject: StringIndexOutOfBoundException in NativeRegExp.appendReplacement Message-ID: <8A9DFF013D0EBB439171DAF88E4C7EA96A355E8D@ESV4-MBX02.linkedin.biz> Hello, I believe I have found a bug in NativeRegExp.appendReplacement around handling of '$'. Per [1], A '$' in newstring that does not match one of the forms in Table 22 should be left as is. The appendReplacement function handles this correctly for most cases, but breaks with the following input: jjs> "a".replace("a", "$") java.lang.StringIndexOutOfBoundsException: String index out of range: 1 The problem is that appendReplacement assumes that a character will follow the '$' character: int cursor = 0; Object[] groups = null; while (cursor < replacement.length()) { char nextChar = replacement.charAt(cursor); if (nextChar == '$') { // Skip past $ cursor++; nextChar = replacement.charAt(cursor); // This line fails for the above input, there is no character as index 1. While the code should be using "$$" as a replacement text, the spec seems to indicate that "$" should work if no characters follow. I tested this with a few JS engines (node, chrome, firefox) and all handle this by replacing "a" with "$", which conforms to my reading of the spec. Thanks, Chris [1]: http://www.ecma-international.org/ecma-262/5.1/#sec-15.5.4.11 From sundararajan.athijegannathan at oracle.com Tue Jun 3 04:43:44 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Tue, 03 Jun 2014 10:13:44 +0530 Subject: RFR 8044520: Nashorn cannot execute node.js's express module Message-ID: <538D5280.70409@oracle.com> Please review. Webrev: http://cr.openjdk.java.net/~sundar/8044520/ Bug: https://bugs.openjdk.java.net/browse/JDK-8044520 Relevant sections of ES6 draft spec. are these: * [[SetPrototypeOf]] builtin https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ordinary-object-internal-methods-and-internal-slots-setprototypeof-v * Object.prototype.__proto__ special property: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-additional-properties-of-the-object.prototype-object * Object.setPrototypeOf function: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.setprototypeof * __proto__ property name in object initializers: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-__proto__-property-names-in-object-initializers PS. Hopefully, I won't have to do any more __proto__, setPrototypeOf fixes ;-) Thanks, -Sundar From sundararajan.athijegannathan at oracle.com Tue Jun 3 05:21:00 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Tue, 03 Jun 2014 10:51:00 +0530 Subject: StringIndexOutOfBoundException in NativeRegExp.appendReplacement In-Reply-To: <8A9DFF013D0EBB439171DAF88E4C7EA96A355E8D@ESV4-MBX02.linkedin.biz> References: <8A9DFF013D0EBB439171DAF88E4C7EA96A355E8D@ESV4-MBX02.linkedin.biz> Message-ID: <538D5B3C.5030405@oracle.com> Hi Chris, Thanks for reporting this issue. I've filed the following bug: https://bugs.openjdk.java.net/browse/JDK-8044612 Thanks, -Sundar On Tuesday 03 June 2014 01:54 AM, Chris Pettitt wrote: > Hello, > > I believe I have found a bug in NativeRegExp.appendReplacement around handling of '$'. Per [1], A '$' in newstring that does not match one of the forms in Table 22 should be left as is. The appendReplacement function handles this correctly for most cases, but breaks with the following input: > > jjs> "a".replace("a", "$") > java.lang.StringIndexOutOfBoundsException: String index out of range: 1 > > The problem is that appendReplacement assumes that a character will follow the '$' character: > > int cursor = 0; > Object[] groups = null; > > while (cursor < replacement.length()) { > char nextChar = replacement.charAt(cursor); > if (nextChar == '$') { > // Skip past $ > cursor++; > nextChar = replacement.charAt(cursor); // This line fails for the above input, there is no character as index 1. > > While the code should be using "$$" as a replacement text, the spec seems to indicate that "$" should work if no characters follow. I tested this with a few JS engines (node, chrome, firefox) and all handle this by replacing "a" with "$", which conforms to my reading of the spec. > > Thanks, > Chris > > > [1]: http://www.ecma-international.org/ecma-262/5.1/#sec-15.5.4.11 From sundararajan.athijegannathan at oracle.com Tue Jun 3 06:19:23 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Tue, 03 Jun 2014 11:49:23 +0530 Subject: RFR 8044612: StringIndexOutOfBoundException in NativeRegExp.appendReplacement Message-ID: <538D68EB.7090304@oracle.com> Please review http://cr.openjdk.java.net/~sundar/8044612/ Thanks, -Sundar From marcus.lagergren at oracle.com Tue Jun 3 08:39:50 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Tue, 3 Jun 2014 10:39:50 +0200 Subject: RFR 8044612: StringIndexOutOfBoundException in NativeRegExp.appendReplacement In-Reply-To: <538D68EB.7090304@oracle.com> References: <538D68EB.7090304@oracle.com> Message-ID: +1 On 03 Jun 2014, at 08:19, A. Sundararajan wrote: > Please review http://cr.openjdk.java.net/~sundar/8044612/ > > Thanks, > -Sundar From marcus.lagergren at oracle.com Tue Jun 3 08:39:59 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Tue, 3 Jun 2014 10:39:59 +0200 Subject: RFR 8044520: Nashorn cannot execute node.js's express module In-Reply-To: <538D5280.70409@oracle.com> References: <538D5280.70409@oracle.com> Message-ID: <07999D7D-EA55-46EC-8A71-5A93CE738612@oracle.com> +1 On 03 Jun 2014, at 06:43, A. Sundararajan wrote: > Please review. > > Webrev: http://cr.openjdk.java.net/~sundar/8044520/ > > Bug: https://bugs.openjdk.java.net/browse/JDK-8044520 > > Relevant sections of ES6 draft spec. are these: > > * [[SetPrototypeOf]] builtin > https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ordinary-object-internal-methods-and-internal-slots-setprototypeof-v > > * Object.prototype.__proto__ special property: > https://people.mozilla.org/~jorendorff/es6-draft.html#sec-additional-properties-of-the-object.prototype-object > > * Object.setPrototypeOf function: > https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.setprototypeof > > * __proto__ property name in object initializers: > https://people.mozilla.org/~jorendorff/es6-draft.html#sec-__proto__-property-names-in-object-initializers > > PS. Hopefully, I won't have to do any more __proto__, setPrototypeOf fixes ;-) > > Thanks, > -Sundar From attila.szegedi at oracle.com Tue Jun 3 09:33:48 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Tue, 3 Jun 2014 11:33:48 +0200 Subject: Review request for JDK-8044533 Message-ID: <3E5B784A-F772-46F2-A1C0-FF7ABB1DA620@oracle.com> Please review JDK-8044533 at for Thanks, Attila. From attila.szegedi at oracle.com Tue Jun 3 09:37:32 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Tue, 3 Jun 2014 11:37:32 +0200 Subject: Review request for JDK-8044534 Message-ID: <56395AB8-2D66-4004-BEEA-4C002C45D91C@oracle.com> Please review JDK-8044534 at for Thanks, Attila. From attila.szegedi at oracle.com Tue Jun 3 09:41:05 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Tue, 3 Jun 2014 11:41:05 +0200 Subject: Review request for JDK-8044518 Message-ID: Please review JDK-8044518 at for Thanks, Attila. From sundararajan.athijegannathan at oracle.com Tue Jun 3 09:42:01 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Tue, 03 Jun 2014 15:12:01 +0530 Subject: Review request for JDK-8044533 In-Reply-To: <3E5B784A-F772-46F2-A1C0-FF7ABB1DA620@oracle.com> References: <3E5B784A-F772-46F2-A1C0-FF7ABB1DA620@oracle.com> Message-ID: <538D9869.3020008@oracle.com> +1 On Tuesday 03 June 2014 03:03 PM, Attila Szegedi wrote: > Please review JDK-8044533 at for > > Thanks, > Attila. From sundararajan.athijegannathan at oracle.com Tue Jun 3 09:54:06 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Tue, 03 Jun 2014 15:24:06 +0530 Subject: Review request for JDK-8044534 In-Reply-To: <56395AB8-2D66-4004-BEEA-4C002C45D91C@oracle.com> References: <56395AB8-2D66-4004-BEEA-4C002C45D91C@oracle.com> Message-ID: <538D9B3E.1000106@oracle.com> +1 On Tuesday 03 June 2014 03:07 PM, Attila Szegedi wrote: > Please review JDK-8044534 at for > > Thanks, > Attila. From sundararajan.athijegannathan at oracle.com Tue Jun 3 09:55:34 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Tue, 03 Jun 2014 15:25:34 +0530 Subject: Review request for JDK-8044518 In-Reply-To: References: Message-ID: <538D9B96.20508@oracle.com> +1 On Tuesday 03 June 2014 03:11 PM, Attila Szegedi wrote: > Please review JDK-8044518 at for > > Thanks, > Attila. From sundararajan.athijegannathan at oracle.com Tue Jun 3 15:26:32 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Tue, 03 Jun 2014 20:56:32 +0530 Subject: RFR 8044647: sun/tools/jrunscript/jrunscriptTest.sh start failing: Output of jrunscript -l nashorn differ from expected output Message-ID: <538DE928.7090903@oracle.com> Hi, Please review http://cr.openjdk.java.net/~sundar/8044647/ Thanks, -Sundar From marcus.lagergren at oracle.com Tue Jun 3 15:30:32 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Tue, 3 Jun 2014 17:30:32 +0200 Subject: RFR 8044647: sun/tools/jrunscript/jrunscriptTest.sh start failing: Output of jrunscript -l nashorn differ from expected output In-Reply-To: <538DE928.7090903@oracle.com> References: <538DE928.7090903@oracle.com> Message-ID: +1 On 03 Jun 2014, at 17:26, A. Sundararajan wrote: > Hi, > > Please review http://cr.openjdk.java.net/~sundar/8044647/ > > Thanks, > -Sundar From james.laskey at oracle.com Tue Jun 3 15:31:41 2014 From: james.laskey at oracle.com (Jim Laskey (Oracle)) Date: Tue, 3 Jun 2014 12:31:41 -0300 Subject: RFR 8044647: sun/tools/jrunscript/jrunscriptTest.sh start failing: Output of jrunscript -l nashorn differ from expected output In-Reply-To: <538DE928.7090903@oracle.com> References: <538DE928.7090903@oracle.com> Message-ID: <3AE83045-20AC-4C58-B4C7-E11E6A225BA4@oracle.com> +1 On Jun 3, 2014, at 12:26 PM, A. Sundararajan wrote: > Hi, > > Please review http://cr.openjdk.java.net/~sundar/8044647/ > > Thanks, > -Sundar From cpettitt at linkedin.com Tue Jun 3 15:41:32 2014 From: cpettitt at linkedin.com (Chris Pettitt) Date: Tue, 3 Jun 2014 15:41:32 +0000 Subject: StringIndexOutOfBoundException in NativeRegExp.appendReplacement In-Reply-To: <8A9DFF013D0EBB439171DAF88E4C7EA96A355E8D@ESV4-MBX02.linkedin.biz> References: <8A9DFF013D0EBB439171DAF88E4C7EA96A355E8D@ESV4-MBX02.linkedin.biz> Message-ID: <8A9DFF013D0EBB439171DAF88E4C7EA96A3565FA@ESV4-MBX02.linkedin.biz> Hi Sundar, Thanks for the quick response on this issue. I saw that this is going into JDK 9. Is there any chance to get this into a JDK 8 update too? Thanks, Chris P.S. Sorry I did not reply to your original email. I was using digest for nashorn-dev, so I didn't have your email to respond to, but I've switched now. ________________________________________ From: Chris Pettitt Sent: Monday, June 02, 2014 13:24 To: nashorn-dev at openjdk.java.net Subject: StringIndexOutOfBoundException in NativeRegExp.appendReplacement Hello, I believe I have found a bug in NativeRegExp.appendReplacement around handling of '$'. Per [1], A '$' in newstring that does not match one of the forms in Table 22 should be left as is. The appendReplacement function handles this correctly for most cases, but breaks with the following input: jjs> "a".replace("a", "$") java.lang.StringIndexOutOfBoundsException: String index out of range: 1 The problem is that appendReplacement assumes that a character will follow the '$' character: int cursor = 0; Object[] groups = null; while (cursor < replacement.length()) { char nextChar = replacement.charAt(cursor); if (nextChar == '$') { // Skip past $ cursor++; nextChar = replacement.charAt(cursor); // This line fails for the above input, there is no character as index 1. While the code should be using "$$" as a replacement text, the spec seems to indicate that "$" should work if no characters follow. I tested this with a few JS engines (node, chrome, firefox) and all handle this by replacing "a" with "$", which conforms to my reading of the spec. Thanks, Chris [1]: http://www.ecma-international.org/ecma-262/5.1/#sec-15.5.4.11 From sundararajan.athijegannathan at oracle.com Tue Jun 3 15:47:55 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Tue, 03 Jun 2014 21:17:55 +0530 Subject: StringIndexOutOfBoundException in NativeRegExp.appendReplacement In-Reply-To: <8A9DFF013D0EBB439171DAF88E4C7EA96A3565FA@ESV4-MBX02.linkedin.biz> References: <8A9DFF013D0EBB439171DAF88E4C7EA96A355E8D@ESV4-MBX02.linkedin.biz> <8A9DFF013D0EBB439171DAF88E4C7EA96A3565FA@ESV4-MBX02.linkedin.biz> Message-ID: <538DEE2B.7020305@oracle.com> Hi Chris, Yes, it has been backported to 8 update. jdk9 commit : http://hg.openjdk.java.net/jdk9/dev/nashorn/rev/e445404a69f5 jdk8u-dev commit : http://hg.openjdk.java.net/jdk8u/jdk8u-dev/nashorn/rev/0005562330fa It should appear in the near future jdk8u20 builds Thanks, -Sundar On Tuesday 03 June 2014 09:11 PM, Chris Pettitt wrote: > Hi Sundar, > > Thanks for the quick response on this issue. I saw that this is going into JDK 9. Is there any chance to get this into a JDK 8 update too? > > Thanks, > Chris > > P.S. Sorry I did not reply to your original email. I was using digest for nashorn-dev, so I didn't have your email to respond to, but I've switched now. > > ________________________________________ > From: Chris Pettitt > Sent: Monday, June 02, 2014 13:24 > To: nashorn-dev at openjdk.java.net > Subject: StringIndexOutOfBoundException in NativeRegExp.appendReplacement > > Hello, > > I believe I have found a bug in NativeRegExp.appendReplacement around handling of '$'. Per [1], A '$' in newstring that does not match one of the forms in Table 22 should be left as is. The appendReplacement function handles this correctly for most cases, but breaks with the following input: > > jjs> "a".replace("a", "$") > java.lang.StringIndexOutOfBoundsException: String index out of range: 1 > > The problem is that appendReplacement assumes that a character will follow the '$' character: > > int cursor = 0; > Object[] groups = null; > > while (cursor < replacement.length()) { > char nextChar = replacement.charAt(cursor); > if (nextChar == '$') { > // Skip past $ > cursor++; > nextChar = replacement.charAt(cursor); // This line fails for the above input, there is no character as index 1. > > While the code should be using "$$" as a replacement text, the spec seems to indicate that "$" should work if no characters follow. I tested this with a few JS engines (node, chrome, firefox) and all handle this by replacing "a" with "$", which conforms to my reading of the spec. > > Thanks, > Chris > > > [1]: http://www.ecma-international.org/ecma-262/5.1/#sec-15.5.4.11 From tal.liron at threecrickets.com Tue Jun 3 18:20:59 2014 From: tal.liron at threecrickets.com (Tal Liron) Date: Wed, 04 Jun 2014 02:20:59 +0800 Subject: StringIndexOutOfBoundException in NativeRegExp.appendReplacement In-Reply-To: <538DEE2B.7020305@oracle.com> References: <8A9DFF013D0EBB439171DAF88E4C7EA96A355E8D@ESV4-MBX02.linkedin.biz> <8A9DFF013D0EBB439171DAF88E4C7EA96A3565FA@ESV4-MBX02.linkedin.biz> <538DEE2B.7020305@oracle.com> Message-ID: <538E120B.3090207@threecrickets.com> Should us JDK8 users test Nashorn using the jdk9 or the jdk8u repos? On 06/03/2014 11:47 PM, A. Sundararajan wrote: > Hi Chris, > > Yes, it has been backported to 8 update. > > jdk9 commit : > http://hg.openjdk.java.net/jdk9/dev/nashorn/rev/e445404a69f5 > jdk8u-dev commit : > http://hg.openjdk.java.net/jdk8u/jdk8u-dev/nashorn/rev/0005562330fa From sundararajan.athijegannathan at oracle.com Wed Jun 4 05:38:26 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Wed, 04 Jun 2014 11:08:26 +0530 Subject: RFR 8044750: megamorphic getter for scope objects does not call __noSuchProperty__ hook Message-ID: <538EB0D2.7030909@oracle.com> Please review http://cr.openjdk.java.net/~sundar/8044750/ Thanks -Sundar From sundararajan.athijegannathan at oracle.com Wed Jun 4 05:48:12 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Wed, 04 Jun 2014 11:18:12 +0530 Subject: StringIndexOutOfBoundException in NativeRegExp.appendReplacement In-Reply-To: <538E120B.3090207@threecrickets.com> References: <8A9DFF013D0EBB439171DAF88E4C7EA96A355E8D@ESV4-MBX02.linkedin.biz> <8A9DFF013D0EBB439171DAF88E4C7EA96A3565FA@ESV4-MBX02.linkedin.biz> <538DEE2B.7020305@oracle.com> <538E120B.3090207@threecrickets.com> Message-ID: <538EB31C.30001@oracle.com> Bug fixes are being backported to jdk8u-dev repo - new features in jdk9 may not be. Btw, you can drop nashorn.jar with -Djava.ext.dirs and test it with nashorn.jar from either repo. -Sundar On Tuesday 03 June 2014 11:50 PM, Tal Liron wrote: > Should us JDK8 users test Nashorn using the jdk9 or the jdk8u repos? > > On 06/03/2014 11:47 PM, A. Sundararajan wrote: >> Hi Chris, >> >> Yes, it has been backported to 8 update. >> >> jdk9 commit : >> http://hg.openjdk.java.net/jdk9/dev/nashorn/rev/e445404a69f5 >> jdk8u-dev commit : >> http://hg.openjdk.java.net/jdk8u/jdk8u-dev/nashorn/rev/0005562330fa > From kumar.x.srinivasan at oracle.com Tue Jun 3 15:49:15 2014 From: kumar.x.srinivasan at oracle.com (Kumar Srinivasan) Date: Tue, 03 Jun 2014 08:49:15 -0700 Subject: RFR 8044647: sun/tools/jrunscript/jrunscriptTest.sh start failing: Output of jrunscript -l nashorn differ from expected output In-Reply-To: <538DE928.7090903@oracle.com> References: <538DE928.7090903@oracle.com> Message-ID: <538DEE7B.3070904@oracle.com> Looks good. Kumar On 6/3/2014 8:26 AM, A. Sundararajan wrote: > Hi, > > Please review http://cr.openjdk.java.net/~sundar/8044647/ > > Thanks, > -Sundar From kumar.x.srinivasan at oracle.com Tue Jun 3 15:50:34 2014 From: kumar.x.srinivasan at oracle.com (Kumar Srinivasan) Date: Tue, 03 Jun 2014 08:50:34 -0700 Subject: RFR 8044647: sun/tools/jrunscript/jrunscriptTest.sh start failing: Output of jrunscript -l nashorn differ from expected output In-Reply-To: <538DEE7B.3070904@oracle.com> References: <538DE928.7090903@oracle.com> <538DEE7B.3070904@oracle.com> Message-ID: <538DEECA.5060909@oracle.com> don't forget to mark the bug with noreg-self. Kumar On 6/3/2014 8:49 AM, Kumar Srinivasan wrote: > Looks good. > > Kumar > > On 6/3/2014 8:26 AM, A. Sundararajan wrote: >> Hi, >> >> Please review http://cr.openjdk.java.net/~sundar/8044647/ >> >> Thanks, >> -Sundar > From marcus.lagergren at oracle.com Wed Jun 4 09:10:42 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Wed, 4 Jun 2014 11:10:42 +0200 Subject: RFR 8044750: megamorphic getter for scope objects does not call __noSuchProperty__ hook In-Reply-To: <538EB0D2.7030909@oracle.com> References: <538EB0D2.7030909@oracle.com> Message-ID: <6E317D32-A253-40BF-A862-B3FFAC7D75CE@oracle.com> Looks good! /M On 04 Jun 2014, at 07:38, A. Sundararajan wrote: > Please review http://cr.openjdk.java.net/~sundar/8044750/ > > Thanks > -Sundar From attila.szegedi at oracle.com Wed Jun 4 09:24:28 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Wed, 4 Jun 2014 11:24:28 +0200 Subject: RFR 8044750: megamorphic getter for scope objects does not call __noSuchProperty__ hook In-Reply-To: <538EB0D2.7030909@oracle.com> References: <538EB0D2.7030909@oracle.com> Message-ID: +1 On Jun 4, 2014, at 7:38 AM, A. Sundararajan wrote: > Please review http://cr.openjdk.java.net/~sundar/8044750/ > > Thanks > -Sundar From attila.szegedi at oracle.com Wed Jun 4 12:01:27 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Wed, 4 Jun 2014 14:01:27 +0200 Subject: Review request for JDK-8044502 Message-ID: Please review JDK-8044502 at for Thanks, Attila. From sundararajan.athijegannathan at oracle.com Wed Jun 4 12:12:22 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Wed, 04 Jun 2014 17:42:22 +0530 Subject: Review request for JDK-8044502 In-Reply-To: References: Message-ID: <538F0D26.8090507@oracle.com> +1 On Wednesday 04 June 2014 05:31 PM, Attila Szegedi wrote: > Please review JDK-8044502 at for > > Thanks, > Attila. From marcus.lagergren at oracle.com Wed Jun 4 12:32:16 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Wed, 4 Jun 2014 14:32:16 +0200 Subject: Review request for JDK-8044502 In-Reply-To: References: Message-ID: <450886F6-D7E0-489B-865B-D88BC4EF6F2E@oracle.com> +1 On 04 Jun 2014, at 14:01, Attila Szegedi wrote: > Please review JDK-8044502 at for > > Thanks, > Attila. From sundararajan.athijegannathan at oracle.com Wed Jun 4 12:58:40 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Wed, 04 Jun 2014 18:28:40 +0530 Subject: RFR 8044695: __stack__ becomes visible in Error properties Message-ID: <538F1800.5080905@oracle.com> Please review http://cr.openjdk.java.net/~sundar/8044695/ for https://bugs.openjdk.java.net/browse/JDK-8044695 -Sundar From james.laskey at oracle.com Wed Jun 4 13:01:09 2014 From: james.laskey at oracle.com (Jim Laskey (Oracle)) Date: Wed, 4 Jun 2014 10:01:09 -0300 Subject: RFR 8044695: __stack__ becomes visible in Error properties In-Reply-To: <538F1800.5080905@oracle.com> References: <538F1800.5080905@oracle.com> Message-ID: +1 On Jun 4, 2014, at 9:58 AM, A. Sundararajan wrote: > Please review http://cr.openjdk.java.net/~sundar/8044695/ for https://bugs.openjdk.java.net/browse/JDK-8044695 > > -Sundar From attila.szegedi at oracle.com Wed Jun 4 13:03:07 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Wed, 4 Jun 2014 15:03:07 +0200 Subject: RFR 8044695: __stack__ becomes visible in Error properties In-Reply-To: <538F1800.5080905@oracle.com> References: <538F1800.5080905@oracle.com> Message-ID: <1DF51736-5887-419F-95A7-54A0B2A0E481@oracle.com> +1 On Jun 4, 2014, at 2:58 PM, A. Sundararajan wrote: > Please review http://cr.openjdk.java.net/~sundar/8044695/ for https://bugs.openjdk.java.net/browse/JDK-8044695 > > -Sundar From attila.szegedi at oracle.com Wed Jun 4 15:23:33 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Wed, 4 Jun 2014 17:23:33 +0200 Subject: Review request for JDK-8044803 Message-ID: Please review JDK-8044803 at for Thanks, Attila. From attila.szegedi at oracle.com Wed Jun 4 15:23:35 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Wed, 4 Jun 2014 17:23:35 +0200 Subject: Review request for JDK-8044816 Message-ID: <9E7BCD82-902F-4A9C-8471-92281630446E@oracle.com> Please review JDK-8044816 at for Thanks, Attila. From attila.szegedi at oracle.com Wed Jun 4 15:23:40 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Wed, 4 Jun 2014 17:23:40 +0200 Subject: Review request for JDK-8038413 Message-ID: Please review JDK-8038413 at for Thanks, Attila. From james.laskey at oracle.com Wed Jun 4 15:28:47 2014 From: james.laskey at oracle.com (Jim Laskey (Oracle)) Date: Wed, 4 Jun 2014 12:28:47 -0300 Subject: Review request for JDK-8044803 In-Reply-To: References: Message-ID: +1 On Jun 4, 2014, at 12:23 PM, Attila Szegedi wrote: > Please review JDK-8044803 at for > > Thanks, > Attila. From james.laskey at oracle.com Wed Jun 4 15:28:58 2014 From: james.laskey at oracle.com (Jim Laskey (Oracle)) Date: Wed, 4 Jun 2014 12:28:58 -0300 Subject: Review request for JDK-8044816 In-Reply-To: <9E7BCD82-902F-4A9C-8471-92281630446E@oracle.com> References: <9E7BCD82-902F-4A9C-8471-92281630446E@oracle.com> Message-ID: <0A990145-B279-46A3-8C37-D4499E324F33@oracle.com> +1 On Jun 4, 2014, at 12:23 PM, Attila Szegedi wrote: > Please review JDK-8044816 at for > > Thanks, > Attila. From sundararajan.athijegannathan at oracle.com Wed Jun 4 15:55:19 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Wed, 04 Jun 2014 21:25:19 +0530 Subject: Review request for JDK-8038413 In-Reply-To: References: Message-ID: <538F4167.7000703@oracle.com> +1 On Wednesday 04 June 2014 08:53 PM, Attila Szegedi wrote: > Please review JDK-8038413 at for > > Thanks, > Attila. From attila.szegedi at oracle.com Thu Jun 5 10:00:01 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Thu, 5 Jun 2014 12:00:01 +0200 Subject: Review request for JDK-8046014 Message-ID: Please review JDK-8046014 at for Thanks, Attila. From sundararajan.athijegannathan at oracle.com Thu Jun 5 10:29:49 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Thu, 05 Jun 2014 15:59:49 +0530 Subject: Review request for JDK-8046014 In-Reply-To: References: Message-ID: <5390469D.6020902@oracle.com> +1 On Thursday 05 June 2014 03:30 PM, Attila Szegedi wrote: > Please review JDK-8046014 at for > > Thanks, > Attila. From attila.szegedi at oracle.com Thu Jun 5 11:59:38 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Thu, 5 Jun 2014 13:59:38 +0200 Subject: Review request for JDK-8046025 Message-ID: <461ABC3F-88D6-4723-9506-406695BA7DD5@oracle.com> Please review JDK-8046025 at for Thanks, Attila. From james.laskey at oracle.com Thu Jun 5 12:12:20 2014 From: james.laskey at oracle.com (Jim Laskey (Oracle)) Date: Thu, 5 Jun 2014 09:12:20 -0300 Subject: Review request for JDK-8046025 In-Reply-To: <461ABC3F-88D6-4723-9506-406695BA7DD5@oracle.com> References: <461ABC3F-88D6-4723-9506-406695BA7DD5@oracle.com> Message-ID: +1 On Jun 5, 2014, at 8:59 AM, Attila Szegedi wrote: > Please review JDK-8046025 at for > > Thanks, > Attila. From hannes.wallnoefer at oracle.com Fri Jun 6 14:06:24 2014 From: hannes.wallnoefer at oracle.com (Hannes Wallnoefer) Date: Fri, 06 Jun 2014 16:06:24 +0200 Subject: Review request for JDK-8046215: Running uncompilable scripts throws NullPointerException Message-ID: <5391CAE0.2000005@oracle.com> Please review JDK-8046215: Running uncompilable scripts throws NullPointerException http://cr.openjdk.java.net/~hannesw/8046215/ thanks, Hannes From sundararajan.athijegannathan at oracle.com Fri Jun 6 14:08:29 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Fri, 06 Jun 2014 19:38:29 +0530 Subject: Review request for JDK-8046215: Running uncompilable scripts throws NullPointerException In-Reply-To: <5391CAE0.2000005@oracle.com> References: <5391CAE0.2000005@oracle.com> Message-ID: <5391CB5D.3080004@oracle.com> +1 On Friday 06 June 2014 07:36 PM, Hannes Wallnoefer wrote: > Please review JDK-8046215: Running uncompilable scripts throws > NullPointerException > > http://cr.openjdk.java.net/~hannesw/8046215/ > > thanks, > Hannes From james.laskey at oracle.com Fri Jun 6 15:06:30 2014 From: james.laskey at oracle.com (Jim Laskey (Oracle)) Date: Fri, 6 Jun 2014 12:06:30 -0300 Subject: Review request for JDK-8046215: Running uncompilable scripts throws NullPointerException In-Reply-To: <5391CB5D.3080004@oracle.com> References: <5391CAE0.2000005@oracle.com> <5391CB5D.3080004@oracle.com> Message-ID: <876786AF-D450-483D-9036-F2A6B0235960@oracle.com> +1 On Jun 6, 2014, at 11:08 AM, A. Sundararajan wrote: > +1 > > On Friday 06 June 2014 07:36 PM, Hannes Wallnoefer wrote: >> Please review JDK-8046215: Running uncompilable scripts throws NullPointerException >> >> http://cr.openjdk.java.net/~hannesw/8046215/ >> >> thanks, >> Hannes > From sundararajan.athijegannathan at oracle.com Tue Jun 10 17:19:42 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Tue, 10 Jun 2014 22:49:42 +0530 Subject: RFR 8044798: API for debugging Nashorn Message-ID: <53973E2E.3070403@oracle.com> Please review http://cr.openjdk.java.net/~sundar/8044798/ Thanks, -Sundar From james.laskey at oracle.com Tue Jun 10 17:23:40 2014 From: james.laskey at oracle.com (Jim Laskey (Oracle)) Date: Tue, 10 Jun 2014 14:23:40 -0300 Subject: RFR 8044798: API for debugging Nashorn In-Reply-To: <53973E2E.3070403@oracle.com> References: <53973E2E.3070403@oracle.com> Message-ID: <6702582B-A5F6-48EB-B824-9ACB19AD2D3D@oracle.com> +1 On Jun 10, 2014, at 2:19 PM, A. Sundararajan wrote: > Please review http://cr.openjdk.java.net/~sundar/8044798/ > > Thanks, > -Sundar From hannes.wallnoefer at oracle.com Tue Jun 10 22:29:15 2014 From: hannes.wallnoefer at oracle.com (Hannes Wallnoefer) Date: Wed, 11 Jun 2014 00:29:15 +0200 Subject: RFR 8044798: API for debugging Nashorn In-Reply-To: <53973E2E.3070403@oracle.com> References: <53973E2E.3070403@oracle.com> Message-ID: <539786BB.80108@oracle.com> Looks good. Hannes Am 2014-06-10 19:19, schrieb A. Sundararajan: > Please review http://cr.openjdk.java.net/~sundar/8044798/ > > Thanks, > -Sundar From marcus.lagergren at oracle.com Wed Jun 11 05:47:02 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Wed, 11 Jun 2014 07:47:02 +0200 Subject: RFR 8044798: API for debugging Nashorn In-Reply-To: <53973E2E.3070403@oracle.com> References: <53973E2E.3070403@oracle.com> Message-ID: <4B5ED4C5-E09A-4735-9AC3-65466FCFDCD8@oracle.com> +1 On 10 Jun 2014, at 19:19, A. Sundararajan wrote: > Please review http://cr.openjdk.java.net/~sundar/8044798/ > > Thanks, > -Sundar From sundararajan.athijegannathan at oracle.com Thu Jun 12 06:08:32 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Thu, 12 Jun 2014 11:38:32 +0530 Subject: RFR 8044517: Run & debug single Nashorn test Message-ID: <539943E0.3040007@oracle.com> Please review Bug: https://bugs.openjdk.java.net/browse/JDK-8044517 Webrev: http://cr.openjdk.java.net/~sundar/8044517/ This fix is contributed byJaroslav Tulach (CC'ed). I've made few cosmetic changes in build.xml (on the patch attached to the bug report). Thanks, -Sundar From marcus.lagergren at oracle.com Thu Jun 12 12:18:52 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Thu, 12 Jun 2014 15:18:52 +0300 Subject: RFR 8044517: Run & debug single Nashorn test In-Reply-To: <539943E0.3040007@oracle.com> References: <539943E0.3040007@oracle.com> Message-ID: +1 Nice work, Jaroslav! On 12 Jun 2014, at 09:08, A. Sundararajan wrote: > Please review > > Bug: https://bugs.openjdk.java.net/browse/JDK-8044517 > Webrev: http://cr.openjdk.java.net/~sundar/8044517/ > > This fix is contributed byJaroslav Tulach (CC'ed). I've made few cosmetic changes in build.xml (on the patch attached to the bug report). > > Thanks, > -Sundar From attila.szegedi at oracle.com Thu Jun 12 13:07:44 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Thu, 12 Jun 2014 15:07:44 +0200 Subject: RFR 8044517: Run & debug single Nashorn test In-Reply-To: <539943E0.3040007@oracle.com> References: <539943E0.3040007@oracle.com> Message-ID: +1 On Jun 12, 2014, at 8:08 AM, A. Sundararajan wrote: > Please review > > Bug: https://bugs.openjdk.java.net/browse/JDK-8044517 > Webrev: http://cr.openjdk.java.net/~sundar/8044517/ > > This fix is contributed byJaroslav Tulach (CC'ed). I've made few cosmetic changes in build.xml (on the patch attached to the bug report). > > Thanks, > -Sundar From sundararajan.athijegannathan at oracle.com Thu Jun 12 14:05:25 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Thu, 12 Jun 2014 19:35:25 +0530 Subject: [8u20] approval request for 8044517: Run & debug single Nashorn test In-Reply-To: <5399AA07.4060104@oracle.com> References: <5399AA07.4060104@oracle.com> Message-ID: <5399B3A5.8080103@oracle.com> Oops. Forgot CC to nashorn-dev. -Sundar On Thursday 12 June 2014 06:54 PM, A. Sundararajan wrote: > Please approve > > Bug: https://bugs.openjdk.java.net/browse/JDK-8044517 > jdk9 webrev: http://cr.openjdk.java.net/~sundar/8044517/webrev.00/ > jdk9 review thread: > http://mail.openjdk.java.net/pipermail/nashorn-dev/2014-June/003073.html > jdk9 changeset: > http://hg.openjdk.java.net/jdk9/dev/nashorn/rev/afba7593f395 > > jdk8u-dev webrev: > http://cr.openjdk.java.net/~sundar/8044517/8u20/webrev.00/ > > build.xml changes manually applied (as patch won't apply "as is"). > CC'ing nashorn-dev. > > Thanks, > -Sundar From lev.priima at oracle.com Mon Jun 16 15:40:34 2014 From: lev.priima at oracle.com (Lev Priima) Date: Mon, 16 Jun 2014 19:40:34 +0400 Subject: running TestNG tests from nashorn/test by jtreg Message-ID: <539F0FF2.7000207@oracle.com> Hi, Could you please point me to the doc, describing how to run TestNG-tests from nashorn/test by using jtreg harness? -- Lev From attila.szegedi at oracle.com Mon Jun 16 17:43:44 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Mon, 16 Jun 2014 19:43:44 +0200 Subject: Review request for JDK-8046921 Message-ID: <4B83EAB6-BA0D-426A-ADA0-56B07FE9EC04@oracle.com> Please review JDK-8046921 at for Thanks, Attila. From sundararajan.athijegannathan at oracle.com Tue Jun 17 06:12:14 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Tue, 17 Jun 2014 11:42:14 +0530 Subject: RFR 8047035: (function() "hello")() crashes in Lexer with jdk9 Message-ID: <539FDC3E.90101@oracle.com> Please review http://cr.openjdk.java.net/~sundar/8047035/ Bug: https://bugs.openjdk.java.net/browse/JDK-8047035 Thanks, -Sundar From hannes.wallnoefer at oracle.com Tue Jun 17 08:32:46 2014 From: hannes.wallnoefer at oracle.com (Hannes Wallnoefer) Date: Tue, 17 Jun 2014 10:32:46 +0200 Subject: RFR 8047035: (function() "hello")() crashes in Lexer with jdk9 In-Reply-To: <539FDC3E.90101@oracle.com> References: <539FDC3E.90101@oracle.com> Message-ID: <539FFD2E.7070208@oracle.com> +1 Am 2014-06-17 08:12, schrieb A. Sundararajan: > Please review http://cr.openjdk.java.net/~sundar/8047035/ > Bug: https://bugs.openjdk.java.net/browse/JDK-8047035 > > Thanks, > -Sundar From attila.szegedi at oracle.com Tue Jun 17 08:37:08 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Tue, 17 Jun 2014 10:37:08 +0200 Subject: RFR 8047035: (function() "hello")() crashes in Lexer with jdk9 In-Reply-To: <539FDC3E.90101@oracle.com> References: <539FDC3E.90101@oracle.com> Message-ID: <3A047EE1-8D17-4BDA-8701-6BCED3790D08@oracle.com> +1 On Jun 17, 2014, at 8:12 AM, A. Sundararajan wrote: > Please review http://cr.openjdk.java.net/~sundar/8047035/ > Bug: https://bugs.openjdk.java.net/browse/JDK-8047035 > > Thanks, > -Sundar From lev.priima at oracle.com Tue Jun 17 10:08:59 2014 From: lev.priima at oracle.com (Lev Priima) Date: Tue, 17 Jun 2014 14:08:59 +0400 Subject: running TestNG tests from nashorn/test by jtreg In-Reply-To: <539F0FF2.7000207@oracle.com> References: <539F0FF2.7000207@oracle.com> Message-ID: <53A013BB.6000307@oracle.com> Hi Jonathan, Is it possible to run TestNG tests from nashorn/test by using jtreg? Lev On 06/16/2014 07:40 PM, Lev Priima wrote: > Hi, > > Could you please point me to the doc, describing how to run > TestNG-tests from nashorn/test by using jtreg harness? > From sundararajan.athijegannathan at oracle.com Tue Jun 17 10:11:42 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Tue, 17 Jun 2014 15:41:42 +0530 Subject: running TestNG tests from nashorn/test by jtreg In-Reply-To: <539F0FF2.7000207@oracle.com> References: <539F0FF2.7000207@oracle.com> Message-ID: <53A0145E.3030304@oracle.com> Hi, only a subset of nashorn tests can be run with jtreg. *) cd $nashorn_repo_top_dir/test *) jtreg -jdk: . If you want to run all tests, you've to run do *) cd $nashorn_repo_top_dir/make *) ant clean test test262parallel -Sundar On Monday 16 June 2014 09:10 PM, Lev Priima wrote: > Hi, > > Could you please point me to the doc, describing how to run > TestNG-tests from nashorn/test by using jtreg harness? > From lev.priima at oracle.com Tue Jun 17 10:41:46 2014 From: lev.priima at oracle.com (Lev Priima) Date: Tue, 17 Jun 2014 14:41:46 +0400 Subject: running TestNG tests from nashorn/test by jtreg In-Reply-To: <53A0145E.3030304@oracle.com> References: <539F0FF2.7000207@oracle.com> <53A0145E.3030304@oracle.com> Message-ID: <53A01B6A.4060000@oracle.com> Thanks Sundar, Do you plan to migrate to running all nashorn tests by using one harness(not using both ant and jtreg)? Could I run all tests from nashorn test(including both jtreg and TestNG tests) by using jtreg? Lev On 06/17/2014 02:11 PM, A. Sundararajan wrote: > Hi, > > only a subset of nashorn tests can be run with jtreg. > > *) cd $nashorn_repo_top_dir/test > *) jtreg -jdk: . > > If you want to run all tests, you've to run do > > *) cd $nashorn_repo_top_dir/make > *) ant clean test test262parallel > > -Sundar > > On Monday 16 June 2014 09:10 PM, Lev Priima wrote: >> Hi, >> >> Could you please point me to the doc, describing how to run >> TestNG-tests from nashorn/test by using jtreg harness? >> > From sundararajan.athijegannathan at oracle.com Tue Jun 17 10:44:56 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Tue, 17 Jun 2014 16:14:56 +0530 Subject: running TestNG tests from nashorn/test by jtreg In-Reply-To: <53A01B6A.4060000@oracle.com> References: <539F0FF2.7000207@oracle.com> <53A0145E.3030304@oracle.com> <53A01B6A.4060000@oracle.com> Message-ID: <53A01C28.5040109@oracle.com> No. Nashorn test framework requires specific security manager to be used. Also, nashorn test framework uses jtreg-style annotations in .js files and parses those -Sundar On Tuesday 17 June 2014 04:11 PM, Lev Priima wrote: > Thanks Sundar, > > Do you plan to migrate to running all nashorn tests by using one > harness(not using both ant and jtreg)? Could I run all tests from > nashorn test(including both jtreg and TestNG tests) by using jtreg? > > Lev > > On 06/17/2014 02:11 PM, A. Sundararajan wrote: >> Hi, >> >> only a subset of nashorn tests can be run with jtreg. >> >> *) cd $nashorn_repo_top_dir/test >> *) jtreg -jdk: . >> >> If you want to run all tests, you've to run do >> >> *) cd $nashorn_repo_top_dir/make >> *) ant clean test test262parallel >> >> -Sundar >> >> On Monday 16 June 2014 09:10 PM, Lev Priima wrote: >>> Hi, >>> >>> Could you please point me to the doc, describing how to run >>> TestNG-tests from nashorn/test by using jtreg harness? >>> >> > From sundararajan.athijegannathan at oracle.com Tue Jun 17 11:11:05 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Tue, 17 Jun 2014 16:41:05 +0530 Subject: RFR 8047057: Add a regression test for the passing test cases from JDK-8042304 Message-ID: <53A02249.1000801@oracle.com> Please review http://cr.openjdk.java.net/~sundar/8047057/ Thanks -Sundar From jonathan.gibbons at oracle.com Tue Jun 17 20:11:27 2014 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Tue, 17 Jun 2014 13:11:27 -0700 Subject: running TestNG tests from nashorn/test by jtreg In-Reply-To: <53A01C28.5040109@oracle.com> References: <539F0FF2.7000207@oracle.com> <53A0145E.3030304@oracle.com> <53A01B6A.4060000@oracle.com> <53A01C28.5040109@oracle.com> Message-ID: <53A0A0EF.2050503@oracle.com> Sundar, Yet another test framework? Should we consider support for these tests in jtreg? -- Jon On 06/17/2014 03:44 AM, A. Sundararajan wrote: > No. Nashorn test framework requires specific security manager to be > used. Also, nashorn test framework uses jtreg-style annotations in .js > files and parses those > > -Sundar > > On Tuesday 17 June 2014 04:11 PM, Lev Priima wrote: >> Thanks Sundar, >> >> Do you plan to migrate to running all nashorn tests by using one >> harness(not using both ant and jtreg)? Could I run all tests from >> nashorn test(including both jtreg and TestNG tests) by using jtreg? >> >> Lev >> >> On 06/17/2014 02:11 PM, A. Sundararajan wrote: >>> Hi, >>> >>> only a subset of nashorn tests can be run with jtreg. >>> >>> *) cd $nashorn_repo_top_dir/test >>> *) jtreg -jdk: . >>> >>> If you want to run all tests, you've to run do >>> >>> *) cd $nashorn_repo_top_dir/make >>> *) ant clean test test262parallel >>> >>> -Sundar >>> >>> On Monday 16 June 2014 09:10 PM, Lev Priima wrote: >>>> Hi, >>>> >>>> Could you please point me to the doc, describing how to run >>>> TestNG-tests from nashorn/test by using jtreg harness? >>>> >>> >> > From marcus.lagergren at oracle.com Wed Jun 18 08:37:16 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Wed, 18 Jun 2014 10:37:16 +0200 Subject: RFR 8047057: Add a regression test for the passing test cases from JDK-8042304 In-Reply-To: <53A02249.1000801@oracle.com> References: <53A02249.1000801@oracle.com> Message-ID: +1 On 17 Jun 2014, at 13:11, A. Sundararajan wrote: > Please review http://cr.openjdk.java.net/~sundar/8047057/ > > Thanks > -Sundar From sundararajan.athijegannathan at oracle.com Thu Jun 19 14:15:03 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Thu, 19 Jun 2014 19:45:03 +0530 Subject: RFR 8047369: Add regression tests for passing test cases of JDK-8024971 Message-ID: <53A2F067.3070705@oracle.com> Please review http://cr.openjdk.java.net/~sundar/8047369/ Thanks, -Sundar From greg at apigee.com Fri Jun 20 16:05:22 2014 From: greg at apigee.com (Greg Brail) Date: Fri, 20 Jun 2014 09:05:22 -0700 Subject: Clean JavaScript stack trace Message-ID: Is there a way in Nashorn or javax.script to get a clean JavaScript-only stack trace (not a Java stack trace, but only containing JavaScript code) out of an exception thrown by a script? I don't see anything in the Nashorn Wiki or javax.script -- apologies if I'm missing something there. For instance, I can get a full Java stack trace when my script fails, but I'd like to ignore all the Java stuff and give users the stack trace that they would get if they were running the "plain" JavaScript natively rather than inside Java. -- *greg brail* | *apigee * | twitter @gbrail From sundararajan.athijegannathan at oracle.com Fri Jun 20 16:22:06 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Fri, 20 Jun 2014 21:52:06 +0530 Subject: Clean JavaScript stack trace In-Reply-To: References: Message-ID: <53A45FAE.6010907@oracle.com> You can evaluate: function getScriptTrace() { try { throw new Error(); } catch (e) { return e.stack } } in your script and call the same from java code using javax.script.Invocable.invokeFunction. ("stack" property and other related extensions are documented here: https://wiki.openjdk.java.net/display/Nashorn/Nashorn+extensions). Or if you're okay with nashorn specific extension, you can use this API from java code. public static StackTraceElement[] jdk.nashorn.api.scripting.NashornException.getScriptFrames(Throwable th) Hope this helps, -Sundar On Friday 20 June 2014 09:35 PM, Greg Brail wrote: > Is there a way in Nashorn or javax.script to get a clean JavaScript-only > stack trace (not a Java stack trace, but only containing JavaScript code) > out of an exception thrown by a script? I don't see anything in the Nashorn > Wiki or javax.script -- apologies if I'm missing something there. > > For instance, I can get a full Java stack trace when my script fails, but > I'd like to ignore all the Java stuff and give users the stack trace that > they would get if they were running the "plain" JavaScript natively rather > than inside Java. > From greg at apigee.com Fri Jun 20 19:36:57 2014 From: greg at apigee.com (Greg Brail) Date: Fri, 20 Jun 2014 12:36:57 -0700 Subject: Clean JavaScript stack trace In-Reply-To: <53A45FAE.6010907@oracle.com> References: <53A45FAE.6010907@oracle.com> Message-ID: Thank you! It's my understanding that the "jdk.nashorn.api.scripting" package is considered fairly stable and using it my code is "OK," so I may use that technique. On Fri, Jun 20, 2014 at 9:22 AM, A. Sundararajan < sundararajan.athijegannathan at oracle.com> wrote: > You can evaluate: > > function getScriptTrace() { > try { > throw new Error(); > } catch (e) { > return e.stack > } > } > > in your script and call the same from java code using > javax.script.Invocable.invokeFunction. ("stack" property and other > related extensions are documented here: https://wiki.openjdk.java.net/ > display/Nashorn/Nashorn+extensions). > > Or if you're okay with nashorn specific extension, you can use this API > from java code. > > public static StackTraceElement[] jdk.nashorn.api.scripting. > NashornException.getScriptFrames(Throwable th) > > Hope this helps, > -Sundar > > On Friday 20 June 2014 09:35 PM, Greg Brail wrote: > >> Is there a way in Nashorn or javax.script to get a clean JavaScript-only >> stack trace (not a Java stack trace, but only containing JavaScript code) >> out of an exception thrown by a script? I don't see anything in the >> Nashorn >> Wiki or javax.script -- apologies if I'm missing something there. >> >> For instance, I can get a full Java stack trace when my script fails, but >> I'd like to ignore all the Java stuff and give users the stack trace that >> they would get if they were running the "plain" JavaScript natively rather >> than inside Java. >> >> > -- *greg brail* | *apigee * | twitter @gbrail From marcus.lagergren at oracle.com Sat Jun 21 02:12:15 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Sat, 21 Jun 2014 04:12:15 +0200 Subject: Clean JavaScript stack trace In-Reply-To: References: <53A45FAE.6010907@oracle.com> Message-ID: <3EA83450-DDB8-4D05-AF87-08782B243E70@oracle.com> Correct. Anything without ?internal? in it should be fine. On 20 Jun 2014, at 21:36, Greg Brail wrote: > Thank you! > > It's my understanding that the "jdk.nashorn.api.scripting" package is > considered fairly stable and using it my code is "OK," so I may use that > technique. > > > On Fri, Jun 20, 2014 at 9:22 AM, A. Sundararajan < > sundararajan.athijegannathan at oracle.com> wrote: > >> You can evaluate: >> >> function getScriptTrace() { >> try { >> throw new Error(); >> } catch (e) { >> return e.stack >> } >> } >> >> in your script and call the same from java code using >> javax.script.Invocable.invokeFunction. ("stack" property and other >> related extensions are documented here: https://wiki.openjdk.java.net/ >> display/Nashorn/Nashorn+extensions). >> >> Or if you're okay with nashorn specific extension, you can use this API >> from java code. >> >> public static StackTraceElement[] jdk.nashorn.api.scripting. >> NashornException.getScriptFrames(Throwable th) >> >> Hope this helps, >> -Sundar >> >> On Friday 20 June 2014 09:35 PM, Greg Brail wrote: >> >>> Is there a way in Nashorn or javax.script to get a clean JavaScript-only >>> stack trace (not a Java stack trace, but only containing JavaScript code) >>> out of an exception thrown by a script? I don't see anything in the >>> Nashorn >>> Wiki or javax.script -- apologies if I'm missing something there. >>> >>> For instance, I can get a full Java stack trace when my script fails, but >>> I'd like to ignore all the Java stuff and give users the stack trace that >>> they would get if they were running the "plain" JavaScript natively rather >>> than inside Java. >>> >>> >> > > > -- > *greg brail* | *apigee * | twitter @gbrail > From attila.szegedi at oracle.com Sun Jun 22 15:43:17 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Sun, 22 Jun 2014 17:43:17 +0200 Subject: Review request for JDK-8046905 Message-ID: <5A8E2D29-E9C6-4EDD-BB47-73A49AF5F42D@oracle.com> Please review JDK-8046905 at for Thanks, Attila. From sundararajan.athijegannathan at oracle.com Mon Jun 23 03:29:37 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Mon, 23 Jun 2014 08:59:37 +0530 Subject: Clean JavaScript stack trace In-Reply-To: References: <53A45FAE.6010907@oracle.com> Message-ID: <53A79F21.803@oracle.com> Yes, anything under "api" directory or sub-dir implements API and are considered fairly stable. Anything else is considered as internal -Sundar On Saturday 21 June 2014 01:06 AM, Greg Brail wrote: > Thank you! > > It's my understanding that the "jdk.nashorn.api.scripting" package is > considered fairly stable and using it my code is "OK," so I may use that > technique. > > > On Fri, Jun 20, 2014 at 9:22 AM, A. Sundararajan < > sundararajan.athijegannathan at oracle.com> wrote: > >> You can evaluate: >> >> function getScriptTrace() { >> try { >> throw new Error(); >> } catch (e) { >> return e.stack >> } >> } >> >> in your script and call the same from java code using >> javax.script.Invocable.invokeFunction. ("stack" property and other >> related extensions are documented here: https://wiki.openjdk.java.net/ >> display/Nashorn/Nashorn+extensions). >> >> Or if you're okay with nashorn specific extension, you can use this API >> from java code. >> >> public static StackTraceElement[] jdk.nashorn.api.scripting. >> NashornException.getScriptFrames(Throwable th) >> >> Hope this helps, >> -Sundar >> >> On Friday 20 June 2014 09:35 PM, Greg Brail wrote: >> >>> Is there a way in Nashorn or javax.script to get a clean JavaScript-only >>> stack trace (not a Java stack trace, but only containing JavaScript code) >>> out of an exception thrown by a script? I don't see anything in the >>> Nashorn >>> Wiki or javax.script -- apologies if I'm missing something there. >>> >>> For instance, I can get a full Java stack trace when my script fails, but >>> I'd like to ignore all the Java stuff and give users the stack trace that >>> they would get if they were running the "plain" JavaScript natively rather >>> than inside Java. >>> >>> > From marcus.lagergren at oracle.com Mon Jun 23 08:27:29 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Mon, 23 Jun 2014 10:27:29 +0200 Subject: Review request for JDK-8046905 In-Reply-To: <5A8E2D29-E9C6-4EDD-BB47-73A49AF5F42D@oracle.com> References: <5A8E2D29-E9C6-4EDD-BB47-73A49AF5F42D@oracle.com> Message-ID: +1. Awesomely well done. On 22 Jun 2014, at 17:43, Attila Szegedi wrote: > Please review JDK-8046905 at for > > Thanks, > Attila. From sundararajan.athijegannathan at oracle.com Mon Jun 23 12:20:19 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Mon, 23 Jun 2014 17:50:19 +0530 Subject: RFR 8047728: (function(x){var o={x:0}; with(o){delete x} return o.x})() evaluates to 0 instead of undefined Message-ID: <53A81B83.10502@oracle.com> Please review http://cr.openjdk.java.net/~sundar/8047728/ Thanks -Sundar From james.laskey at oracle.com Mon Jun 23 13:23:37 2014 From: james.laskey at oracle.com (Jim Laskey (Oracle)) Date: Mon, 23 Jun 2014 10:23:37 -0300 Subject: RFR 8047728: (function(x){var o={x:0}; with(o){delete x} return o.x})() evaluates to 0 instead of undefined In-Reply-To: <53A81B83.10502@oracle.com> References: <53A81B83.10502@oracle.com> Message-ID: <47BB8515-7C7C-40CE-8549-0FEAB333771F@oracle.com> +1 On Jun 23, 2014, at 9:20 AM, A. Sundararajan wrote: > Please review http://cr.openjdk.java.net/~sundar/8047728/ > > Thanks > -Sundar From hannes.wallnoefer at oracle.com Mon Jun 23 13:58:49 2014 From: hannes.wallnoefer at oracle.com (Hannes Wallnoefer) Date: Mon, 23 Jun 2014 15:58:49 +0200 Subject: Review request for JDK-8046201: Avoid repeated flattening of nested ConsStrings Message-ID: <53A83299.7080206@oracle.com> Please review JDK-8046201: Avoid repeated flattening of nested ConsStrings: http://cr.openjdk.java.net/~hannesw/8046201/ Note that I made ConsString.flatten() synchronized. I didn't observe any performance degradation. Thanks, Hannes From hannes.wallnoefer at oracle.com Mon Jun 23 16:10:24 2014 From: hannes.wallnoefer at oracle.com (Hannes Wallnoefer) Date: Mon, 23 Jun 2014 18:10:24 +0200 Subject: Review request for JDK-8046201: Avoid repeated flattening of nested ConsStrings In-Reply-To: <53A83299.7080206@oracle.com> References: <53A83299.7080206@oracle.com> Message-ID: <53A85170.9070004@oracle.com> Uploaded a new webrev based on feedback regarding thread safety from Attila and Aleksey Shipilev: http://cr.openjdk.java.net/~hannesw/8046201/webrev.02/ Hannes Am 2014-06-23 15:58, schrieb Hannes Wallnoefer: > Please review JDK-8046201: Avoid repeated flattening of nested > ConsStrings: > > http://cr.openjdk.java.net/~hannesw/8046201/ > > Note that I made ConsString.flatten() synchronized. I didn't observe > any performance degradation. > > Thanks, > Hannes From attila.szegedi at oracle.com Mon Jun 23 18:17:26 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Mon, 23 Jun 2014 20:17:26 +0200 Subject: Review request for JDK-8046201: Avoid repeated flattening of nested ConsStrings In-Reply-To: <53A85170.9070004@oracle.com> References: <53A83299.7080206@oracle.com> <53A85170.9070004@oracle.com> Message-ID: <900417C0-34B4-42B6-A543-098B2909FFE9@oracle.com> +1 On Jun 23, 2014, at 6:10 PM, Hannes Wallnoefer wrote: > Uploaded a new webrev based on feedback regarding thread safety from Attila and Aleksey Shipilev: > > http://cr.openjdk.java.net/~hannesw/8046201/webrev.02/ > > Hannes > > Am 2014-06-23 15:58, schrieb Hannes Wallnoefer: >> Please review JDK-8046201: Avoid repeated flattening of nested ConsStrings: >> >> http://cr.openjdk.java.net/~hannesw/8046201/ >> >> Note that I made ConsString.flatten() synchronized. I didn't observe any performance degradation. >> >> Thanks, >> Hannes > From marcus.lagergren at oracle.com Tue Jun 24 03:31:13 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Tue, 24 Jun 2014 05:31:13 +0200 Subject: RFR 8047728: (function(x){var o={x:0}; with(o){delete x} return o.x})() evaluates to 0 instead of undefined In-Reply-To: <53A81B83.10502@oracle.com> References: <53A81B83.10502@oracle.com> Message-ID: +1. A comment above the line + final boolean failDelete = strictMode || (!symbol.isScope() && (symbol.isParam() || (symbol.isVar() && !symbol.isProgramLevel()))); explaining the logic, would be helpful, I guess. It is getting a bit convoluted. Can you add a TODO in the comment in LocalVariableTypesCalculator so it shows up in the margin of IDEs? On 23 Jun 2014, at 14:20, A. Sundararajan wrote: > Please review http://cr.openjdk.java.net/~sundar/8047728/ > > Thanks > -Sundar From marcus.lagergren at oracle.com Tue Jun 24 03:33:05 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Tue, 24 Jun 2014 05:33:05 +0200 Subject: Review request for JDK-8046201: Avoid repeated flattening of nested ConsStrings In-Reply-To: <53A85170.9070004@oracle.com> References: <53A83299.7080206@oracle.com> <53A85170.9070004@oracle.com> Message-ID: <8801F90E-3E69-4A2D-B4CC-BFD4EA4466C5@oracle.com> finals missing for parameters (code standard nitpick). Have you done any benchmarking to see if this introduces any regressions? I can?t for the life of me imagine why, in our single threaded environment, but just to be sure. Otherwise +1 On 23 Jun 2014, at 18:10, Hannes Wallnoefer wrote: > Uploaded a new webrev based on feedback regarding thread safety from Attila and Aleksey Shipilev: > > http://cr.openjdk.java.net/~hannesw/8046201/webrev.02/ > > Hannes > > Am 2014-06-23 15:58, schrieb Hannes Wallnoefer: >> Please review JDK-8046201: Avoid repeated flattening of nested ConsStrings: >> >> http://cr.openjdk.java.net/~hannesw/8046201/ >> >> Note that I made ConsString.flatten() synchronized. I didn't observe any performance degradation. >> >> Thanks, >> Hannes > From sundararajan.athijegannathan at oracle.com Tue Jun 24 13:20:45 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Tue, 24 Jun 2014 18:50:45 +0530 Subject: RFR 8047959: bindings created for declarations in eval code are not mutable Message-ID: <53A97B2D.6050208@oracle.com> Please review http://cr.openjdk.java.net/~sundar/8047959/ for https://bugs.openjdk.java.net/browse/JDK-8047959 Thanks -Sundar From james.laskey at oracle.com Tue Jun 24 13:30:47 2014 From: james.laskey at oracle.com (Jim Laskey (Oracle)) Date: Tue, 24 Jun 2014 10:30:47 -0300 Subject: RFR 8047959: bindings created for declarations in eval code are not mutable In-Reply-To: <53A97B2D.6050208@oracle.com> References: <53A97B2D.6050208@oracle.com> Message-ID: <9EA6272F-EC43-4EE6-930C-6FB0F56F7DAC@oracle.com> +1 On Jun 24, 2014, at 10:20 AM, A. Sundararajan wrote: > Please review http://cr.openjdk.java.net/~sundar/8047959/ for https://bugs.openjdk.java.net/browse/JDK-8047959 > > Thanks > -Sundar From attila.szegedi at oracle.com Tue Jun 24 16:00:34 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Tue, 24 Jun 2014 18:00:34 +0200 Subject: Review request for JDK-8048009 Message-ID: <22AE32CE-20DC-49FA-930D-54FD55D3A464@oracle.com> Please review JDK-8048009 at for Thanks, Attila. From hannes.wallnoefer at oracle.com Wed Jun 25 07:14:42 2014 From: hannes.wallnoefer at oracle.com (Hannes Wallnoefer) Date: Wed, 25 Jun 2014 09:14:42 +0200 Subject: Review request for JDK-8048009 In-Reply-To: <22AE32CE-20DC-49FA-930D-54FD55D3A464@oracle.com> References: <22AE32CE-20DC-49FA-930D-54FD55D3A464@oracle.com> Message-ID: <53AA76E2.1020105@oracle.com> +1 Am 2014-06-24 18:00, schrieb Attila Szegedi: > Please review JDK-8048009 at for > > Thanks, > Attila. From sundararajan.athijegannathan at oracle.com Wed Jun 25 08:34:20 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Wed, 25 Jun 2014 14:04:20 +0530 Subject: RFR 8048071: eval within 'with' statement does not use correct scope if with scope expression has a copy of eval Message-ID: <53AA898C.5050407@oracle.com> Please review http://cr.openjdk.java.net/~sundar/8048071/ Thanks -Sundar From hannes.wallnoefer at oracle.com Wed Jun 25 09:53:27 2014 From: hannes.wallnoefer at oracle.com (Hannes Wallnoefer) Date: Wed, 25 Jun 2014 11:53:27 +0200 Subject: RFR 8048071: eval within 'with' statement does not use correct scope if with scope expression has a copy of eval In-Reply-To: <53AA898C.5050407@oracle.com> References: <53AA898C.5050407@oracle.com> Message-ID: <53AA9C17.9000806@oracle.com> +1 Am 2014-06-25 10:34, schrieb A. Sundararajan: > Please review http://cr.openjdk.java.net/~sundar/8048071/ > > Thanks > -Sundar From hannes.wallnoefer at oracle.com Wed Jun 25 10:07:50 2014 From: hannes.wallnoefer at oracle.com (Hannes Wallnoefer) Date: Wed, 25 Jun 2014 12:07:50 +0200 Subject: Review request for JDK-8048079: Persistent code store is broken after optimistic types merge Message-ID: <53AA9F76.8020003@oracle.com> Please review JDK-8048079: Persistent code store is broken after optimistic types merge: http://cr.openjdk.java.net/~hannesw/8048079/ Thanks, Hannes From sundararajan.athijegannathan at oracle.com Wed Jun 25 11:33:11 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Wed, 25 Jun 2014 17:03:11 +0530 Subject: Review request for JDK-8048079: Persistent code store is broken after optimistic types merge In-Reply-To: <53AA9F76.8020003@oracle.com> References: <53AA9F76.8020003@oracle.com> Message-ID: <53AAB377.1030602@oracle.com> +1 On Wednesday 25 June 2014 03:37 PM, Hannes Wallnoefer wrote: > Please review JDK-8048079: Persistent code store is broken after > optimistic types merge: > > http://cr.openjdk.java.net/~hannesw/8048079/ > > Thanks, > Hannes From james.laskey at oracle.com Wed Jun 25 11:40:03 2014 From: james.laskey at oracle.com (Jim Laskey (Oracle)) Date: Wed, 25 Jun 2014 08:40:03 -0300 Subject: Review request for JDK-8048079: Persistent code store is broken after optimistic types merge In-Reply-To: <53AA9F76.8020003@oracle.com> References: <53AA9F76.8020003@oracle.com> Message-ID: +1 On Jun 25, 2014, at 7:07 AM, Hannes Wallnoefer wrote: > Please review JDK-8048079: Persistent code store is broken after optimistic types merge: > > http://cr.openjdk.java.net/~hannesw/8048079/ > > Thanks, > Hannes From marcus.lagergren at oracle.com Wed Jun 25 21:37:41 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Wed, 25 Jun 2014 23:37:41 +0200 Subject: RFR 8047959: bindings created for declarations in eval code are not mutable In-Reply-To: <53A97B2D.6050208@oracle.com> References: <53A97B2D.6050208@oracle.com> Message-ID: +1 (scary ;-)) On 24 Jun 2014, at 15:20, A. Sundararajan wrote: > Please review http://cr.openjdk.java.net/~sundar/8047959/ for https://bugs.openjdk.java.net/browse/JDK-8047959 > > Thanks > -Sundar From marcus.lagergren at oracle.com Wed Jun 25 21:38:16 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Wed, 25 Jun 2014 23:38:16 +0200 Subject: Review request for JDK-8048009 In-Reply-To: <22AE32CE-20DC-49FA-930D-54FD55D3A464@oracle.com> References: <22AE32CE-20DC-49FA-930D-54FD55D3A464@oracle.com> Message-ID: +1 On 24 Jun 2014, at 18:00, Attila Szegedi wrote: > Please review JDK-8048009 at for > > Thanks, > Attila. From marcus.lagergren at oracle.com Wed Jun 25 21:38:57 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Wed, 25 Jun 2014 23:38:57 +0200 Subject: RFR 8048071: eval within 'with' statement does not use correct scope if with scope expression has a copy of eval In-Reply-To: <53AA898C.5050407@oracle.com> References: <53AA898C.5050407@oracle.com> Message-ID: <8B6171A2-5DBE-4B6C-A9F0-41AA495915AB@oracle.com> Ew - another scary and subtle one. Good work, Sundar! +1 On 25 Jun 2014, at 10:34, A. Sundararajan wrote: > Please review http://cr.openjdk.java.net/~sundar/8048071/ > > Thanks > -Sundar From marcus.lagergren at oracle.com Wed Jun 25 21:40:46 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Wed, 25 Jun 2014 23:40:46 +0200 Subject: Review request for JDK-8048079: Persistent code store is broken after optimistic types merge In-Reply-To: <53AA9F76.8020003@oracle.com> References: <53AA9F76.8020003@oracle.com> Message-ID: <490FD871-EB87-4881-BD73-A5BC06175827@oracle.com> Looks good. Does this work (or rather, correctly skip) the unit test, if we haven?t installed external tests? +1 Regards Marcus On 25 Jun 2014, at 12:07, Hannes Wallnoefer wrote: > Please review JDK-8048079: Persistent code store is broken after optimistic types merge: > > http://cr.openjdk.java.net/~hannesw/8048079/ > > Thanks, > Hannes From attila.szegedi at oracle.com Thu Jun 26 10:22:22 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Thu, 26 Jun 2014 12:22:22 +0200 Subject: Review request for JDK-8047357 Message-ID: <90C30C1B-48FA-459A-BC51-9B0CA131A2C9@oracle.com> Please review JDK-8047357 at for The issue is fixed by the change in LocalVariableTypesCalculator.enterThrowNode() and the fix in the assert in the CodeGenerator. However, then it uncovers a different bug ? one special case of JDK-8048186, which is still not fixed. I have fixed this special case (missing return at the end of a normally terminating function) by moving the synthetic return statement generator from Lower to LocalVariableTypesCalculator as it has precise static reachability analysis. As part of the changes, I also did some more modifications: - I noticed IdentNode.setSymbol() was returning Expression instead of IdentNode, and changed it. As a consequence, some casts in the code are no longer necessary. - isTerminal, hasTerminalFlags, and hasGoto have been removed from Node, as expressions are never terminal. They're moved to Statement, and some other AST nodes that aren't statement but can be terminal implement a new Terminal interface (Block and CaseNode), similar to the design of Optimistic interface. It could be further refined by only implementing Terminal on those Statement subclasses that can, in fact, sometimes return true for isTerminal, but it'll do for now. Thanks, Attila. From sundararajan.athijegannathan at oracle.com Thu Jun 26 10:54:08 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Thu, 26 Jun 2014 16:24:08 +0530 Subject: Review request for JDK-8047357 In-Reply-To: <90C30C1B-48FA-459A-BC51-9B0CA131A2C9@oracle.com> References: <90C30C1B-48FA-459A-BC51-9B0CA131A2C9@oracle.com> Message-ID: <53ABFBD0.3010809@oracle.com> +1 PS. Test has 2013 copyright. -Sundar On Thursday 26 June 2014 03:52 PM, Attila Szegedi wrote: > Please review JDK-8047357 at for > > The issue is fixed by the change in LocalVariableTypesCalculator.enterThrowNode() and the fix in the assert in the CodeGenerator. > > However, then it uncovers a different bug ? one special case of JDK-8048186, which is still not fixed. I have fixed this special case (missing return at the end of a normally terminating function) by moving the synthetic return statement generator from Lower to LocalVariableTypesCalculator as it has precise static reachability analysis. > > As part of the changes, I also did some more modifications: > > - I noticed IdentNode.setSymbol() was returning Expression instead of IdentNode, and changed it. As a consequence, some casts in the code are no longer necessary. > > - isTerminal, hasTerminalFlags, and hasGoto have been removed from Node, as expressions are never terminal. They're moved to Statement, and some other AST nodes that aren't statement but can be terminal implement a new Terminal interface (Block and CaseNode), similar to the design of Optimistic interface. It could be further refined by only implementing Terminal on those Statement subclasses that can, in fact, sometimes return true for isTerminal, but it'll do for now. > > Thanks, > Attila. From attila.szegedi at oracle.com Thu Jun 26 13:30:49 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Thu, 26 Jun 2014 15:30:49 +0200 Subject: Review request for JDK-8047371 Message-ID: <340592D2-21F9-4E9C-9601-4C192BD9F3C0@oracle.com> Please review JDK-8047371 at for Thanks, Attila. From james.laskey at oracle.com Thu Jun 26 14:05:25 2014 From: james.laskey at oracle.com (Jim Laskey (Oracle)) Date: Thu, 26 Jun 2014 11:05:25 -0300 Subject: Review request for JDK-8047371 In-Reply-To: <340592D2-21F9-4E9C-9601-4C192BD9F3C0@oracle.com> References: <340592D2-21F9-4E9C-9601-4C192BD9F3C0@oracle.com> Message-ID: +1 On Jun 26, 2014, at 10:30 AM, Attila Szegedi wrote: > Please review JDK-8047371 at for > > Thanks, > Attila. From timvolpe at gmail.com Thu Jun 26 16:56:50 2014 From: timvolpe at gmail.com (Tim Fox) Date: Thu, 26 Jun 2014 17:56:50 +0100 Subject: Recommendations for JS api documentation tool Message-ID: <53AC50D2.9010201@gmail.com> Hello Nashorners, I was wondering if you had any recommendations for a JS API documentation tool to use with Nashorn JS (like JavaDoc for JavaScript)? Currently I use JSDoc, but it currently only runs on either Node.js or Rhino, so it's not ideal as I have to fire up Rhino to use it. Would be nice if it ran on Nashorn too, then I wouldn't have to use another JS engine just to produce the docs. I asked the JSDoc3 team if they had plans for supporting Nashorn but they said not currently (but they'll accept contributions) https://github.com/jsdoc3/jsdoc/issues/686#issuecomment-47246308 which was a bit disappointing. From marcus.lagergren at oracle.com Fri Jun 27 08:00:13 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Fri, 27 Jun 2014 10:00:13 +0200 Subject: Review request for JDK-8047371 In-Reply-To: <340592D2-21F9-4E9C-9601-4C192BD9F3C0@oracle.com> References: <340592D2-21F9-4E9C-9601-4C192BD9F3C0@oracle.com> Message-ID: <8BC43F6F-1466-4388-B1A7-AC3D3C7E00F0@oracle.com> +1 On 26 Jun 2014, at 15:30, Attila Szegedi wrote: > Please review JDK-8047371 at for > > Thanks, > Attila. From marcus.lagergren at oracle.com Fri Jun 27 08:00:45 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Fri, 27 Jun 2014 10:00:45 +0200 Subject: Review request for JDK-8047357 In-Reply-To: <90C30C1B-48FA-459A-BC51-9B0CA131A2C9@oracle.com> References: <90C30C1B-48FA-459A-BC51-9B0CA131A2C9@oracle.com> Message-ID: <921E5F1A-37D3-47CC-A1BF-812CA2442EC5@oracle.com> +1. Terminal logic got much better, nicely done Attila! /M On 26 Jun 2014, at 12:22, Attila Szegedi wrote: > Please review JDK-8047357 at for > > The issue is fixed by the change in LocalVariableTypesCalculator.enterThrowNode() and the fix in the assert in the CodeGenerator. > > However, then it uncovers a different bug ? one special case of JDK-8048186, which is still not fixed. I have fixed this special case (missing return at the end of a normally terminating function) by moving the synthetic return statement generator from Lower to LocalVariableTypesCalculator as it has precise static reachability analysis. > > As part of the changes, I also did some more modifications: > > - I noticed IdentNode.setSymbol() was returning Expression instead of IdentNode, and changed it. As a consequence, some casts in the code are no longer necessary. > > - isTerminal, hasTerminalFlags, and hasGoto have been removed from Node, as expressions are never terminal. They're moved to Statement, and some other AST nodes that aren't statement but can be terminal implement a new Terminal interface (Block and CaseNode), similar to the design of Optimistic interface. It could be further refined by only implementing Terminal on those Statement subclasses that can, in fact, sometimes return true for isTerminal, but it'll do for now. > > Thanks, > Attila. From sundararajan.athijegannathan at oracle.com Fri Jun 27 12:27:02 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Fri, 27 Jun 2014 17:57:02 +0530 Subject: RFR 8046013: TypeError: Cannot apply "with" to non script object Message-ID: <53AD6316.5060608@oracle.com> Please review http://cr.openjdk.java.net/~sundar/8046013/ for https://bugs.openjdk.java.net/browse/JDK-8046013 Thanks -Sundar From marcus.lagergren at oracle.com Sat Jun 28 13:19:04 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Sat, 28 Jun 2014 15:19:04 +0200 Subject: RFR 8046013: TypeError: Cannot apply "with" to non script object In-Reply-To: <53AD6316.5060608@oracle.com> References: <53AD6316.5060608@oracle.com> Message-ID: <4DF851A2-AF1F-4B0D-83BA-77D00D96ACC7@oracle.com> +1 On 27 Jun 2014, at 14:27, A. Sundararajan wrote: > Please review http://cr.openjdk.java.net/~sundar/8046013/ for https://bugs.openjdk.java.net/browse/JDK-8046013 > > Thanks > -Sundar From sundararajan.athijegannathan at oracle.com Mon Jun 30 14:26:51 2014 From: sundararajan.athijegannathan at oracle.com (A. Sundararajan) Date: Mon, 30 Jun 2014 19:56:51 +0530 Subject: RFR 8048718: JSON.parse('{"0":0, "64":0}') throws ArrayindexOutOfBoundsException Message-ID: <53B173AB.6010401@oracle.com> Please review http://cr.openjdk.java.net/~sundar/8048718/ Thanks -Sundar From hannes.wallnoefer at oracle.com Mon Jun 30 15:18:56 2014 From: hannes.wallnoefer at oracle.com (Hannes Wallnoefer) Date: Mon, 30 Jun 2014 17:18:56 +0200 Subject: Review request for JDK-8048586: String concatenation with optimistic types is slow Message-ID: <53B17FE0.9060501@oracle.com> Please review JDK-8048586: String concatenation with optimistic types is slow: http://cr.openjdk.java.net/~hannesw/8048586/ Thanks, Hannes From attila.szegedi at oracle.com Mon Jun 30 15:31:45 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Mon, 30 Jun 2014 17:31:45 +0200 Subject: Review request for JDK-8048586: String concatenation with optimistic types is slow In-Reply-To: <53B17FE0.9060501@oracle.com> References: <53B17FE0.9060501@oracle.com> Message-ID: <6E282505-C353-479F-8B88-1FF1B541D3EE@oracle.com> +1 On Jun 30, 2014, at 5:18 PM, Hannes Wallnoefer wrote: > Please review JDK-8048586: String concatenation with optimistic types is slow: > > http://cr.openjdk.java.net/~hannesw/8048586/ > > Thanks, > Hannes From attila.szegedi at oracle.com Mon Jun 30 15:31:51 2014 From: attila.szegedi at oracle.com (Attila Szegedi) Date: Mon, 30 Jun 2014 17:31:51 +0200 Subject: RFR 8048718: JSON.parse('{"0":0, "64":0}') throws ArrayindexOutOfBoundsException In-Reply-To: <53B173AB.6010401@oracle.com> References: <53B173AB.6010401@oracle.com> Message-ID: +1 On Jun 30, 2014, at 4:26 PM, A. Sundararajan wrote: > Please review http://cr.openjdk.java.net/~sundar/8048718/ > > Thanks > -Sundar From marcus.lagergren at oracle.com Mon Jun 30 16:27:03 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Mon, 30 Jun 2014 18:27:03 +0200 Subject: RFR 8048718: JSON.parse('{"0":0, "64":0}') throws ArrayindexOutOfBoundsException In-Reply-To: <53B173AB.6010401@oracle.com> References: <53B173AB.6010401@oracle.com> Message-ID: <3E8CDAF3-B78C-4D6F-A77F-96255A53C443@oracle.com> +1 On 30 Jun 2014, at 16:26, A. Sundararajan wrote: > Please review http://cr.openjdk.java.net/~sundar/8048718/ > > Thanks > -Sundar From marcus.lagergren at oracle.com Mon Jun 30 16:27:12 2014 From: marcus.lagergren at oracle.com (Marcus Lagergren) Date: Mon, 30 Jun 2014 18:27:12 +0200 Subject: Review request for JDK-8048586: String concatenation with optimistic types is slow In-Reply-To: <53B17FE0.9060501@oracle.com> References: <53B17FE0.9060501@oracle.com> Message-ID: +1 On 30 Jun 2014, at 17:18, Hannes Wallnoefer wrote: > Please review JDK-8048586: String concatenation with optimistic types is slow: > > http://cr.openjdk.java.net/~hannesw/8048586/ > > Thanks, > Hannes