Conditional Execution of Transpiler Passes Based on Per-Script Feature Detection
- URL: http://arxiv.org/abs/2603.18049v1
- Date: Tue, 17 Mar 2026 19:54:22 GMT
- Title: Conditional Execution of Transpiler Passes Based on Per-Script Feature Detection
- Abstract summary: We present a compiler improvement that conditionally executes transpiler passes based on accurately tracking and dynamically maintaining the exact set of language features.<n> Evaluation of this improvement on large-scale production monorepos produced a considerable reduction in compilation time and saved compute and memory usage.
- Score: 0.0
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: As the ECMAScript specification evolves, industrial-scale JavaScript compilers face the challenge of supporting modern language syntax while maintaining compatibility for diverse execution environments. Traditionally, compilers solve this by running transpilation passes in a monolithic pipeline, where the transpilation passes are chosen to execute strictly based on a target language level. This results in significant computational waste, as compilers perform expensive Abstract Syntax Tree (AST) traversals to lower features that may not exist in the actual input source code. We present a compiler improvement that conditionally executes transpiler passes based on accurately tracking and dynamically maintaining the exact set of language features present in the compilation unit throughout the transpilation process. It is implemented in the production Google Closure Compiler. By populating and maintaining a FeatureSet at every JavaScript script-level, it dynamically skips running unnecessary lowering passes. We detail the architectural safeguards -- including strategic pass ordering and dynamic validation of the transpiled code for feature-correctness. Evaluation of this improvement on large-scale production monorepos produced a considerable reduction in compilation time and saved compute and memory usage.
Related papers
- Generative Compilation: On-the-Fly Compiler Feedback as AI Generates Code [43.07697210931911]
We introduce generative compilation, the first approach to obtaining compiler feedback on partial programs during generation.<n>We show that generative compilation reduces non-compiling outputs and improves functional correctness, relative to standard post-generation feedback.
arXiv Detail & Related papers (2026-07-15T15:00:22Z) - SEDCoT: Enhancing LLM-Based COBOL Code Translation via Symbolic Execution and Delta Debugging [49.898541267264115]
Maintenance is increasingly challenging due to outdated technologies, sparse documentation, and developer retirement.<n>Traditional rule-based transcompilers yield outputs that are difficult to read and maintain.<n>We propose SEDCoT, a novel-to-C translation framework.
arXiv Detail & Related papers (2026-07-05T03:07:10Z) - Decaf: Improving Neural Decompilation with Automatic Feedback and Search [64.02615739798277]
High-level syntax, identifiers, and custom data types are generally lost as the compiler translates human-readable code to low-level machine code.<n>Generative AI models are a natural fit for reconstructing high-level syntax, identifiers, and types.<n>We argue that compiler feedback can be used to dramatically improve the semantic correctness of neural decompiler outputs via search.
arXiv Detail & Related papers (2026-05-12T04:21:26Z) - OverrideFuzz: Semantic-Aware Grammar Fuzzing for Script-Runtime Vulnerabilities [0.0]
We present Fuzz, a semantic-aware grammar fuzzer for script-language runtimes such as Python, Lua, and JavaScript.<n>Active reflection tracks runtime types, and passive reflection learns from error messages to remove invalid operation shapes, allowing generation to approach semantic correctness without manual API specification.<n>All three targets show consistent coverage growth, with rapid early expansion followed by slower incremental gains, and Lua benefits most from its pervasive metamethod dispatch mechanism.
arXiv Detail & Related papers (2026-05-12T03:57:35Z) - PCodeTrans: Translate Decompiled Pseudocode to Compilable and Executable Equivalent [8.576619291429969]
PCodeTrans bridges the gap between decompilation, recompilation, and rigorous function-level dynamic validation.<n>It achieves 100% function-level compilability on unstripped binaries alongside 99.55% and 99.89% test-validated behavioral consistency.
arXiv Detail & Related papers (2026-03-16T05:54:24Z) - Context-Guided Decompilation: A Step Towards Re-executability [50.71992919223209]
Binary decompilation plays an important role in software security analysis, reverse engineering and malware understanding.<n>Recent advances in large language models (LLMs) have enabled neural decompilation, but the generated code is typically only semantically plausible.<n>We propose ICL4Decomp, a hybrid decompilation framework that leverages in-context learning (ICL) to guide LLMs toward generating re-executable source code.
arXiv Detail & Related papers (2025-11-03T17:21:39Z) - Compiling by Proving: Language-Agnostic Automatic Optimization from Formal Semantics [0.0]
We construct All-Path Reachability Proofs through symbolic execution and compiling their graph structure.<n>We consolidate many semantic rewrites into single rules while preserving correctness by construction.<n>We implement this as a language-agnostic extension to the K framework.
arXiv Detail & Related papers (2025-09-26T02:49:08Z) - Text2Mem: A Unified Memory Operation Language for Memory Operating System [59.082901444153684]
We introduce Text2Mem, a unified memory operation language for model agents.<n>Text2Mem provides a standardized pathway from natural correctness reliable execution.
arXiv Detail & Related papers (2025-09-14T07:30:09Z) - WGRAMMAR: Leverage Prior Knowledge to Accelerate Structured Decoding [58.1177179119881]
We introduce wgrammar, a lightweight decoding engine that integrates domain-aware simplification, constraint decomposition, and mask caching.<n> wgrammar achieves up to 250x speedup over existing systems.
arXiv Detail & Related papers (2025-07-22T17:13:47Z) - ReF Decompile: Relabeling and Function Call Enhanced Decompile [50.86228893636785]
The goal of decompilation is to convert compiled low-level code (e.g., assembly code) back into high-level programming languages.<n>This task supports various reverse engineering applications, such as vulnerability identification, malware analysis, and legacy software migration.
arXiv Detail & Related papers (2025-02-17T12:38:57Z) - Developing a Modular Compiler for a Subset of a C-like Language [0.0]
The paper introduces the development of a modular compiler for a subset of a C-like language.<n>This modular approach will allow developers to modify a language by adding or removing subsets as required, resulting in a minimal and memory-efficient compiler.
arXiv Detail & Related papers (2025-01-08T13:42:54Z) - The Design and Implementation of an Extensible System Meta-Programming
Language [0.40792653193642503]
We propose a novel redefinition of the compilation process in terms of interpreting the program definition as a script.
We demonstrate the feasibility of this approach by bootstrapping a self-compiling implementation of Sysmel.
arXiv Detail & Related papers (2023-09-27T05:46:41Z) - CRIL: A Concurrent Reversible Intermediate Language [0.0]
We present a reversible intermediate language with composing for translating a high-level concurrent programming language to another lower-level concurrent programming language, keeping reversibility.
We propose CRIL as an extension of RIL used by Mogensen for a functional reversible language, incorporating a multi-thread process invocation and the synchronization primitives based on the P-V operations.
arXiv Detail & Related papers (2023-09-13T20:52:54Z) - InterCode: Standardizing and Benchmarking Interactive Coding with
Execution Feedback [50.725076393314964]
We introduce InterCode, a lightweight, flexible, and easy-to-use framework of interactive coding as a standard reinforcement learning environment.
Our framework is language and platform agnostic, uses self-contained Docker environments to provide safe and reproducible execution.
We demonstrate InterCode's viability as a testbed by evaluating multiple state-of-the-art LLMs configured with different prompting strategies.
arXiv Detail & Related papers (2023-06-26T17:59:50Z) - ReACC: A Retrieval-Augmented Code Completion Framework [53.49707123661763]
We propose a retrieval-augmented code completion framework, leveraging both lexical copying and referring to code with similar semantics by retrieval.
We evaluate our approach in the code completion task in Python and Java programming languages, achieving a state-of-the-art performance on CodeXGLUE benchmark.
arXiv Detail & Related papers (2022-03-15T08:25:08Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.