-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow force noinline #21
Comments
这个在语义上有影响吗 |
如果inline所有高阶函数就不需要处理变量捕获了,性能.inc()(心理作用 |
应该还是有吧,对C++来说一个lambda就是一个类和它的单例对象啊,然后实际上发生了很多编译期隐式转换的 |
(然而你不知道有顶层作用域的吗,反正捕获是少不了的了 |
但如果所有本身带捕获的lambda都被inline就不需要实现捕获了,顶层作用域不可能的,要是捕获了移到顶层估计会非常混乱,到时候全局变量多到包你哈希碰撞 |
(- -你不是忘记了变量命名的法则了吧- -加后缀什么的- 怎么说2^31很少见吧 |
我加的是哈希。另外我担心的是多个程序链接的时候冲突 |
变量重命名肯定得做啊 我又不是傻 |
而且捕获移动到顶层作用域的话,就可以造成潜在的野指针(delete了之后那玩意依然可以被拿出来 |
目前暂时没有需要要做这一步,先临时靠全部inline解决,后面再说捕获的事(不过C++/全部JVM-lang/C#等语言都是靠的生成类来实现lambda的,我比较想照抄,虽然还是很难做 |
应该搞那种,全inline模式和强制某个方法或者lambda不被inline。
The text was updated successfully, but these errors were encountered: