Skip to content

VM/JIT/unoptimized: LocalVariable type_check_mode_ is imprecise #43654

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

Open
askeksa-google opened this issue Oct 2, 2020 · 0 comments
Open
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@askeksa-google
Copy link

The type_check_mode_ field of LocalVariable is initialized to kDoTypeCheck, which is a safe default. It keeps this conservative value in many cases where it could be given a more precise value. Only covariant parameters ever need to be checked, but the default often stays even for non-parameters.

A more precise value here could also enable a cleaner and perhaps more precise solution to #43464 than the one in https://dart-review.googlesource.com/c/sdk/+/164500.

@askeksa-google askeksa-google added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Oct 2, 2020
dart-bot pushed a commit that referenced this issue Oct 2, 2020
This avoids unsound optimizations that could arise from loading a
parameter before its type had been checked.

Affects only unoptimized code.

Fixes #43464

Some considerations for a cleaner fix are described in
#43654

Change-Id: I05872e46495313e82e9c516e5f283e1bc4612300
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164500
Commit-Queue: Aske Simon Christensen <[email protected]>
Reviewed-by: Martin Kustermann <[email protected]>
dart-bot pushed a commit that referenced this issue Oct 6, 2020
This avoids unsound optimizations that could arise from loading a
parameter before its type had been checked.

Affects only unoptimized code.

Fixes #43464

Some considerations for a cleaner fix are described in
#43654

Change-Id: I05872e46495313e82e9c516e5f283e1bc4612300
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164500
Commit-Queue: Aske Simon Christensen <[email protected]>
Reviewed-by: Martin Kustermann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

1 participant