Skip to content

Change compiler entry point convention#193

Merged
tomusdrw merged 1 commit intomainfrom
td-convention
Mar 5, 2026
Merged

Change compiler entry point convention#193
tomusdrw merged 1 commit intomainfrom
td-convention

Conversation

@tomusdrw
Copy link
Owner

@tomusdrw tomusdrw commented Mar 5, 2026

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 5, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 10f2bb32-619f-4463-a52d-eb90a33ed4e2

📥 Commits

Reviewing files that changed from the base of the PR and between 6ff418d and 7100031.

📒 Files selected for processing (1)
  • assembly/index-compiler.ts

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Summary by CodeRabbit

  • Refactor
    • Improved internal error and result handling mechanism to enhance reliability and performance in edge cases.

Walkthrough

This change refactors the result communication mechanism in the index compiler from using global variables to returning a packed i64 value. The main() function signature is modified to return i64 instead of void, with new helper functions packResult() and setPanicResult() introduced to encode result pointer and length information into the return value. Global result buffers are removed, and all call sites are updated to return packed results, including error handling paths.

Possibly related PRs

  • refactor cli #157: This PR's changes to index-compiler.ts directly conflict with the result buffer pattern introduced in this related PR, refactoring away the exported result_ptr and result_len globals in favor of returning a packed i64 result.

Suggested reviewers

  • DrEverr
  • mateuszsikora
✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch td-convention

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai bot requested review from DrEverr and mateuszsikora March 5, 2026 14:27
@tomusdrw tomusdrw merged commit 7836f0a into main Mar 5, 2026
3 of 4 checks passed
@tomusdrw tomusdrw deleted the td-convention branch March 5, 2026 14:28
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Benchmark Results

✅ No significant changes

Metric Baseline Current Change
fib(10k) 7.7ms 7.6ms -1.3%
fib(100k) 75.3ms 74.2ms -1.4%
fib(1M) 752.3ms 730.4ms -2.9%
fib(10M) 7515.2ms 7312.0ms -2.7%
Trace total 5624.0ms 5567.9ms -56.1ms (-1.0%)
All traces
Trace Baseline Current Change
trace-002 39.6ms 37.9ms -4.4%
trace-016 43.2ms 41.5ms -4.1%
trace-051 142.8ms 148.2ms +3.8%
trace-055 194.7ms 201.9ms +3.7%
trace-009 29.0ms 27.9ms -3.7%
trace-013 35.0ms 33.8ms -3.5%
trace-046 23.8ms 23.0ms -3.3%
trace-012 29.0ms 28.1ms -3.2%
trace-018 50.8ms 49.2ms -3.2%
trace-060 30.0ms 29.0ms -3.2%
trace-020 91.7ms 88.8ms -3.1%
trace-003 246.5ms 238.9ms -3.1%
trace-015 77.3ms 74.9ms -3.1%
trace-053 144.0ms 148.4ms +3.1%
trace-054 115.2ms 118.6ms +3.0%
trace-014 100.0ms 97.1ms -2.9%
trace-004 48.5ms 47.1ms -2.9%
trace-040 30.8ms 30.0ms -2.9%
trace-059 175.6ms 180.6ms +2.9%
trace-034 42.7ms 41.5ms -2.9%
trace-024 116.4ms 113.2ms -2.8%
trace-028 125.1ms 121.7ms -2.8%
trace-006 89.8ms 87.3ms -2.7%
trace-047 115.5ms 118.5ms +2.6%
trace-036 64.1ms 62.4ms -2.6%
trace-017 189.4ms 184.5ms -2.6%
trace-048 104.9ms 107.6ms +2.6%
trace-025 168.0ms 163.6ms -2.6%
trace-023 159.3ms 155.2ms -2.6%
trace-008 102.6ms 100.0ms -2.5%
trace-005 59.1ms 57.6ms -2.5%
trace-058 31.4ms 30.6ms -2.5%
trace-037 47.4ms 46.2ms -2.5%
trace-029 32.0ms 31.2ms -2.5%
trace-027 104.9ms 102.4ms -2.4%
trace-022 136.6ms 133.5ms -2.2%
trace-019 53.0ms 51.8ms -2.2%
trace-063 79.4ms 81.1ms +2.1%
trace-026 68.5ms 67.0ms -2.1%
trace-035 88.1ms 86.3ms -2.0%
trace-001 112.7ms 110.5ms -2.0%
trace-050 82.2ms 83.8ms +2.0%
trace-010 127.4ms 124.9ms -2.0%
trace-030 125.8ms 123.3ms -2.0%
trace-007 38.3ms 37.6ms -1.8%
trace-032 84.0ms 82.5ms -1.7%
trace-038 153.6ms 151.0ms -1.7%
trace-042 55.0ms 55.9ms +1.6%
trace-062 37.2ms 36.6ms -1.6%
trace-044 28.6ms 28.1ms -1.6%
trace-049 36.3ms 35.7ms -1.5%
trace-057 42.4ms 41.7ms -1.4%
trace-052 64.8ms 65.7ms +1.4%
trace-031 171.3ms 168.9ms -1.4%
trace-021 79.9ms 78.8ms -1.3%
trace-033 70.6ms 69.7ms -1.2%
trace-039 190.0ms 187.6ms -1.2%
trace-041 166.0ms 164.0ms -1.2%
trace-056 45.7ms 45.2ms -1.1%
trace-043 49.1ms 49.6ms +0.9%
trace-061 76.1ms 76.7ms +0.8%
trace-045 53.9ms 54.3ms +0.6%
trace-011 107.9ms 107.6ms -0.3%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant