![]() ![]() There are complicated issues with global information such as dependencies (see below), but initially it is sufficient to consider compiling a single file. ![]() While there are a number of components, each is simple and well-defined, and generally only one or two must be considered at a time. The compiler is factored into a pipeline, and the steps further divided into separate Python modules. See renderer/bindings/scripts/web_idl/README.md and renderer/bindings/scripts/bind_gen/README.md about the design of the current bindings generator. The compiler is in renderer/bindings/scripts, and bindings are generated as part of the build. This is complicated by numerous parameters and special cases, due to either wanting to automatically generate repetitive code (so that the Blink implementation is simpler), supporting quirks of Web interfaces, or Blink implementation details. ![]() This bindings code is highly repetitive, primarily passing values (arguments and return values) between V8 and Blink and doing various conversions and checks (e.g., type checking), hence it is mostly machine-generated. That is, when an attribute or method in a Web IDL interface is used from JavaScript, V8 calls the bindings code, which calls Blink code.Īs of early 2022, there are almost 2,000 IDL files, about 5,000 attributes and 3,000 operations. The IDL compiler or bindings generator transcompiles Web IDL to C++ code, specifically bindings between V8 (the JavaScript engine) and Blink. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |