Skip to content

Commit

Permalink
[JSC] Split super complicated IC code generation clause into three di…
Browse files Browse the repository at this point in the history
…fferent ones

https://bugs.webkit.org/show_bug.cgi?id=274429
rdar://128435898

Reviewed by Justin Michaud.

Load, GetGetter, CustomValueGetter, CustomValueSetter, CustomAccessorGetter, CustomAccessorSetter, Getter, Setter, and IntrinsicGetter are
sharing one switch-clause, and it makes code incredibly complicated and hard to follow. Let's just split them into three.

1. Load, GetGetter
2. CustomValueGetter, CustomValueSetter, CustomAccessorGetter, CustomAccessorSetter
3. Getter, Setter, IntrinsicGetter

This significantly reduces complexity for simple IC (like Load), and it also improves some code generation for CustomAccessorGetter / CustomAccessorSetter,
where we are unnecessarily loading property owner GPR before.

* Source/JavaScriptCore/bytecode/InlineCacheCompiler.cpp:
(JSC::InlineCacheCompiler::generateImpl):

Canonical link: https://commits.webkit.org/279047@main
  • Loading branch information
Constellation committed May 21, 2024
1 parent 3a3bb5a commit 1a8d6ca
Showing 1 changed file with 285 additions and 297 deletions.
Loading

0 comments on commit 1a8d6ca

Please sign in to comment.