Skip to content

Commit

Permalink
Refactor bootstrapper.cc to pass a functions parameter count
Browse files Browse the repository at this point in the history
For Leaptiering, every JSFunction needs an entry in the JSDispatchTable.
User-defined functions obtain that entry from their FeedbackCell, but
for builtin functions, the entry needs to be allocated when the
JSFunction is created. However, for that the parameter count must be
known. This CL prepares for that by refactoring the bootstrapping logic
to supply a parameter count (into helper functions such as
InstallFunction) which will then be used in a follow-up CL to allocate
the dispatch table entries. Eventually we should be able to obtain the
parameter count from the builtin Code object, but that is not yet
available. Once it is, the bootstrapping logic can be simplified
further as it then no longer needs to compute the parameter counts.

Bug: 40931165, 42204201, 343498932
Change-Id: If895b5776681a0d6d269b81a76b053e79ad4c9f8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/ /5772796
Reviewed-by: Leszek Swirski <[email protected]>
Commit-Queue: Samuel Groß <[email protected]>
Cr-Commit-Position: refs/heads/main@{#95548}
  • Loading branch information
Samuel Groß authored and V8 LUCI CQ committed Aug 9, 2024
1 parent ea523f3 commit cd09405
Showing 1 changed file with 142 additions and 221 deletions.
Loading

0 comments on commit cd09405

Please sign in to comment.