mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Eliminate loop in setnodekey and getnodekey in hope that this produces better code in debug.
This commit is contained in:
parent
0d3761dca1
commit
a3b5b26c0a
1 changed files with 2 additions and 4 deletions
|
@ -394,8 +394,7 @@ typedef struct LuaNode
|
||||||
LuaNode* n_ = (node); \
|
LuaNode* n_ = (node); \
|
||||||
const TValue* i_o = (obj); \
|
const TValue* i_o = (obj); \
|
||||||
n_->key.value = i_o->value; \
|
n_->key.value = i_o->value; \
|
||||||
for (int i = 0; i < LUA_EXTRA_VALUE_SIZE; i++) \
|
memcpy(n_->key.extra, i_o->extra, sizeof(n_->key.extra)); \
|
||||||
n_->key.extra[i] = i_o->extra[i]; \
|
|
||||||
n_->key.tt = i_o->tt; \
|
n_->key.tt = i_o->tt; \
|
||||||
checkliveness(L->global, i_o); \
|
checkliveness(L->global, i_o); \
|
||||||
}
|
}
|
||||||
|
@ -406,8 +405,7 @@ typedef struct LuaNode
|
||||||
TValue* i_o = (obj); \
|
TValue* i_o = (obj); \
|
||||||
const LuaNode* n_ = (node); \
|
const LuaNode* n_ = (node); \
|
||||||
i_o->value = n_->key.value; \
|
i_o->value = n_->key.value; \
|
||||||
for (int i = 0; i < LUA_EXTRA_VALUE_SIZE; i++) \
|
memcpy(i_o->extra, n_->key.extra, sizeof(i_o->extra)); \
|
||||||
i_o->extra[i] = n_->key.extra[i]; \
|
|
||||||
i_o->tt = n_->key.tt; \
|
i_o->tt = n_->key.tt; \
|
||||||
checkliveness(L->global, i_o); \
|
checkliveness(L->global, i_o); \
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue