gpt4 book ai didi

java - Java 编译器的转换

转载 作者:行者123 更新时间:2023-11-29 04:34:12 25 4
gpt4 key购买 nike

根据 section 17.4 of JLS8编译器执行了两种 Java 代码转换:

  1. 语句重新排序
  2. 前锋换人

是否有任何其他转换可以由 Java 编译器执行?

最佳答案

是的,根据JLS还有其他转换:

[The memory model] provides a great deal of freedom for the implementor to perform a myriad of code transformations, including the reordering of actions and removal of unnecessary synchronization.

只要遵守内存模型,编译器实现就可以执行任何转换。

关于java - Java 编译器的转换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42426543/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com