Skip to content

Commit 862edd8

Browse files
committed
inline some table ops
1 parent b4227b7 commit 862edd8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

crates/luars/src/lua_value/lua_table/native_table.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,12 @@ impl NativeTable {
384384
/// Performs at most one chain walk and reports whether the operation fully
385385
/// completed on the fast path or must be finished through a C-Lua-like
386386
/// encoded continuation.
387+
#[inline(always)]
387388
pub fn pset_shortstr(&mut self, key: &LuaValue, value: LuaValue) -> ShortStrSetResult {
388389
self.pset_shortstr_parts(key, value.value, value.tt)
389390
}
390391

392+
#[inline(always)]
391393
pub(crate) fn pset_shortstr_parts(
392394
&mut self,
393395
key: &LuaValue,
@@ -515,6 +517,7 @@ impl NativeTable {
515517
((node as usize) - (self.node as usize)) / std::mem::size_of::<Node>()
516518
}
517519

520+
#[inline(always)]
518521
pub fn finish_shortstr_set(
519522
&mut self,
520523
key: &LuaValue,

0 commit comments

Comments
 (0)