Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
17 changes: 17 additions & 0 deletions CXXR-UPSTREAM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# CXXR source snapshot

The `cxxr/` directory is an unmodified source snapshot of CXXR's continuation,
Rho. CXXR was renamed Rho while retaining the project goal of refactoring the R
interpreter into a compatible, efficient C++ virtual machine.

- Upstream: <https://github.com/rho-devel/rho>
- Commit: `bf6c652b826cd892e88630eb35f182b614af52b1`
- Source tree: `b12c08f052d89467122a0deee381f13609ea4e40`
- Commit date: 2017-06-30
- Upstream status at that commit: development suspended
- License: GNU GPL version 2; see `cxxr/COPYING`

The snapshot is kept separate from `code/`, which contains ir's active R source.
It is reference material for comparing interpreter representation, evaluation,
promise, pairlist, memory-management, and virtual-machine designs. Nothing in
the ir build currently compiles or links `cxxr/`.
47 changes: 47 additions & 0 deletions cxxr/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
BasedOnStyle: WebKit
# AccessModifierOffset: -4
# ConstructorInitializerIndentWidth: 4
# AlignEscapedNewlinesLeft: false
# AlignTrailingComments: false
# AllowAllParametersOfDeclarationOnNextLine: true
# AllowShortIfStatementsOnASingleLine: false
# AllowShortLoopsOnASingleLine: false
AlwaysBreakTemplateDeclarations: true
# AlwaysBreakBeforeMultilineStrings: false
# BreakBeforeBinaryOperators: true
# BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
# BinPackParameters: true
ColumnLimit: 80
ConstructorInitializerAllOnOneLineOrOnePerLine: true
# DerivePointerBinding: false
# ExperimentalAutoDetectBinPacking: false
# IndentCaseLabels: false
# MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
# ObjCSpaceBeforeProtocolList: true
# PenaltyBreakBeforeFirstCallParameter: 19
# PenaltyBreakComment: 60
# PenaltyBreakString: 1000
# PenaltyBreakFirstLessLess: 120
# PenaltyExcessCharacter: 1000000
# PenaltyReturnTypeOnItsOwnLine: 60
# PointerBindsToType: true
# SpacesBeforeTrailingComments: 1
# Cpp11BracedListStyle: false
Standard: Cpp11
# IndentWidth: 4
# TabWidth: 8
UseTab: Always
# BreakBeforeBraces: Stroustrup
# IndentFunctionDeclarationAfterType: false
# SpacesInParentheses: false
# SpacesInAngles: false
# SpaceInEmptyParentheses: false
# SpacesInCStyleCastParentheses: false
# SpaceAfterControlStatementKeyword: true
# SpaceBeforeAssignmentOperators: true
# ContinuationIndentWidth: 4
...

98 changes: 98 additions & 0 deletions cxxr/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
*.a
*.d
*.o
*.so
*.ts

/bin
/include
/jit
/library
/libtool

/confdefs.h
/conftest*
/config.log
/config.status
/Makeconf
/Makefile
/Makefile.bak
/Makefrag.cc
/Makefrag.cc_lo
/Makefrag.cxx
/Makefrag.m

/doc/manual/R-*.html
/doc/manual/R-*.html.tmp
/doc/Makefile
/doc/NEWS.rds
/doc/R.1
/doc/html/Makefile
/doc/html/index.html
/doc/html/packages.html
/doc/manual/Makefile
/doc/manual/version.texi

/etc/*
!/etc/*.in

/m4/Makefile

/po/Makefile

/share/Makefile

/src/**/Makedeps
/src/**/Makefile

/src/extra/sparsehash/.deps/
/src/extra/sparsehash/autom4te.cache/
/src/extra/sparsehash/confdefs.h
/src/extra/sparsehash/config.log
/src/extra/sparsehash/config.status
/src/extra/sparsehash/src/sparsehash/internal/sparseconfig.h
/src/extra/sparsehash/src/stamp-h1
/src/extra/sparsehash/*test
/src/extra/sparsehash/libsparsehash.pc
/src/extra/sparsehash/src/config.h
/src/extra/sparsehash/time_hash_map

/src/include/*.tsa
/src/include/rho/stamp-R
/src/include/R_ext/stamp-R
/src/include/Rconfig.h
/src/include/Rmath.h
/src/include/Rmath.h0
/src/include/Rversion.h
/src/include/config.h
/src/include/stamp-R
/src/include/stamp-h

/src/library/stamp-docs
/src/library/*.inn
/src/library/*/all.R
/src/library/*/DESCRIPTION

/src/library/Recommended/stamp-recommended
/src/library/Recommended/*.ts.out

/src/main/R.bin
/src/main/jit/RuntimeImpl.bc

/src/scripts/Makefile
/src/scripts/R.fe
/src/scripts/R.sh
/src/scripts/Rcmd
/src/scripts/f77_f2c
/src/scripts/javareconf
/src/scripts/mkinstalldirs
/src/scripts/pager
/src/scripts/rtags

/src/unix/Rscript

/tests/Makefile
/tools/Makefile
/tests/*/Makefile

/stamp-java
218 changes: 218 additions & 0 deletions cxxr/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
sudo: required
dist: trusty
language: cpp
env:
global:
# By default, rho uses its own implementation of tar written in R.
# It's really slow, so use system tar instead.
- TAR=/bin/tar
- R_BUILD_TAR=/bin/tar
- R_INSTALL_TAR=/bin/tar
# Use catchsegv to get useful stacktraces on failures.
- RHO_DEBUGGER=catchsegv

matrix:
include:
# gcc 4.9
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libboost-all-dev
- zlib1g-dev
- libbz2-dev
- liblzma-dev
- libpcre3-dev
- libedit-dev
- gcc-4.9
- g++-4.9
- gfortran-4.9
env: FC=gfortran-4.9 F77=gfortran-4.9 C_COMPILER=gcc-4.9 CXX_COMPILER=g++-4.9

# gcc 5.4
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libboost-all-dev
- zlib1g-dev
- libbz2-dev
- liblzma-dev
- libpcre3-dev
- libedit-dev
- gcc-5=5.4.*
- g++-5=5.4.*
- gfortran-5=5.4.*
env: FC=gfortran-5 F77=gfortran-5 C_COMPILER=gcc-5 CXX_COMPILER=g++-5

# gcc 6.2 with code coverage.
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libboost-all-dev
- zlib1g-dev
- libbz2-dev
- liblzma-dev
- libpcre3-dev
- libedit-dev
- gcc-6=6.2.*
- g++-6=6.2.*
- gfortran-6=6.2.*
env: F77=gfortran-6 FCC=gfortran-6 C_COMPILER=gcc-6 CXX_COMPILER=g++-6 CFLAGS="-g -O1 --coverage" CXXFLAGS="${CFLAGS}" LDFLAGS="${CFLAGS}" COVERAGE=1

# TODO: work out how to use clang 3.4 on travis.
# - compiler: clang
# addons:
# apt:
# sources:
# - ubuntu-toolchain-r-test
# packages:
# - gfortran
# - libboost-all-dev
# - zlib1g-dev
# - libbz2-dev
# - liblzma-dev
# - libpcre3-dev
# - libedit-dev
# - clang-3.4
# - llvm-3.4-dev
# env: C_COMPILER=clang CXX_COMPILER=clang++ LLVM_CONFIG=/usr/bin/llvm-config-3.4

# With address sanitizer enabled. Use the most recent supported verison
# of clang, to get the best error detection.
# TODO: enable initialization order checking.
- compiler: clang
addons:
apt:
sources:
- sourceline: "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.8 main"
packages:
- gfortran
- libboost-all-dev
- zlib1g-dev
- libbz2-dev
- liblzma-dev
- libpcre3-dev
- libedit-dev
- clang-3.8
- llvm-3.8-dev
env: C_COMPILER=clang-3.8 CXX_COMPILER=clang++-3.8 LLVM_CONFIG=/usr/bin/llvm-config-3.8 CPPFLAGS="-DNO_CELLPOOLS" CFLAGS="-g -O2 -fsanitize=address" CXXFLAGS="${CFLAGS}" MAIN_LDFLAGS="${CFLAGS}"

# With undefined behaviour sanitizer enabled. Use the most recent
# supported verison of clang, to get the best error detection.
- compiler: clang
addons:
apt:
sources:
- sourceline: "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.8 main"
packages:
- gfortran
- libboost-all-dev
- zlib1g-dev
- libbz2-dev
- liblzma-dev
- libpcre3-dev
- libedit-dev
- clang-3.8
- llvm-3.8-dev
env: C_COMPILER=clang-3.8 CXX_COMPILER=clang++-3.8 LLVM_CONFIG=/usr/bin/llvm-config-3.8 UBSAN_OPTIONS="print_stacktrace=1 suppressions=`pwd`/.ubsan_suppressions" CFLAGS="-g -O2 -fsanitize=undefined" CXXFLAGS="${CFLAGS}" MAIN_LDFLAGS="${CFLAGS}"

- compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gfortran
- libboost-all-dev
- zlib1g-dev
- libbz2-dev
- liblzma-dev
- libpcre3-dev
- libedit-dev
- clang-3.5
- llvm-3.5-dev
env: C_COMPILER=clang-3.5 CXX_COMPILER=clang++-3.5 LLVM_CONFIG=/usr/bin/llvm-config-3.5

- compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gfortran
- libboost-all-dev
- zlib1g-dev
- libbz2-dev
- liblzma-dev
- libpcre3-dev
- libedit-dev
- clang-3.6
- llvm-3.6-dev
env: C_COMPILER=clang-3.6 CXX_COMPILER=clang++-3.6 LLVM_CONFIG=/usr/bin/llvm-config-3.6

- compiler: clang
addons:
apt:
sources:
- sourceline: "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.7 main"
packages:
- gfortran
- libboost-all-dev
- zlib1g-dev
- libbz2-dev
- liblzma-dev
- libpcre3-dev
- libedit-dev
- clang-3.7
- llvm-3.7-dev
env: C_COMPILER=clang-3.7 CXX_COMPILER=clang++-3.7 LLVM_CONFIG=/usr/bin/llvm-config-3.7

- compiler: clang
addons:
apt:
sources:
- sourceline: "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.8 main"
packages:
- gfortran
- libboost-all-dev
- zlib1g-dev
- libbz2-dev
- liblzma-dev
- libpcre3-dev
- libedit-dev
- clang-3.8
- llvm-3.8-dev
env: C_COMPILER=clang-3.8 CXX_COMPILER=clang++-3.8 LLVM_CONFIG=/usr/bin/llvm-config-3.8 CPPFLAGS="-UNDEBUG -DCHECKED_SEXP_DOWNCAST -D_FORTIFY_SOURCE=2" CFLAGS="-g -O2 -fstack-protector-strong" CXXFLAGS=${CFLAGS}

allow_failures:
# Building with llvm 3.7 currently segfaults. Needs investigating.
- env: C_COMPILER=clang-3.7 CXX_COMPILER=clang++-3.7 LLVM_CONFIG=/usr/bin/llvm-config-3.7
# Likewise for the ubsan run.
- env: C_COMPILER=clang-3.8 CXX_COMPILER=clang++-3.8 LLVM_CONFIG=/usr/bin/llvm-config-3.8 UBSAN_OPTIONS="print_stacktrace=1 suppressions=`pwd`/.ubsan_suppressions" CFLAGS="-g -O2 -fsanitize=undefined" CXXFLAGS="${CFLAGS}" MAIN_LDFLAGS="${CFLAGS}"

before_install:
- pip install --user codecov

script:
- tools/rsync-recommended
- ${CXX_COMPILER} --version
- CC=${C_COMPILER} CXX=${CXX_COMPILER} ./configure
--enable-werror
--enable-llvm-jit=yes
--with-llvm=$LLVM_CONFIG || cat config.log
- travis_wait 60 make -j 2
# Needed to prevent asan builds running out of memory.
- sudo sh -c 'echo 1 > /proc/sys/vm/overcommit_memory'
# TODO: upgrade to check-devel.
- travis_wait 60 make -j 2 check

after_success:
- if [ -n "$COVERAGE" ]; then bash <(curl -s https://codecov.io/bash) -x gcov-6 -g src/extra -g tests -X coveragepy ; fi
1 change: 1 addition & 0 deletions cxxr/.ubsan_suppressions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vptr:ilist.h
Loading