Clang Bytecode Interpreter Update

(developers.redhat.com)

41 points | by tbaeder 10 days ago

2 comments

  • MeetingsBrowser 21 hours ago
    This is awesome! I wonder what the benefits and challenges of doing this at the AST level vs in LLVM IR are.

    How much of the language needs to be supported by the AST bytecode interpreter to support precomputing constexprs?

    If information about constexprs could be propagated to LLVM IR, could and LLVM IR interpreter be used to precompute constexprs?

    Also, would a complete AST bytecode interpreter be useful for checks in clang static analyzer?

    • pjmlp 19 hours ago
      Ideally whole of it.

      WG21 could have taken the approach to make everything available on C++11, instead they have been adding pieces bit by bit in each revision.

      The ultimate goal is to have as much coverage as possible, even more so given that reflection depends on constexpr.

      Ultimately like in many compiled managed languages, C++ toolchains will have a compiler and an interpreter available.

  • MeetingsBrowser 21 hours ago
    I hate to bikeshed, but this page breaks the browser's back button. After scrolling to the bottom, the back button takes you to the previous section and needs to be clicked ~5 times to leave the page.

    I've never seen the back button go back to section anchors like that before.