1 Star 0 Fork 5

yelvens/luajit_anolis

forked from src-anolis-os/luajit 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0037-FFI-Add-tonumber-specialization-for-failed-conversio.patch 808 Bytes
一键复制 编辑 原始数据 按行查看 历史
xingwei-liu 提交于 2022-07-28 14:43 . init package version for an8.6
From 02b521981a1ab919ff2cd4d9bcaee80baf77dce2 Mon Sep 17 00:00:00 2001
From: Mike Pall <mike>
Date: Sun, 22 Apr 2018 13:27:25 +0200
Subject: [PATCH 37/72] FFI: Add tonumber() specialization for failed
conversions.
Contributed by Javier Guerra Giraldez.
---
src/lj_crecord.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/lj_crecord.c b/src/lj_crecord.c
index 84fc49e..bc88d63 100644
--- a/src/lj_crecord.c
+++ b/src/lj_crecord.c
@@ -1661,6 +1661,8 @@ void LJ_FASTCALL lj_crecord_tonumber(jit_State *J, RecordFFData *rd)
d = ctype_get(cts, CTID_DOUBLE);
J->base[0] = crec_ct_tv(J, d, 0, J->base[0], &rd->argv[0]);
} else {
+ /* Specialize to the ctype that couldn't be converted. */
+ argv2cdata(J, J->base[0], &rd->argv[0]);
J->base[0] = TREF_NIL;
}
}
--
2.20.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ihuang77/luajit_anolis.git
git@gitee.com:ihuang77/luajit_anolis.git
ihuang77
luajit_anolis
luajit_anolis
a8

搜索帮助

0d507c66 1850385 C8b1a773 1850385