官术网_书友最值得收藏!

Code inlining control

We will look into the concept of code inlining later in this chapter, in the section, Optimizing method calls, so this text will serve just as an introduction.

By setting the value of Code inlining control, you define the default behavior for the complete project. The possible values for that setting are On, Off, and Auto. This default value can be changed in the code by inserting {$INLINE ON}, {$INLINE OFF}, or {$INLINE AUTO} into the source.

The INLINE state can be set to a different value at a place where the inlined method is defined and a place where it is used (called). This creates six possible combinations.

When we look at the method definition, INLINE has the following meaning:

  • INLINE ON: If the method is marked with the inline directive (more on that later), it will be marked as inlineable
  • INLINE AUTO: Same as INLINE ON, with the addition that any routine not marked with inline will still be marked inlineable if its code size is less than or equal to 32 bytes
  • INLINE OFF: The routine will not be marked as inlineable even if it is marked with inline

At the place of use, INLINE has a different meaning:

  • INLINE ON: If a called method is marked as inlineable, it will be expanded inline (at the place of call) if possible
  • INLINE AUTO: Same as INLINE ON
  • INLINE OFF: The routine will not be expanded inline, even if it is marked inlineable
主站蜘蛛池模板: 三门峡市| 汾西县| 临武县| 宜宾市| 麦盖提县| 济阳县| 宣威市| 揭东县| 大新县| 临洮县| 中卫市| 灌阳县| 奉新县| 安福县| 慈溪市| 玉屏| 唐海县| 会宁县| 杭州市| 毕节市| 深圳市| 海丰县| 东城区| 巢湖市| 武宣县| 汕尾市| 安康市| 布拖县| 阿克| 安新县| 定襄县| 喀喇沁旗| 兴安盟| 张家口市| 大城县| 曲阳县| 湘西| 宿迁市| 丽江市| 瓦房店市| 新竹市|