• Tobias Tebbi's avatar
    [torque] cleanup generics and scopes · 06c8ce59
    Tobias Tebbi authored
    - Name lookup in module scopes has namespace semantics now: All
      overloads from all parent modules are combined before overload
      resolution.
    - Allow overloads of different callables: runtime-functions,
      macros, builtins, and generics.
    - The duplication between the DeclarationVisitor and the
      ImplementationVisitor is removed: The DeclarationVisitor creates
      declarables for everything except for implicit generic specializations.
      The ImplementationVisitor iterates over declarables.
      The DeclarationVisitor only looks at the header of declarations, not
      at the body.
    - Modules become Declarable's, which will enable them to be nested.
    - Modules replace the existing Scope chain mechanism, which will make it
      easier to inline macros.
    - The DeclarationVisitor and Declarations become stateless. All state is
      moved to contextual variables and the GlobalContext.
    - Implicit specializations are created directly from the
      ImplementationVisitor. This will enable template parameter inference.
    - As a consequence, the list of all builtins is only available after the
      ImplementationVisitor has run. Thus GenerateBuiltinDefinitions has to
      move to the ImplementationVisitor. Also, this makes it necessary to
      resolve the link from function pointer types to example builtins only
      at this point.
    
    
    Bug: v8:7793
    Change-Id: I61cef2fd3e954ab148c252974344a6e38ee2d01d
    Reviewed-on: https://chromium-review.googlesource.com/c/1304294
    Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
    Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#57231}
    06c8ce59
builtins.cc 12.1 KB