Skip to content

Commit

Permalink
[vm/compiler] proper reason for deopt stub
Browse files Browse the repository at this point in the history
Rationale:
Reporting check-class instead of the proper unbox
yields an incorrect compiler diagnostic, which may
obscure subsequent debugging.

#35335

Change-Id: I99358ef3432e77b4432d9a96755747eaadc27067
Reviewed-on: https://dart-review.googlesource.com/c/87161
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
  • Loading branch information
aartbik authored and commit-bot@chromium.org committed Dec 13, 2018
1 parent 76fb4d5 commit ddf3c5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/vm/compiler/backend/il.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4555,7 +4555,7 @@ void UnboxInstr::EmitLoadFromBoxWithDeopt(FlowGraphCompiler* compiler) {
const Register box = locs()->in(0).reg();
const Register temp =
(locs()->temp_count() > 0) ? locs()->temp(0).reg() : kNoRegister;
Label* deopt = compiler->AddDeoptStub(GetDeoptId(), ICData::kDeoptCheckClass);
Label* deopt = compiler->AddDeoptStub(GetDeoptId(), ICData::kDeoptUnbox);
Label is_smi;

if ((value()->Type()->ToNullableCid() == box_cid) &&
Expand Down
1 change: 1 addition & 0 deletions runtime/vm/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -1798,6 +1798,7 @@ class ICData : public Object {
V(BinaryDoubleOp) \
V(UnaryOp) \
V(UnboxInteger) \
V(Unbox) \
V(CheckArrayBound) \
V(AtCall) \
V(GuardField) \
Expand Down

0 comments on commit ddf3c5e

Please sign in to comment.