[ic] Fix getter-in-IC for LoadAccessMode::kHas case
When testing for "has" rather than loading, we can immediately return true when there is an accessor (this is already what the LoadHandler path does but was missed in the inlined case). Fixed: chromium:1361434 Fixed: chromium:1361560 Fixed: chromium:1361566 Fixed: chromium:1361654 Fixed: chromium:1361830 Change-Id: I69073eccbb39b08da597297fa597f53f260b242e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3885879 Auto-Submit: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#83097}
This commit is contained in:
parent
72d6dc6d5e
commit
b120f3e60a
@ -227,9 +227,13 @@ void AccessorAssembler::HandleLoadICHandlerCase(
|
||||
|
||||
BIND(&call_getter);
|
||||
{
|
||||
TNode<HeapObject> strong_handler = GetHeapObjectAssumeWeak(handler, miss);
|
||||
TNode<Object> getter = LoadAccessorPairGetter(CAST(strong_handler));
|
||||
exit_point->Return(Call(p->context(), getter, p->receiver()));
|
||||
if (access_mode == LoadAccessMode::kHas) {
|
||||
exit_point->Return(TrueConstant());
|
||||
} else {
|
||||
TNode<HeapObject> strong_handler = GetHeapObjectAssumeWeak(handler, miss);
|
||||
TNode<Object> getter = LoadAccessorPairGetter(CAST(strong_handler));
|
||||
exit_point->Return(Call(p->context(), getter, p->receiver()));
|
||||
}
|
||||
}
|
||||
|
||||
BIND(&call_code_handler);
|
||||
|
Loading…
Reference in New Issue
Block a user