Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
24cda9fb
R
Rust
项目概览
int
/
Rust
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
24cda9fb
编写于
5月 03, 2013
作者:
A
Alex Crichton
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove pub from core::{unicode,cmath,stackwalk,rt}
上级
9a31cdb9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
23 deletion
+22
-23
src/libcore/char.rs
src/libcore/char.rs
+16
-17
src/libcore/core.rc
src/libcore/core.rc
+4
-4
src/libcore/gc.rs
src/libcore/gc.rs
+2
-2
未找到文件。
src/libcore/char.rs
浏览文件 @
24cda9fb
...
...
@@ -16,7 +16,7 @@
use
str
;
use
u32
;
use
uint
;
use
unicode
;
use
unicode
::{
derived_property
,
general_category
}
;
#[cfg(notest)]
use
cmp
::
Eq
;
...
...
@@ -53,10 +53,9 @@
Cn Unassigned a reserved unassigned code point or a noncharacter
*/
pub
use
is_alphabetic
=
unicode
::
derived_property
::
Alphabetic
;
pub
use
is_XID_start
=
unicode
::
derived_property
::
XID_Start
;
pub
use
is_XID_continue
=
unicode
::
derived_property
::
XID_Continue
;
pub
fn
is_alphabetic
(
c
:
char
)
->
bool
{
derived_property
::
Alphabetic
(
c
)
}
pub
fn
is_XID_start
(
c
:
char
)
->
bool
{
derived_property
::
XID_Start
(
c
)
}
pub
fn
is_XID_continue
(
c
:
char
)
->
bool
{
derived_property
::
XID_Continue
(
c
)
}
/**
* Indicates whether a character is in lower case, defined
...
...
@@ -64,7 +63,7 @@
*/
#[inline(always)]
pub
fn
is_lowercase
(
c
:
char
)
->
bool
{
return
unicode
::
general_category
::
Ll
(
c
);
return
general_category
::
Ll
(
c
);
}
/**
...
...
@@ -73,7 +72,7 @@ pub fn is_lowercase(c: char) -> bool {
*/
#[inline(always)]
pub
fn
is_uppercase
(
c
:
char
)
->
bool
{
return
unicode
::
general_category
::
Lu
(
c
);
return
general_category
::
Lu
(
c
);
}
/**
...
...
@@ -84,9 +83,9 @@ pub fn is_uppercase(c: char) -> bool {
#[inline(always)]
pub
fn
is_whitespace
(
c
:
char
)
->
bool
{
return
(
'\x09'
<=
c
&&
c
<=
'\x0d'
)
||
unicode
::
general_category
::
Zs
(
c
)
||
unicode
::
general_category
::
Zl
(
c
)
||
unicode
::
general_category
::
Zp
(
c
);
||
general_category
::
Zs
(
c
)
||
general_category
::
Zl
(
c
)
||
general_category
::
Zp
(
c
);
}
/**
...
...
@@ -96,18 +95,18 @@ pub fn is_whitespace(c: char) -> bool {
*/
#[inline(always)]
pub
fn
is_alphanumeric
(
c
:
char
)
->
bool
{
return
unicode
::
derived_property
::
Alphabetic
(
c
)
||
unicode
::
general_category
::
Nd
(
c
)
||
unicode
::
general_category
::
Nl
(
c
)
||
unicode
::
general_category
::
No
(
c
);
return
derived_property
::
Alphabetic
(
c
)
||
general_category
::
Nd
(
c
)
||
general_category
::
Nl
(
c
)
||
general_category
::
No
(
c
);
}
/// Indicates whether the character is numeric (Nd, Nl, or No)
#[inline(always)]
pub
fn
is_digit
(
c
:
char
)
->
bool
{
return
unicode
::
general_category
::
Nd
(
c
)
||
unicode
::
general_category
::
Nl
(
c
)
||
unicode
::
general_category
::
No
(
c
);
return
general_category
::
Nd
(
c
)
||
general_category
::
Nl
(
c
)
||
general_category
::
No
(
c
);
}
/**
...
...
src/libcore/core.rc
浏览文件 @
24cda9fb
...
...
@@ -247,12 +247,12 @@ pub mod unstable;
/* For internal use, not exported */
pub
mod unicode;
mod unicode;
#[path = "num/cmath.rs"]
pub
mod cmath;
pub
mod stackwalk;
mod cmath;
mod stackwalk;
#[path = "rt/mod.rs"]
pub
mod rt;
mod rt;
// A curious inner-module that's not exported that contains the binding
// 'core' so that macro-expanded references to core::error and such
...
...
src/libcore/gc.rs
浏览文件 @
24cda9fb
...
...
@@ -44,7 +44,7 @@
use
option
::{
None
,
Option
,
Some
};
use
ptr
;
use
hashmap
::
HashSet
;
use
stackwalk
;
use
stackwalk
::
walk_stack
;
use
sys
;
pub
use
stackwalk
::
Word
;
...
...
@@ -230,7 +230,7 @@ unsafe fn walk_gc_roots(mem: Memory, sentinel: **Word, visitor: Visitor) {
// frame is marked by a sentinel, which is a box pointer stored on
// the stack.
let
mut
reached_sentinel
=
ptr
::
is_null
(
sentinel
);
for
stackwalk
::
walk_stack
|
frame
|
{
for
walk_stack
|
frame
|
{
let
pc
=
last_ret
;
let
Segment
{
segment
:
next_segment
,
boundary
:
boundary
}
=
find_segment_for_frame
(
frame
.fp
,
segment
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录