]> granicus.if.org Git - clang/commit
[Clang Interpreter] Initial patch for the constexpr interpreter
authorNandor Licker <n@ndor.email>
Mon, 2 Sep 2019 10:38:08 +0000 (10:38 +0000)
committerNandor Licker <n@ndor.email>
Mon, 2 Sep 2019 10:38:08 +0000 (10:38 +0000)
commitb892807e129e6e9ecaf0a40406e7327930404afa
treefe5540a444517868cddf152e7e1a49aaeb2b07aa
parentae47f3df5f8c7ec845068bcc1d32af667b52904b
[Clang Interpreter] Initial patch for the constexpr interpreter

Summary:
This patch introduces the skeleton of the constexpr interpreter,
capable of evaluating a simple constexpr functions consisting of
if statements. The interpreter is described in more detail in the
RFC. Further patches will add more features.

Reviewers: Bigcheese, jfb, rsmith

Subscribers: bruno, uenoku, ldionne, Tyker, thegameg, tschuett, dexonsmith, mgorny, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D64146

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370636 91177308-0d34-0410-b5e6-96231b3b80d8
66 files changed:
docs/ConstantInterpreter.rst [new file with mode: 0644]
docs/index.rst
include/clang/AST/ASTContext.h
include/clang/AST/OptionalDiagnostic.h [new file with mode: 0644]
include/clang/Basic/DiagnosticASTKinds.td
include/clang/Basic/LangOptions.def
include/clang/Driver/Options.td
lib/AST/ASTContext.cpp
lib/AST/CMakeLists.txt
lib/AST/ExprConstant.cpp
lib/AST/Interp/Block.cpp [new file with mode: 0644]
lib/AST/Interp/Block.h [new file with mode: 0644]
lib/AST/Interp/Boolean.h [new file with mode: 0644]
lib/AST/Interp/ByteCodeEmitter.cpp [new file with mode: 0644]
lib/AST/Interp/ByteCodeEmitter.h [new file with mode: 0644]
lib/AST/Interp/ByteCodeExprGen.cpp [new file with mode: 0644]
lib/AST/Interp/ByteCodeExprGen.h [new file with mode: 0644]
lib/AST/Interp/ByteCodeGenError.cpp [new file with mode: 0644]
lib/AST/Interp/ByteCodeGenError.h [new file with mode: 0644]
lib/AST/Interp/ByteCodeStmtGen.cpp [new file with mode: 0644]
lib/AST/Interp/ByteCodeStmtGen.h [new file with mode: 0644]
lib/AST/Interp/CMakeLists.txt [new file with mode: 0644]
lib/AST/Interp/Context.cpp [new file with mode: 0644]
lib/AST/Interp/Context.h [new file with mode: 0644]
lib/AST/Interp/Descriptor.cpp [new file with mode: 0644]
lib/AST/Interp/Descriptor.h [new file with mode: 0644]
lib/AST/Interp/Disasm.cpp [new file with mode: 0644]
lib/AST/Interp/EvalEmitter.cpp [new file with mode: 0644]
lib/AST/Interp/EvalEmitter.h [new file with mode: 0644]
lib/AST/Interp/Frame.cpp [new file with mode: 0644]
lib/AST/Interp/Frame.h [new file with mode: 0644]
lib/AST/Interp/Function.cpp [new file with mode: 0644]
lib/AST/Interp/Function.h [new file with mode: 0644]
lib/AST/Interp/Integral.h [new file with mode: 0644]
lib/AST/Interp/Interp.cpp [new file with mode: 0644]
lib/AST/Interp/Interp.h [new file with mode: 0644]
lib/AST/Interp/InterpFrame.cpp [new file with mode: 0644]
lib/AST/Interp/InterpFrame.h [new file with mode: 0644]
lib/AST/Interp/InterpStack.cpp [new file with mode: 0644]
lib/AST/Interp/InterpStack.h [new file with mode: 0644]
lib/AST/Interp/InterpState.cpp [new file with mode: 0644]
lib/AST/Interp/InterpState.h [new file with mode: 0644]
lib/AST/Interp/Opcode.h [new file with mode: 0644]
lib/AST/Interp/Opcodes.td [new file with mode: 0644]
lib/AST/Interp/Pointer.cpp [new file with mode: 0644]
lib/AST/Interp/Pointer.h [new file with mode: 0644]
lib/AST/Interp/Program.cpp [new file with mode: 0644]
lib/AST/Interp/Program.h [new file with mode: 0644]
lib/AST/Interp/Record.cpp [new file with mode: 0644]
lib/AST/Interp/Record.h [new file with mode: 0644]
lib/AST/Interp/Source.cpp [new file with mode: 0644]
lib/AST/Interp/Source.h [new file with mode: 0644]
lib/AST/Interp/State.cpp [new file with mode: 0644]
lib/AST/Interp/State.h [new file with mode: 0644]
lib/AST/Interp/Type.cpp [new file with mode: 0644]
lib/AST/Interp/Type.h [new file with mode: 0644]
lib/Driver/ToolChains/Clang.cpp
lib/Frontend/CompilerInvocation.cpp
test/AST/Interp/cond.cpp [new file with mode: 0644]
test/SemaCXX/constant-expression-cxx2a.cpp
test/SemaCXX/constexpr-many-arguments.cpp
test/SemaCXX/shift.cpp
utils/TableGen/CMakeLists.txt
utils/TableGen/ClangOpcodesEmitter.cpp [new file with mode: 0644]
utils/TableGen/TableGen.cpp
utils/TableGen/TableGenBackends.h