lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-6964) Small changes in expressions module
Date Thu, 07 Jan 2016 22:26:40 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-6964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15088255#comment-15088255
] 

ASF subversion and git services commented on LUCENE-6964:
---------------------------------------------------------

Commit 1723637 from [~thetaphi] in branch 'dev/branches/branch_5x'
[ https://svn.apache.org/r1723637 ]

Merged revision(s) 1723636 from lucene/dev/trunk:
LUCENE-6964: String-based signatures in JavascriptCompiler replaced with better compile-time-checked
MethodType; generated class files are no longer marked as synthetic

> Small changes in expressions module
> -----------------------------------
>
>                 Key: LUCENE-6964
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6964
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/expressions
>    Affects Versions: 5.4
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 5.5, Trunk
>
>         Attachments: LUCENE-6964.patch
>
>
> This patch is not really worth an issue, but it has 2 small changes in expression's JavaScriptCompiler:
> - On the OpenJDK mailinglists from time to time people want to have "nice stack traces"
(this got worse with Lambda expressions). Since Java 8u60 they now hide some stack frames
automatically. Under discussion was to use the "synthetic" bytecode attribute for that. They
did not do that; instead they have a new annotation ({{@LambdaForm.Hidden}}). In any case,
I will remove the synthetic annotation from the generated class file, because it is not really
applicable (and also brings nothing): "A class member that does not appear in the source code
must be marked using a Synthetic attribute, or else it must have its ACC_SYNTHETIC flag set.
The only exceptions to this requirement are compiler-generated methods which are not considered
implementation artifacts, namely the instance initialization method representing a default
constructor of the Java programming language (§2.9), the class initialization method (§2.9),
and the Enum.values() and Enum.valueOf() methods.". In our case the expressions class has
source code (just not Java), so we should not make it synthetic. So there is also no risk
that the stack frames get hidden in future (if OpenJDK thinks different).
> - The code has currently some string-based method signatures. They tend to get broken
because we have no compile-time checks. I replaced those with compile-time class constants
using Java 7's MethodType to create the descriptor. For me the code is more readable. The
change is a no-op as its constants only.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message