Learn · CERN

Talk25 min

Cling - The LLVM-based C++ Interpreter

Vasil Georgiev Vasilev · CERN

Watch At CERN

About

Cling (http://cern.ch/cling) is a C++ interpreter, built on top of clang (http://clang.llvm.org) and LLVM (http://llvm.org). Like its predecessor CINT, cling offers an interactive, terminal-like prompt. It enables exploratory programming with rapid edit / run cycles.

The ROOT team has more than 15 years of experience with C++ interpreters, and this has been fully exploited in the design of cling. However, matching the concepts of an interpreter to a compiler library is a non-trivial task; we will explain how this is done for cling, and how we managed to implement cling as a small (10,000 lines of code) extension to the clang and llvm libraries.

The resulting features clearly show the advantages of basing an interpreter on a compiler. Cling uses clang's praised concise and easy to understand diagnostics. Building an interpreter on top of a compiler library makes the transition between interpreted and compiled code much easier and smoother. We will present the design, e.g. how cling treats the C++ extensions that used to be available in CINT. We will also present the new features, e.g. how C++11 will come to cling, and how dictionaries will be simplified due to cling. We describe the state of cling's integration in the ROOT Framework..

0:00:00 Slide 1

0:01:14 Slide 2

0:02:28 Slide 3

0:04:55 Slide 4

0:07:22 Slide 5

0:09:49 Slide 6

0:12:16 Slide 7

0:14:43 Slide 8

0:17:10 Slide 9

The talk

  1. Cling - The LLVM-based C++ Interpreter 2012-05-21 · 25 min · CERN's player

Credits and licence

Institution
CERN
Department
Conferences
Speaker
Vasil Georgiev Vasilev
Year
2012
Language
English
Subjects
Physics, Computer science, Earth and environment
Source
CERN
Licence
CERN, as CERN states it. CERN's terms
Attribution
© CERN. CERN provides its audiovisual media free of charge for educational and informational use, credited to CERN; this lecture is shown in CERN's own player.
Who can watch
CERN gives no rating. Invisible Network shows it to Tweens profiles and older, judged from what the source says about it. How courses are placed