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

interceptor is treeshaken over-aggressively #11600

Closed
vsmenon opened this issue Jun 28, 2013 · 3 comments
Closed

interceptor is treeshaken over-aggressively #11600

vsmenon opened this issue Jun 28, 2013 · 3 comments
Assignees
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures web-dart2js
Milestone

Comments

@vsmenon
Copy link
Member

vsmenon commented Jun 28, 2013

The following program:

  void foo() {}

  main() {
    print(foo is Function);
  }

prints "true" on the VM but generates the following error with dart2js:

Uncaught TypeError: Object [object Object] has no method 'getInterceptor'

Adding some explicit dispatch on foo makes the program run correctly. It appears that the is check alone isn't sufficient to keep getInterceptor around but should be.

@kasperl
Copy link

kasperl commented Jun 28, 2013

Set owner to @johnniwinther.
Added this to the M6 milestone.
Removed Priority-Unassigned label.
Added Priority-High label.

@rakudrama
Copy link
Member

Currently the type check is an atomic HInstruction.
If it was decomposed into component parts, one of those parts would be a HInterceptor.
That would solve the problem, and also open up the possibility of interceptor optimizations, see Issue #9732, and customer complaint at Issue #9971.

A short term fix is to register the interceptor call when emitting an is-check.

@rakudrama
Copy link
Member

Fixed r24719


Added Fixed label.

@vsmenon vsmenon added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures web-dart2js labels Jul 3, 2013
@vsmenon vsmenon added this to the M6 milestone Jul 3, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures web-dart2js
Projects
None yet
Development

No branches or pull requests

4 participants