[maglev] CheckMaps: Deopt if the object is a Smi

Bug: v8:7700
Change-Id: Ib5b6b570829cfb7de9c61115b45bb37437c70dde
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3702804
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81159}
This commit is contained in:
Camillo 2022-06-14 15:11:35 +00:00 committed by V8 LUCI CQ
parent 3366abb218
commit bc3ef8026e

View File

@ -622,6 +622,10 @@ void CheckMaps::AllocateVreg(MaglevVregAllocationState* vreg_state,
void CheckMaps::GenerateCode(MaglevCodeGenState* code_gen_state,
const ProcessingState& state) {
Register object = ToRegister(actual_map_input());
Condition is_smi = __ CheckSmi(object);
EmitEagerDeoptIf(is_smi, code_gen_state, this);
RegList temps = temporaries();
Register map_tmp = temps.PopFirst();