-
Milad Fa authored
Port 732f394c Original Commit Message: StaGlobal didn't write the accumulator, but the baseline implementation assumed that it could preserve the accumulator by taking the return value of the StoreGlobalIC. This almost always worked, except for setters on the global object. Fix this by marking StaGlobal as clobbering the accumulator, same as StaNamedProperty (StaNamedProperty needs to do this anyway to avoid inlined setters from needing to create accumulator-preserving frames; StaGlobal would have needed the same thing if we'd ever inlined setters for it). Also, add a new debug scope, EnsureAccumulatorPreservedScope, to the baseline compiler, which checks if the accumulator value is preserved across non-accumulator-writing bytecodes. This found a (benign) bug with ForInPrepare, so fix that too. R=leszeks@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com BUG= LOG=N Change-Id: Id8ada05abeb1a9c7e8a16936c35be9d652c4e8b0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3124529Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Milad Fa <mfarazma@redhat.com> Cr-Commit-Position: refs/heads/main@{#76537}
aed61ff4