Hi Andrew,
I can't answer your questions about vtables, but I can try to untangle the "clever things" in V8's codebase that make it difficult to find the caller to the constructor.
- The ArrayTimSort builtin is defined in V8's Torque DSL
here, and called
here.
- The torque compiler generates a bunch of C++ code to implement the buitlins and their interface descriptors. One of the things it creates is a list of the Torque defined builtins in a macro, with the ArrayTimSort one listed
here.
- This macro is used to define a Builtin_ArrayTimSort_InterfaceDescriptor = ArrayTimSortDescriptor
here using V8's favorite macro magic trick.
- This descriptor is then created by the call to Builtins::CallableFor(..., Builtins::kArrayTimSort)
here in the auto-generated C++ code created by the Torque code listed in step 1, via the macro-magic switch statement
here.
Who said V8 was complicated?...
Cheers,
Ross