Skip to content

Fix function inlining idempotence test failure #33

@avrabe

Description

@avrabe

Issue

The test_inline_stack_discipline_idempotence test is failing because running inline_functions twice produces different results (89 bytes → 94 bytes).

Expected Behavior

Inlining should be idempotent - running it multiple times should produce the same result after the first pass.

Current Behavior

First inline: input → 89 bytes
Second inline: 89 bytes → 94 bytes

Root Cause

The inlining pass may be creating new inlining opportunities after the first pass completes.

Fix Required

Ensure inline_functions() is truly idempotent by either:

  1. Running to fixed point within the function, or
  2. Marking inlined functions to prevent re-inlining

Location

loom-core/tests/optimization_tests.rs:1829
loom-core/src/lib.rs:6804 (inline_functions implementation)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions