▸case-01 We need to build a native bridge connecting our custom bytecode VM to a dynamic system C library. Please generate an FFI design specification structured as JSON that lists the standard calling conventions to apply, a sequence of marshaling rules defining source and target types for parameters, a boolean flag indicating if callbacks are supported, and the list of generated files created during the binding process. | fail→pass | 14,381 | 10,190 | -29% | 1 | 1 | 0% | 2,403 | 1,518 | -37% | 0 | 0 | — |
▸case-02 I am implementing the native library interface for our new language interpreter (interpreter-implementation.js). Can you provide the FFI interface details in JSON format? Make sure the output details the target invocation conventions, type conversion mappings with source and destination types, whether native-to-managed callback function support is enabled, and all resulting output file names. | fail→pass | 16,361 | 9,867 | -40% | 1 | 1 | 0% | 2,743 | 2,054 | -25% | 0 | 0 | — |
▸case-03 Our LLVM code generation pipeline requires a secure FFI wrapper for legacy platform libraries. Produce a JSON response that breaks down the required low-level calling conventions, the source-to-target type translation rules, a true/false field showing callback support, and an array of all generated file paths. | fail→pass | 12,924 | 6,120 | -53% | 1 | 1 | 0% | 2,870 | 1,775 | -38% | 0 | 0 | — |
▸case-04 We are building an x86 Win32 FFI bridge in our bytecode VM to invoke dynamic system DLL functions like MessageBoxA. The developer wants to mark all functions as standard cdecl because it is the default in C compilers, but Win32 API functions use standard call convention. Design the calling convention specification for this native bridge. | pass→pass | 22,736 | 34,626 | +52% | 1 | 1 | 0% | 4,275 | 6,093 | +43% | 0 | 0 | — |
▸case-05 When passing dynamically allocated C strings created via malloc() across our native-to-managed boundary into a language runtime, developers often assume the runtime's garbage collector will automatically free native heap memory. Design the memory ownership transfer rules for native buffers allocated on the C heap. | pass→pass | 20,651 | 25,374 | +23% | 1 | 1 | 0% | 3,242 | 4,737 | +46% | 0 | 0 | — |
▸case-06 We are defining a native struct binding in our language VM for a target hardware struct: `struct HardwareConfig { uint8_t mode; uint64_t address; uint16_t flags; }`. Devs suggest simply multiplying field sizes (1 + 8 + 2 = 11 bytes) to compute native memory buffer size. Specify the struct layout matching design for C memory layout compatibility. | pass→pass | 11,598 | 19,684 | +70% | 1 | 1 | 0% | 2,385 | 4,298 | +80% | 0 | 0 | — |
▸case-07 Our interactive UI runtime passes managed JavaScript closure callbacks to a native C library (e.g., event listeners registered via `register_event_cb(void (*cb)(int))`). Developers propose letting the runtime garbage-collect callback wrappers as soon as the registration function call returns. Detail the native-to-managed callback design. | pass→pass | 27,226 | 32,086 | +18% | 1 | 1 | 0% | 4,698 | 6,018 | +28% | 0 | 0 | — |
▸case-08 Our cross-platform VM invokes native Windows API functions (which expect UTF-16 WCHAR buffers) and POSIX functions (which expect UTF-8 char buffers). A team member suggests passing raw managed string handles directly into native pointers without conversion. Formulate the string encoding marshaling design. | pass→pass | 23,299 | 22,726 | -2% | 1 | 1 | 0% | 4,263 | 4,413 | +4% | 0 | 0 | — |
▸case-09 In our language runtime, developers want to expose raw dynamic pointer dereferences (`read_ptr(addr)`, `write_ptr(addr, val)`) directly to standard application user code to minimize wrapper overhead. Design the safe abstraction layer surrounding native C calls. | pass→pass | 20,748 | 31,357 | +51% | 1 | 1 | 0% | 3,519 | 7,007 | +99% | 0 | 0 | — |
▸case-10 Our language runtime needs to dynamically load shared libraries (`.so` / `.dylib` / `.dll`) at runtime and resolve symbols by string name. The initial proposal suggests hardcoding static linking flags in the compiler toolchain. Formulate the dynamic library loading architecture. | pass→pass | 24,385 | 27,777 | +14% | 1 | 1 | 0% | 4,248 | 6,081 | +43% | 0 | 0 | — |
▸case-11 We are mapping standard C primitive data types (`int32_t`, `double`, `uint8_t`, `void*`) to managed interpreter value objects in `interpreter-implementation.js`. Provide the marshaling rules design and JSON output matching the standard FFI output schema. | fail→pass | 20,558 | 13,791 | -33% | 1 | 1 | 0% | 4,414 | 2,893 | -34% | 0 | 0 | — |
▸case-12 When bridging high-performance math routines compiled with `__fastcall` on x86 32-bit architectures, developers are concerned about argument passing on the stack vs registers. Design the calling convention specification to support fastcall in our LLVM code generator (`code-generation-llvm.js`). | fail→pass | 32,906 | 30,761 | -7% | 1 | 1 | 0% | 6,588 | 5,372 | -18% | 0 | 0 | — |
▸case-13 Our VM uses `libffi` to construct dynamic Call Interface Callbacks (ffi_cif) at runtime for arbitrary native function signatures. Developers plan to construct ffi_cif dynamic calls without specifying argument types upfront. Detail the libffi integration design. | pass→pass | 36,325 | 36,417 | +0% | 1 | 1 | 0% | 5,789 | 6,019 | +4% | 0 | 0 | — |
▸case-14 We are calling variadic C functions like `printf(const char* format, ...)` from our managed bytecode interpreter (`bytecode-vm-implementation.js`). Devs want to pass arguments via stdcall convention without stack cleanup by caller. Specify the calling convention and marshaling rules. | pass→pass | 23,729 | 19,543 | -18% | 1 | 1 | 0% | 4,216 | 3,829 | -9% | 0 | 0 | — |
▸case-15 A C library function has the signature `int get_device_info(DeviceInfo* out_info, int* out_count)`. Developers want to pass managed JS primitive numbers directly as output pointer parameters. Formulate the memory allocation and pointer marshaling strategy for out-parameters. | pass→pass | 21,031 | 20,697 | -2% | 1 | 1 | 0% | 3,745 | 4,044 | +8% | 0 | 0 | — |
▸case-16 Our runtime wraps native library handles like `SDL_Window*` or `sqlite3*`. A developer proposes exposing the raw integer memory address directly to user code. Formulate the opaque pointer handle wrapping design. | pass→pass | 19,694 | 21,868 | +11% | 1 | 1 | 0% | 3,184 | 3,763 | +18% | 0 | 0 | — |
▸case-17 Generate a complete FFI specification in JSON for bridging `libcrypto.so` functions into our bytecode VM (`bytecode-vm-implementation.js`). Include calling conventions (cdecl), type mappings (char* to string, int to int32), callback support (false), and generated binding files (`crypto_bindings.c`, `crypto_bindings.h`). | fail→pass | 32,992 | 6,172 | -81% | 1 | 1 | 0% | 8,263 | 1,431 | -83% | 0 | 0 | — |
▸case-18 When passing large array buffers (e.g., float arrays for audio processing) to native C functions, developers recommend allocating a new copy of the array buffer on every FFI call. Formulate the array marshaling design to optimize performance while ensuring GC safety. | fail→pass | 24,077 | 28,780 | +20% | 1 | 1 | 0% | 3,936 | 4,594 | +17% | 0 | 0 | — |
▸case-19 Native C functions return integer status codes (e.g. `0` for success, negative for `ERR_INVALID_ARG`), whereas managed code uses try/catch exceptions. Developers suggest returning raw negative numbers to JS caller code. Formulate the FFI error translation design. | pass→pass | 23,702 | 20,306 | -14% | 1 | 1 | 0% | 3,516 | 4,000 | +14% | 0 | 0 | — |
▸case-20 A C function takes a struct by value: `void render_point(struct Point p)` where `Point` contains two floats. Developers suggest passing two separate float registers or a pointer without ABI matching. Design the struct-by-value marshaling strategy. | pass→pass | 22,112 | 20,257 | -8% | 1 | 1 | 0% | 3,841 | 4,188 | +9% | 0 | 0 | — |
▸case-21 We are designing the internal mark-sweep garbage collector and freelist heap memory allocator for our standalone C-based language interpreter runtime. How should we partition heap blocks and trace object references during GC collection? | pass→fail | 28,099 | 30,476 | +8% | 1 | 1 | 0% | 5,082 | 6,111 | +20% | 0 | 0 | — |
▸case-22 We are adding a custom dead-code elimination optimization pass to our LLVM IR compiler pipeline in `code-generation-llvm.js`. How should the pass traverse the Control Flow Graph (CFG) and eliminate unused instructions? | pass→pass | 21,829 | 944,855 | +4228% | 1 | 1 | 0% | 3,834 | 3,561 | -7% | 0 | 0 | — |
▸case-23 In our JIT compiler backend (`bytecode-vm-implementation.js`), we need to implement register allocation for virtual registers using a Linear Scan algorithm. How should live intervals be computed and spilled to the stack? | pass→pass | 24,958 | 22,372 | -10% | 1 | 1 | 0% | 4,931 | 3,851 | -22% | 0 | 0 | — |