Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
2d22ffae
D
dragonwell8_hotspot
项目概览
openanolis
/
dragonwell8_hotspot
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_hotspot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2d22ffae
编写于
4月 29, 2013
作者:
H
hseigel
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
0f883f9f
32f125eb
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
26 addition
and
17 deletion
+26
-17
src/share/vm/classfile/javaClasses.cpp
src/share/vm/classfile/javaClasses.cpp
+8
-4
src/share/vm/classfile/javaClasses.hpp
src/share/vm/classfile/javaClasses.hpp
+1
-1
src/share/vm/classfile/symbolTable.cpp
src/share/vm/classfile/symbolTable.cpp
+1
-1
src/share/vm/memory/allocation.hpp
src/share/vm/memory/allocation.hpp
+3
-0
src/share/vm/oops/oop.cpp
src/share/vm/oops/oop.cpp
+10
-4
src/share/vm/prims/whitebox.cpp
src/share/vm/prims/whitebox.cpp
+3
-7
未找到文件。
src/share/vm/classfile/javaClasses.cpp
浏览文件 @
2d22ffae
...
...
@@ -315,14 +315,18 @@ Handle java_lang_String::char_converter(Handle java_string, jchar from_char, jch
return
string
;
}
jchar
*
java_lang_String
::
as_unicode_string
(
oop
java_string
,
int
&
length
)
{
jchar
*
java_lang_String
::
as_unicode_string
(
oop
java_string
,
int
&
length
,
TRAPS
)
{
typeArrayOop
value
=
java_lang_String
::
value
(
java_string
);
int
offset
=
java_lang_String
::
offset
(
java_string
);
length
=
java_lang_String
::
length
(
java_string
);
jchar
*
result
=
NEW_RESOURCE_ARRAY
(
jchar
,
length
);
for
(
int
index
=
0
;
index
<
length
;
index
++
)
{
result
[
index
]
=
value
->
char_at
(
index
+
offset
);
jchar
*
result
=
NEW_RESOURCE_ARRAY_RETURN_NULL
(
jchar
,
length
);
if
(
result
!=
NULL
)
{
for
(
int
index
=
0
;
index
<
length
;
index
++
)
{
result
[
index
]
=
value
->
char_at
(
index
+
offset
);
}
}
else
{
THROW_MSG_0
(
vmSymbols
::
java_lang_OutOfMemoryError
(),
"could not allocate Unicode string"
);
}
return
result
;
}
...
...
src/share/vm/classfile/javaClasses.hpp
浏览文件 @
2d22ffae
...
...
@@ -153,7 +153,7 @@ class java_lang_String : AllStatic {
static
char
*
as_utf8_string
(
oop
java_string
,
char
*
buf
,
int
buflen
);
static
char
*
as_utf8_string
(
oop
java_string
,
int
start
,
int
len
);
static
char
*
as_platform_dependent_str
(
Handle
java_string
,
TRAPS
);
static
jchar
*
as_unicode_string
(
oop
java_string
,
int
&
length
);
static
jchar
*
as_unicode_string
(
oop
java_string
,
int
&
length
,
TRAPS
);
// produce an ascii string with all other values quoted using \u####
static
char
*
as_quoted_ascii
(
oop
java_string
);
...
...
src/share/vm/classfile/symbolTable.cpp
浏览文件 @
2d22ffae
...
...
@@ -735,7 +735,7 @@ oop StringTable::intern(oop string, TRAPS)
ResourceMark
rm
(
THREAD
);
int
length
;
Handle
h_string
(
THREAD
,
string
);
jchar
*
chars
=
java_lang_String
::
as_unicode_string
(
string
,
length
);
jchar
*
chars
=
java_lang_String
::
as_unicode_string
(
string
,
length
,
CHECK_NULL
);
oop
result
=
intern
(
h_string
,
chars
,
length
,
CHECK_NULL
);
return
result
;
}
...
...
src/share/vm/memory/allocation.hpp
浏览文件 @
2d22ffae
...
...
@@ -539,6 +539,9 @@ class ResourceObj ALLOCATION_SUPER_CLASS_SPEC {
#define NEW_RESOURCE_ARRAY(type, size)\
(type*) resource_allocate_bytes((size) * sizeof(type))
#define NEW_RESOURCE_ARRAY_RETURN_NULL(type, size)\
(type*) resource_allocate_bytes((size) * sizeof(type), AllocFailStrategy::RETURN_NULL)
#define NEW_RESOURCE_ARRAY_IN_THREAD(thread, type, size)\
(type*) resource_allocate_bytes(thread, (size) * sizeof(type))
...
...
src/share/vm/oops/oop.cpp
浏览文件 @
2d22ffae
/*
* Copyright (c) 1997, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
3
, Oracle and/or its affiliates. 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
...
...
@@ -103,11 +103,17 @@ intptr_t oopDesc::slow_identity_hash() {
// When String table needs to rehash
unsigned
int
oopDesc
::
new_hash
(
jint
seed
)
{
EXCEPTION_MARK
;
ResourceMark
rm
;
int
length
;
jchar
*
chars
=
java_lang_String
::
as_unicode_string
(
this
,
length
);
// Use alternate hashing algorithm on the string
return
AltHashing
::
murmur3_32
(
seed
,
chars
,
length
);
jchar
*
chars
=
java_lang_String
::
as_unicode_string
(
this
,
length
,
THREAD
);
if
(
chars
!=
NULL
)
{
// Use alternate hashing algorithm on the string
return
AltHashing
::
murmur3_32
(
seed
,
chars
,
length
);
}
else
{
vm_exit_out_of_memory
(
length
,
"unable to create Unicode strings for String table rehash"
);
return
0
;
}
}
VerifyOopClosure
VerifyOopClosure
::
verify_oop
;
...
...
src/share/vm/prims/whitebox.cpp
浏览文件 @
2d22ffae
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012,
2013,
Oracle and/or its affiliates. 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
...
...
@@ -310,12 +310,8 @@ WB_END
WB_ENTRY
(
jboolean
,
WB_IsInStringTable
(
JNIEnv
*
env
,
jobject
o
,
jstring
javaString
))
ResourceMark
rm
(
THREAD
);
int
len
;
jchar
*
name
=
java_lang_String
::
as_unicode_string
(
JNIHandles
::
resolve
(
javaString
),
len
);
oop
found_string
=
StringTable
::
the_table
()
->
lookup
(
name
,
len
);
if
(
found_string
==
NULL
)
{
return
false
;
}
return
true
;
jchar
*
name
=
java_lang_String
::
as_unicode_string
(
JNIHandles
::
resolve
(
javaString
),
len
,
CHECK_false
);
return
(
StringTable
::
lookup
(
name
,
len
)
!=
NULL
);
WB_END
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录