aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/CodegenRust.py
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-06-06 08:25:29 -0500
committerbors-servo <metajack+bors@gmail.com>2015-06-06 08:25:29 -0500
commit78665336e6a3d57e43610365f52ce038ba0d9e8b (patch)
tree9abbf0a3753426a9ddbc82b61a16dcf387765c73 /components/script/dom/bindings/codegen/CodegenRust.py
parent493f96b9ab73d41286407a78930f481a6f1b94e9 (diff)
parent172fbcad277ed04e5c6994ad6025af3419cc99ce (diff)
downloadservo-78665336e6a3d57e43610365f52ce038ba0d9e8b.tar.gz
servo-78665336e6a3d57e43610365f52ce038ba0d9e8b.zip
Auto merge of #6297 - brson:inline, r=jdm
This results in a 14% compile time improvement. See https://gist.github.com/brson/b48dd03b06c406be68e6 I'm not suggesting you merge this as-is, but you might consider whether removing some of these is worth pursuing. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6297) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index ebc5ec4e069..7a3c1a3abb1 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -1887,7 +1887,7 @@ class CGAbstractMethod(CGThing):
def _decorators(self):
decorators = []
if self.alwaysInline:
- decorators.append('#[inline(always)]')
+ decorators.append('#[inline]')
if self.extern:
decorators.append('unsafe')
@@ -5482,7 +5482,7 @@ impl ${selfName} for ${baseName} {
cast = [CGGeneric(string.Template("""\
pub struct ${name}Cast;
impl ${name}Cast {
- #[inline(always)]
+ #[inline]
pub fn to_ref<'a, T: ${toBound}+Reflectable>(base: JSRef<'a, T>) -> Option<JSRef<'a, ${name}>> {
match base.${checkFn}() {
true => Some(unsafe { mem::transmute(base) }),
@@ -5490,7 +5490,7 @@ impl ${name}Cast {
}
}
- #[inline(always)]
+ #[inline]
pub fn to_borrowed_ref<'a, 'b, T: ${toBound}+Reflectable>(base: &'a JSRef<'b, T>) -> Option<&'a JSRef<'b, ${name}>> {
match base.${checkFn}() {
true => Some(unsafe { mem::transmute(base) }),
@@ -5498,7 +5498,7 @@ impl ${name}Cast {
}
}
- #[inline(always)]
+ #[inline]
#[allow(unrooted_must_root)]
pub fn to_layout_js<T: ${toBound}+Reflectable>(base: &LayoutJS<T>) -> Option<LayoutJS<${name}>> {
unsafe {
@@ -5509,7 +5509,7 @@ impl ${name}Cast {
}
}
- #[inline(always)]
+ #[inline]
pub fn to_temporary<T: ${toBound}+Reflectable>(base: Temporary<T>) -> Option<Temporary<${name}>> {
match base.root().r().${checkFn}() {
true => Some(unsafe { mem::transmute(base) }),
@@ -5517,28 +5517,28 @@ impl ${name}Cast {
}
}
- #[inline(always)]
+ #[inline]
pub fn from_ref<'a, T: ${fromBound}+Reflectable>(derived: JSRef<'a, T>) -> JSRef<'a, ${name}> {
unsafe { mem::transmute(derived) }
}
- #[inline(always)]
+ #[inline]
pub fn from_borrowed_ref<'a, 'b, T: ${fromBound}+Reflectable>(derived: &'a JSRef<'b, T>) -> &'a JSRef<'b, ${name}> {
unsafe { mem::transmute(derived) }
}
- #[inline(always)]
+ #[inline]
#[allow(unrooted_must_root)]
pub fn from_layout_js<T: ${fromBound}+Reflectable>(derived: &LayoutJS<T>) -> LayoutJS<${name}> {
unsafe { mem::transmute_copy(derived) }
}
- #[inline(always)]
+ #[inline]
pub fn from_temporary<T: ${fromBound}+Reflectable>(derived: Temporary<T>) -> Temporary<${name}> {
unsafe { mem::transmute(derived) }
}
- #[inline(always)]
+ #[inline]
pub fn from_actual<'a, T: ${fromBound}+Reflectable>(derived: &'a T) -> &'a ${name} {
unsafe { mem::transmute(derived) }
}