Cancel inlining in some cases to avoid compiled size explosion · Issue #239 · mlogjs/mlogjs · GitHub
Skip to content

Cancel inlining in some cases to avoid compiled size explosion #239

Closed

Description

@Miao-2025

Hello!

Problem

When using Mlogjs, I ran into an issue where inlining caused the compiled program to exceed 999 lines, making it impossible to fully import and leading to runtime errors. I hope something can be added to prevent inlining.

Desired Solution:

I hope one of the following mechanisms can be added to cancel or limit inlining:

Provide annotations like @noinline to mark certain functions as non-inlinable;

For example:

such.js

Activity

  1. JeanJPNM commented on Oct 24, 2026

    @JeanJPNM
    Member

    You can now use the "inline never" directive to prevent functions from inlining.

    function foo(value) {
      "inline never";
      return value;
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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