Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cores.test_minimal_runtime_safe_heap is due to acorn-optimizer issue #23422

Open
sbc100 opened this issue Jan 15, 2025 · 0 comments · May be fixed by #23423
Open

cores.test_minimal_runtime_safe_heap is due to acorn-optimizer issue #23422

sbc100 opened this issue Jan 15, 2025 · 0 comments · May be fixed by #23423

Comments

@sbc100
Copy link
Collaborator

sbc100 commented Jan 15, 2025

It seems like when applyDCEGraphRemovals is run the comments that were meant for the statement prior get propogated forward. This result is closure getting confused:

See #23403 (comment)

Here is the before and after of applyDCEGraphRemovals:

var wasmImports = {                                                              
  /** @export */ alignfault,                                                     
  /** @export */ emscripten_console_log: _emscripten_console_log,                
  /** @export */ emscripten_resize_heap: _emscripten_resize_heap,                
  /** @export */ segfault                                                        
};                                                                               
                                                                                 
function assignWasmExports(wasmExports) {                                        
  _main = wasmExports["main"];                                                   
  _emscripten_get_sbrk_ptr = wasmExports["emscripten_get_sbrk_ptr"];             
  _sbrk = wasmExports["sbrk"];                                                   
  _emscripten_stack_get_base = wasmExports["emscripten_stack_get_base"];         
  __emscripten_stack_restore = wasmExports["_emscripten_stack_restore"];         
  __emscripten_stack_alloc = wasmExports["_emscripten_stack_alloc"];             
  _emscripten_stack_get_current = wasmExports["emscripten_stack_get_current"];   
} 
var wasmImports = {                                                              
  /** @export */ emscripten_console_log: _emscripten_console_log                 
};                                                                               
                                                                                 
/** @export */ function assignWasmExports(wasmExports) {                         
  _main = wasmExports["main"];                                                   
}            

Here you can see the @export comment gets erroneous moved to match the assignWasmExports function... where is it not valid.

@sbc100 sbc100 assigned kripken and dschuff and unassigned dschuff and kripken Jan 16, 2025
@sbc100 sbc100 linked a pull request Jan 16, 2025 that will close this issue
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 a pull request may close this issue.

3 participants