Remove #[inline(never)]

This commit is contained in:
강동윤 2019-12-13 08:47:46 +09:00
parent 5076249c90
commit 6fc91f2017

View File

@ -21,7 +21,6 @@ struct Hygiene<'a> {
}
impl<'a> Hygiene<'a> {
#[inline(never)]
fn add_declared_ref(&mut self, ident: Ident) {
let ctxt = ident.span.ctxt();
@ -50,7 +49,6 @@ impl<'a> Hygiene<'a> {
self.rename(sym, ctxt);
}
#[inline(never)]
fn add_used_ref(&mut self, ident: Ident) {
let ctxt = ident.span.ctxt();
@ -65,7 +63,6 @@ impl<'a> Hygiene<'a> {
}
}
#[inline(never)]
fn rename(&mut self, sym: JsWord, ctxt: SyntaxContext) {
// symbol conflicts
let renamed = {
@ -326,7 +323,6 @@ impl<'a> Default for Scope<'a> {
}
impl<'a> Scope<'a> {
#[inline(never)]
pub fn new(kind: ScopeKind, parent: Option<&'a Scope<'a>>) -> Self {
Scope {
parent,
@ -337,7 +333,6 @@ impl<'a> Scope<'a> {
}
}
#[inline(never)]
fn scope_of(&self, sym: JsWord, ctxt: SyntaxContext) -> &'a Scope<'_> {
if let Some(prev) = self.declared_symbols.borrow().get(&sym) {
if prev.contains(&ctxt) {
@ -351,7 +346,6 @@ impl<'a> Scope<'a> {
}
}
#[inline(never)]
fn can_declare(&self, sym: JsWord, ctxt: SyntaxContext) -> bool {
match self.parent {
None => {}
@ -374,7 +368,7 @@ impl<'a> Scope<'a> {
///
/// It other words, all `SyntaxContext`s with same `sym` will be returned,
/// even when defined on parent scope.
#[inline(never)]
fn conflicts(&self, sym: JsWord, ctxt: SyntaxContext) -> Vec<SyntaxContext> {
if cfg!(debug_assertions) && LOG {
eprintln!("Finding conflicts for {}{:?} ", sym, ctxt);
@ -398,7 +392,6 @@ impl<'a> Scope<'a> {
ctxts
}
#[inline(never)]
fn change_symbol(&self, mut sym: JsWord, ctxt: SyntaxContext) -> JsWord {
let mut cur = Some(self);
@ -421,7 +414,6 @@ impl<'a> Scope<'a> {
sym
}
#[inline(never)]
fn is_declared(&self, sym: &JsWord) -> bool {
if self.declared_symbols.borrow().contains_key(sym) {
return true;