Skip to content

fix: native misses this-dispatch for function-as-object-property methods (this.js f.h→f.g) #1512

@carlos-alm

Description

@carlos-alm

Summary

In the jelly-micro parity fixture, this/this.js shows:

  • WASM: f.h(method) → f.g(method) conf=0.9 cha — correctly emitted
  • Native: missing — runPostNativeThisDispatch doesn't pick up this.g() inside f.h

f.h is a function-as-property assignment (f.h = function() { this.g(); }), not a regular class method. resolveThisDispatch('g', 'f.h', 'this', ...) correctly finds f.g by treating f as the class prefix. Native's runPostNativeThisDispatch re-parses files with WASM but may not be capturing this.g() calls when the enclosing function is a func-prop assignment (not in a class body).

Fix direction

Ensure runPostNativeThisDispatch correctly attributes this.g() calls inside func-prop methods (f.h = function() {}) to the func-prop caller node. The Rust engine may need to emit these as call sites with receiver='this' in the context of a func-prop definition.

Stacking

Found in #1472. Defer to a follow-up PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions