Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
08f5910a
D
dragonwell8_langtools
项目概览
openanolis
/
dragonwell8_langtools
通知
0
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_langtools
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
08f5910a
编写于
4月 08, 2013
作者:
M
mcimadamore
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8010404: Lambda debugging: redundant LineNumberTable entry for lambda capture
Summary: Ignore indy entries in LineNumberTable Reviewed-by: jjg
上级
e089ee19
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
32 addition
and
7 deletion
+32
-7
src/share/classes/com/sun/tools/javac/jvm/Code.java
src/share/classes/com/sun/tools/javac/jvm/Code.java
+9
-1
src/share/classes/com/sun/tools/javac/jvm/Gen.java
src/share/classes/com/sun/tools/javac/jvm/Gen.java
+6
-3
test/tools/javac/lambda/TestInvokeDynamic.java
test/tools/javac/lambda/TestInvokeDynamic.java
+17
-3
未找到文件。
src/share/classes/com/sun/tools/javac/jvm/Code.java
浏览文件 @
08f5910a
...
...
@@ -470,7 +470,15 @@ public class Code {
public
void
emitInvokedynamic
(
int
desc
,
Type
mtype
)
{
// N.B. this format is under consideration by the JSR 292 EG
int
argsize
=
width
(
mtype
.
getParameterTypes
());
emitop
(
invokedynamic
);
int
prevPos
=
pendingStatPos
;
try
{
//disable line number generation (we could have used 'emit1', that
//bypasses stackmap generation - which is needed for indy calls)
pendingStatPos
=
Position
.
NOPOS
;
emitop
(
invokedynamic
);
}
finally
{
pendingStatPos
=
prevPos
;
}
if
(!
alive
)
return
;
emit2
(
desc
);
emit2
(
0
);
...
...
src/share/classes/com/sun/tools/javac/jvm/Gen.java
浏览文件 @
08f5910a
...
...
@@ -1748,10 +1748,13 @@ public class Gen extends JCTree.Visitor {
// Generate code for all arguments, where the expected types are
// the parameters of the method's external type (that is, any implicit
// outer instance of a super(...) call appears as first parameter).
MethodSymbol
msym
=
(
MethodSymbol
)
TreeInfo
.
symbol
(
tree
.
meth
);
genArgs
(
tree
.
args
,
TreeInfo
.
symbol
(
tree
.
meth
).
externalType
(
types
).
getParameterTypes
());
code
.
statBegin
(
tree
.
pos
);
code
.
markStatBegin
();
msym
.
externalType
(
types
).
getParameterTypes
());
if
(!
msym
.
isDynamic
())
{
code
.
statBegin
(
tree
.
pos
);
code
.
markStatBegin
();
}
result
=
m
.
invoke
();
}
...
...
test/tools/javac/lambda/TestInvokeDynamic.java
浏览文件 @
08f5910a
...
...
@@ -24,7 +24,7 @@
/*
* @test
* @bug 7194586
* @bug 8003280 8006694
* @bug 8003280 8006694
8010404
* @summary Add lambda tests
* Add back-end support for invokedynamic
* temporarily workaround combo tests are causing time out in several platforms
...
...
@@ -48,6 +48,7 @@ import com.sun.tools.classfile.ClassFile;
import
com.sun.tools.classfile.Code_attribute
;
import
com.sun.tools.classfile.ConstantPool.*
;
import
com.sun.tools.classfile.Instruction
;
import
com.sun.tools.classfile.LineNumberTable_attribute
;
import
com.sun.tools.classfile.Method
;
import
com.sun.tools.javac.api.JavacTaskImpl
;
...
...
@@ -239,7 +240,7 @@ public class TestInvokeDynamic
int
id
=
checkCount
.
incrementAndGet
();
JavaSource
source
=
new
JavaSource
(
id
);
JavacTaskImpl
ct
=
(
JavacTaskImpl
)
comp
.
getTask
(
null
,
fm
.
get
(),
dc
,
null
,
null
,
Arrays
.
asList
(
source
));
Arrays
.
asList
(
"-g"
)
,
null
,
Arrays
.
asList
(
source
));
Context
context
=
ct
.
getContext
();
Symtab
syms
=
Symtab
.
instance
(
context
);
Names
names
=
Names
.
instance
(
context
);
...
...
@@ -349,6 +350,16 @@ public class TestInvokeDynamic
bsm_ref
.
getNameAndTypeInfo
().
getType
()
+
" "
+
asBSMSignatureString
());
}
LineNumberTable_attribute
lnt
=
(
LineNumberTable_attribute
)
ea
.
attributes
.
get
(
Attribute
.
LineNumberTable
);
if
(
lnt
==
null
)
{
throw
new
Error
(
"No LineNumberTable attribute"
);
}
if
(
lnt
.
line_number_table_length
!=
2
)
{
throw
new
Error
(
"Wrong number of entries in LineNumberTable"
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
Error
(
"error reading "
+
compiledTest
+
": "
+
e
);
...
...
@@ -376,7 +387,10 @@ public class TestInvokeDynamic
"}\n"
+
"class Test#ID {\n"
+
" void m() { }\n"
+
" void test() { m(); }\n"
+
" void test() {\n"
+
" Object o = this; // marker statement \n"
+
" m();\n"
+
" }\n"
+
"}"
;
String
source
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录