size: gate process IPC properties behind proc-ipc (unpins the JSON serializer; hello −16.5 KB) - #7010
Merged
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughThe compiler detects process IPC token usage, propagates it through compilation and cache feature wiring, and gates runtime IPC property lookup behind ChangesProcess IPC feature gating
Default Intl runtime features
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant FeatureDetector
participant CompilationContext
participant OptimizedLibraries
participant PerryRuntime
FeatureDetector->>CompilationContext: detect process IPC tokens
CompilationContext->>OptimizedLibraries: pass uses_proc_ipc
OptimizedLibraries->>PerryRuntime: enable proc-ipc conditionally
PerryRuntime-->>CompilationContext: expose or disable IPC properties
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fifth slice.
ld64 -why_livetraced the JSON serializer's presence in a hello world to a surprising root:process.sendJSON-serializes every IPC message, and the process-namespace property lookup is always live, so every binary carriedcrate::jsonwhether or not it used IPC or JSON. (StaticJSON.stringify(x)call sites are codegen intrinsics — they don't need this path.)process_ipc_propertynow returnsNonewhen the new default-onproc-ipcfeature is off. Detection is intentionally broad — anysend/disconnect/connected/channeltoken enables it — because the failure mode of a miss isprocess.sendbeing undefined at runtime, so the rule errs hard toward enabling.Measured: hello world 4,245,216 → 4,228,680 (−16.5 KB).
Verification: a real parent↔child IPC probe (
forka child, childprocess.sends a ready message, parent replies viachild.send, child echoes back withprocess.connected) is byte-identical to Node — this exercises the gated path end to end, in both directions. Serial runtime suite 1510/1510; both feature states compile.Series total: 4,461,216 → 4,228,680 (−232 KB) across #6980, #6985, #7008, #7009 and this PR.
Summary by CodeRabbit
Performance
Compatibility
process.send,disconnect,connected, orchannelcontinue to receive IPC support by default.