Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
f60e8fd4
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看板
提交
f60e8fd4
编写于
10月 20, 2009
作者:
J
jjg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6893062: remove support for obsolete attributes
Reviewed-by: ksrini
上级
10da673d
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
0 addition
and
310 deletion
+0
-310
src/share/classes/com/sun/tools/classfile/Attribute.java
src/share/classes/com/sun/tools/classfile/Attribute.java
+0
-20
src/share/classes/com/sun/tools/classfile/ClassWriter.java
src/share/classes/com/sun/tools/classfile/ClassWriter.java
+0
-19
src/share/classes/com/sun/tools/classfile/ModuleExportTable_attribute.java
.../com/sun/tools/classfile/ModuleExportTable_attribute.java
+0
-70
src/share/classes/com/sun/tools/classfile/ModuleMemberTable_attribute.java
.../com/sun/tools/classfile/ModuleMemberTable_attribute.java
+0
-69
src/share/classes/com/sun/tools/classfile/Module_attribute.java
...are/classes/com/sun/tools/classfile/Module_attribute.java
+0
-64
src/share/classes/com/sun/tools/javap/AttributeWriter.java
src/share/classes/com/sun/tools/javap/AttributeWriter.java
+0
-60
src/share/classes/com/sun/tools/javap/JavapTask.java
src/share/classes/com/sun/tools/javap/JavapTask.java
+0
-7
src/share/classes/com/sun/tools/javap/Options.java
src/share/classes/com/sun/tools/javap/Options.java
+0
-1
未找到文件。
src/share/classes/com/sun/tools/classfile/Attribute.java
浏览文件 @
f60e8fd4
...
...
@@ -64,11 +64,6 @@ public abstract class Attribute {
public
static
final
String
StackMapTable
=
"StackMapTable"
;
public
static
final
String
Synthetic
=
"Synthetic"
;
// JSR 277/294
public
static
final
String
Module
=
"Module"
;
public
static
final
String
ModuleExportTable
=
"ModuleExportTable"
;
public
static
final
String
ModuleMemberTable
=
"ModuleMemberTable"
;
public
static
class
Factory
{
public
Factory
()
{
// defer init of standardAttributeClasses until after options set up
...
...
@@ -78,10 +73,6 @@ public abstract class Attribute {
this
.
compat
=
compat
;
}
public
void
setJSR277
(
boolean
jsr277
)
{
this
.
jsr277
=
jsr277
;
}
public
Attribute
createAttribute
(
ClassReader
cr
,
int
name_index
,
byte
[]
data
)
throws
IOException
{
if
(
standardAttributes
==
null
)
...
...
@@ -121,12 +112,6 @@ public abstract class Attribute {
standardAttributes
.
put
(
LocalVariableTable
,
LocalVariableTable_attribute
.
class
);
standardAttributes
.
put
(
LocalVariableTypeTable
,
LocalVariableTypeTable_attribute
.
class
);
if
(
jsr277
)
{
standardAttributes
.
put
(
Module
,
Module_attribute
.
class
);
standardAttributes
.
put
(
ModuleExportTable
,
ModuleExportTable_attribute
.
class
);
standardAttributes
.
put
(
ModuleMemberTable
,
ModuleMemberTable_attribute
.
class
);
}
if
(!
compat
)
{
// old javap does not recognize recent attributes
standardAttributes
.
put
(
CompilationID
,
CompilationID_attribute
.
class
);
standardAttributes
.
put
(
RuntimeInvisibleAnnotations
,
RuntimeInvisibleAnnotations_attribute
.
class
);
...
...
@@ -148,7 +133,6 @@ public abstract class Attribute {
private
Map
<
String
,
Class
<?
extends
Attribute
>>
standardAttributes
;
private
boolean
compat
;
// don't support recent attrs in compatibility mode
private
boolean
jsr277
;
// support new jsr277 attrs
}
public
static
Attribute
read
(
ClassReader
cr
)
throws
IOException
{
...
...
@@ -201,9 +185,5 @@ public abstract class Attribute {
R
visitStackMap
(
StackMap_attribute
attr
,
P
p
);
R
visitStackMapTable
(
StackMapTable_attribute
attr
,
P
p
);
R
visitSynthetic
(
Synthetic_attribute
attr
,
P
p
);
R
visitModule
(
Module_attribute
attr
,
P
p
);
R
visitModuleExportTable
(
ModuleExportTable_attribute
attr
,
P
p
);
R
visitModuleMemberTable
(
ModuleMemberTable_attribute
attr
,
P
p
);
}
}
src/share/classes/com/sun/tools/classfile/ClassWriter.java
浏览文件 @
f60e8fd4
...
...
@@ -449,25 +449,6 @@ public class ClassWriter {
out
.
writeShort
(
entry
.
index
);
}
public
Void
visitModule
(
Module_attribute
attr
,
ClassOutputStream
out
)
{
out
.
writeShort
(
attr
.
module_name
);
return
null
;
}
public
Void
visitModuleExportTable
(
ModuleExportTable_attribute
attr
,
ClassOutputStream
out
)
{
out
.
writeShort
(
attr
.
export_type_table
.
length
);
for
(
int
i:
attr
.
export_type_table
)
out
.
writeShort
(
i
);
return
null
;
}
public
Void
visitModuleMemberTable
(
ModuleMemberTable_attribute
attr
,
ClassOutputStream
out
)
{
out
.
writeShort
(
attr
.
package_member_table
.
length
);
for
(
int
i:
attr
.
package_member_table
)
out
.
writeShort
(
i
);
return
null
;
}
public
Void
visitRuntimeVisibleAnnotations
(
RuntimeVisibleAnnotations_attribute
attr
,
ClassOutputStream
out
)
{
annotationWriter
.
write
(
attr
.
annotations
,
out
);
return
null
;
...
...
src/share/classes/com/sun/tools/classfile/ModuleExportTable_attribute.java
已删除
100644 → 0
浏览文件 @
10da673d
/*
* Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package
com.sun.tools.classfile
;
import
java.io.IOException
;
/**
* See JSR 277.
*
* <p><b>This is NOT part of any API supported by Sun Microsystems. If
* you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*/
public
class
ModuleExportTable_attribute
extends
Attribute
{
ModuleExportTable_attribute
(
ClassReader
cr
,
int
name_index
,
int
length
)
throws
IOException
{
super
(
name_index
,
length
);
int
export_type_length
=
cr
.
readUnsignedShort
();
export_type_table
=
new
int
[
export_type_length
];
for
(
int
i
=
0
;
i
<
export_type_table
.
length
;
i
++)
export_type_table
[
i
]
=
cr
.
readUnsignedShort
();
}
public
ModuleExportTable_attribute
(
ConstantPool
cp
,
int
[]
export_type_table
)
throws
ConstantPoolException
{
this
(
cp
.
getUTF8Index
(
Attribute
.
ModuleExportTable
),
export_type_table
);
}
public
ModuleExportTable_attribute
(
int
name_index
,
int
[]
export_type_table
)
{
super
(
name_index
,
2
+
2
*
export_type_table
.
length
);
this
.
export_type_table
=
export_type_table
;
}
public
int
getExportTypeCount
()
{
return
export_type_table
.
length
;
}
public
String
getExportTypeName
(
int
index
,
ConstantPool
constant_pool
)
throws
ConstantPoolException
{
return
constant_pool
.
getUTF8Value
(
export_type_table
[
index
]);
}
public
<
R
,
P
>
R
accept
(
Visitor
<
R
,
P
>
visitor
,
P
p
)
{
return
visitor
.
visitModuleExportTable
(
this
,
p
);
}
public
final
int
[]
export_type_table
;
}
src/share/classes/com/sun/tools/classfile/ModuleMemberTable_attribute.java
已删除
100644 → 0
浏览文件 @
10da673d
/*
* Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package
com.sun.tools.classfile
;
import
java.io.IOException
;
/**
* See JSR 277.
*
* <p><b>This is NOT part of any API supported by Sun Microsystems. If
* you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*/
public
class
ModuleMemberTable_attribute
extends
Attribute
{
ModuleMemberTable_attribute
(
ClassReader
cr
,
int
name_index
,
int
length
)
throws
IOException
{
super
(
name_index
,
length
);
int
package_member_length
=
cr
.
readUnsignedShort
();
package_member_table
=
new
int
[
package_member_length
];
for
(
int
i
=
0
;
i
<
package_member_table
.
length
;
i
++)
package_member_table
[
i
]
=
cr
.
readUnsignedShort
();
}
public
ModuleMemberTable_attribute
(
ConstantPool
cp
,
int
[]
package_member_table
)
throws
ConstantPoolException
{
this
(
cp
.
getUTF8Index
(
Attribute
.
ModuleMemberTable
),
package_member_table
);
}
public
ModuleMemberTable_attribute
(
int
name_index
,
int
[]
package_member_table
)
{
super
(
name_index
,
2
+
2
*
package_member_table
.
length
);
this
.
package_member_table
=
package_member_table
;
}
public
int
getPackageMemberCount
()
{
return
package_member_table
.
length
;
}
public
String
getPackageMemberName
(
int
index
,
ConstantPool
constant_pool
)
throws
ConstantPoolException
{
return
constant_pool
.
getUTF8Value
(
package_member_table
[
index
]);
}
public
<
R
,
P
>
R
accept
(
Visitor
<
R
,
P
>
visitor
,
P
p
)
{
return
visitor
.
visitModuleMemberTable
(
this
,
p
);
}
public
final
int
[]
package_member_table
;
}
src/share/classes/com/sun/tools/classfile/Module_attribute.java
已删除
100644 → 0
浏览文件 @
10da673d
/*
* Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package
com.sun.tools.classfile
;
import
java.io.IOException
;
/**
* See JSR 277.
*
* <p><b>This is NOT part of any API supported by Sun Microsystems. If
* you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*/
public
class
Module_attribute
extends
Attribute
{
Module_attribute
(
ClassReader
cr
,
int
name_index
,
int
length
)
throws
IOException
{
super
(
name_index
,
length
);
module_name
=
cr
.
readUnsignedShort
();
}
public
Module_attribute
(
ConstantPool
constant_pool
,
int
module_name
)
throws
ConstantPoolException
{
this
(
constant_pool
.
getUTF8Index
(
Attribute
.
Module
),
module_name
);
}
public
Module_attribute
(
int
name_index
,
int
module_name
)
{
super
(
name_index
,
2
);
this
.
module_name
=
module_name
;
}
public
String
getModuleName
(
ConstantPool
constant_pool
)
throws
ConstantPoolException
{
return
constant_pool
.
getUTF8Value
(
module_name
);
}
public
<
R
,
D
>
R
accept
(
Visitor
<
R
,
D
>
visitor
,
D
data
)
{
return
visitor
.
visitModule
(
this
,
data
);
}
public
final
int
module_name
;
}
src/share/classes/com/sun/tools/javap/AttributeWriter.java
浏览文件 @
f60e8fd4
...
...
@@ -45,9 +45,6 @@ import com.sun.tools.classfile.InnerClasses_attribute;
import
com.sun.tools.classfile.LineNumberTable_attribute
;
import
com.sun.tools.classfile.LocalVariableTable_attribute
;
import
com.sun.tools.classfile.LocalVariableTypeTable_attribute
;
import
com.sun.tools.classfile.ModuleExportTable_attribute
;
import
com.sun.tools.classfile.ModuleMemberTable_attribute
;
import
com.sun.tools.classfile.Module_attribute
;
import
com.sun.tools.classfile.RuntimeInvisibleAnnotations_attribute
;
import
com.sun.tools.classfile.RuntimeInvisibleParameterAnnotations_attribute
;
import
com.sun.tools.classfile.RuntimeInvisibleTypeAnnotations_attribute
;
...
...
@@ -372,63 +369,6 @@ public class AttributeWriter extends BasicWriter
return
null
;
}
public
Void
visitModule
(
Module_attribute
attr
,
Void
ignore
)
{
print
(
"Module: #"
+
attr
.
module_name
);
tab
();
println
(
"// "
+
getModuleName
(
attr
));
return
null
;
}
String
getModuleName
(
Module_attribute
attr
)
{
try
{
return
attr
.
getModuleName
(
constant_pool
);
}
catch
(
ConstantPoolException
e
)
{
return
report
(
e
);
}
}
public
Void
visitModuleExportTable
(
ModuleExportTable_attribute
attr
,
Void
ignore
)
{
println
(
"ModuleExportTable:"
);
indent
(+
1
);
println
(
"Types: ("
+
attr
.
export_type_table
.
length
+
")"
);
for
(
int
i
=
0
;
i
<
attr
.
export_type_table
.
length
;
i
++)
{
print
(
"#"
+
attr
.
export_type_table
[
i
]);
tab
();
println
(
"// "
+
getExportTypeName
(
attr
,
i
));
}
indent
(-
1
);
return
null
;
}
String
getExportTypeName
(
ModuleExportTable_attribute
attr
,
int
index
)
{
try
{
return
attr
.
getExportTypeName
(
index
,
constant_pool
);
}
catch
(
ConstantPoolException
e
)
{
return
report
(
e
);
}
}
public
Void
visitModuleMemberTable
(
ModuleMemberTable_attribute
attr
,
Void
ignore
)
{
println
(
"ModuleMemberTable:"
);
indent
(+
1
);
println
(
"Packages: ("
+
attr
.
package_member_table
.
length
+
")"
);
for
(
int
i
=
0
;
i
<
attr
.
package_member_table
.
length
;
i
++)
{
print
(
"#"
+
attr
.
package_member_table
[
i
]);
tab
();
println
(
"// "
+
getPackageMemberName
(
attr
,
i
));
}
indent
(-
1
);
return
null
;
}
String
getPackageMemberName
(
ModuleMemberTable_attribute
attr
,
int
index
)
{
try
{
return
attr
.
getPackageMemberName
(
index
,
constant_pool
);
}
catch
(
ConstantPoolException
e
)
{
return
report
(
e
);
}
}
public
Void
visitRuntimeVisibleAnnotations
(
RuntimeVisibleAnnotations_attribute
attr
,
Void
ignore
)
{
println
(
"RuntimeVisibleAnnotations:"
);
indent
(+
1
);
...
...
src/share/classes/com/sun/tools/javap/JavapTask.java
浏览文件 @
f60e8fd4
...
...
@@ -236,12 +236,6 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages {
}
},
new
Option
(
false
,
"-XDjsr277"
)
{
void
process
(
JavapTask
task
,
String
opt
,
String
arg
)
{
task
.
options
.
jsr277
=
true
;
}
},
new
Option
(
false
,
"-XDdetails"
)
{
void
process
(
JavapTask
task
,
String
opt
,
String
arg
)
{
task
.
options
.
details
=
EnumSet
.
allOf
(
InstructionDetailWriter
.
Kind
.
class
);
...
...
@@ -586,7 +580,6 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages {
sourceWriter
.
setFileManager
(
fileManager
);
attributeFactory
.
setCompat
(
options
.
compat
);
attributeFactory
.
setJSR277
(
options
.
jsr277
);
boolean
ok
=
true
;
...
...
src/share/classes/com/sun/tools/javap/Options.java
浏览文件 @
f60e8fd4
...
...
@@ -90,5 +90,4 @@ public class Options {
public
int
tabColumn
=
40
;
// column number for comments
public
boolean
compat
;
// bug-for-bug compatibility mode with old javap
public
boolean
jsr277
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录