Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Release/1.6.x #465

Merged
merged 5 commits into from
Mar 22, 2019
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ endif()

set(VERSION_MAJOR 1)
set(VERSION_MINOR 6)
set(VERSION_PATCH 0)
set(VERSION_PATCH 1)
#set(VERSION_SUFFIX rc2)

if (VERSION_SUFFIX)
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# EOSIO.CDT (Contract Development Toolkit)
## Version : 1.6.0
## Version : 1.6.1

EOSIO.CDT is a toolchain for WebAssembly (WASM) and set of tools to facilitate contract writing for the EOSIO platform. In addition to being a general purpose WebAssembly toolchain, [EOSIO](https://github.com/eosio/eos) specific optimizations are available to support building EOSIO smart contracts. This new toolchain is built around [Clang 7](https://github.com/eosio/llvm), which means that EOSIO.CDT has the most currently available optimizations and analyses from LLVM, but as the WASM target is still considered experimental, some optimizations are not available or incomplete.

Expand All @@ -22,8 +22,8 @@ $ brew remove eosio.cdt
```
#### Debian Package Install
```sh
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.6.0/eosio.cdt_1.6.0-1_amd64.deb
$ sudo apt install ./eosio.cdt_1.6.0-1_amd64.deb
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.6.1/eosio.cdt_1.6.1-1_amd64.deb
$ sudo apt install ./eosio.cdt_1.6.1-1_amd64.deb
```
#### Debian Package Uninstall
```sh
Expand All @@ -32,8 +32,8 @@ $ sudo apt remove eosio.cdt

#### Fedora RPM Package Install
```sh
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.6.0/eosio.cdt-1.6.0-1.fedora-x86_64.rpm
$ sudo yum install ./eosio.cdt-1.6.0-1.fedora-x86_64.rpm
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.6.1/eosio.cdt-1.6.1-1.fedora-x86_64.rpm
$ sudo yum install ./eosio.cdt-1.6.1-1.fedora-x86_64.rpm
```

#### Fedora RPM Package Uninstall
Expand All @@ -43,8 +43,8 @@ $ sudo yum remove eosio.cdt

#### Centos RPM Package Install
```sh
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.6.0/eosio.cdt-1.6.0-1.centos-x86_64.rpm
$ sudo yum install ./eosio.cdt-1.6.0-1.centos-x86_64.rpm
$ wget https://github.com/eosio/eosio.cdt/releases/download/v1.6.1/eosio.cdt-1.6.1-1.centos-x86_64.rpm
$ sudo yum install ./eosio.cdt-1.6.1-1.centos-x86_64.rpm
```

#### Centos RPM Package Uninstall
Expand Down
2 changes: 1 addition & 1 deletion eosio_llvm
Submodule eosio_llvm updated 1 files
+1 −1 tools/lld
4 changes: 3 additions & 1 deletion tools/include/compiler_options.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,8 @@ static void GetCompDefaults(std::vector<std::string>& copts) {
if (!fnative_opt) {
copts.emplace_back("--target=wasm32");
copts.emplace_back("-ffreestanding");
copts.emplace_back("-nostdlib");
copts.emplace_back("-fno-builtin");
} else {
copts.emplace_back("-Wunused-command-line-argument");
#ifdef __APPLE__
Expand All @@ -377,8 +379,8 @@ static void GetCompDefaults(std::vector<std::string>& copts) {
if (!fasm_opt) {
copts.emplace_back("-fno-threadsafe-statics");
#ifdef CPP_COMP
copts.emplace_back("-fno-rtti");
copts.emplace_back("-fno-exceptions");
copts.emplace_back("-fno-rtti");
copts.emplace_back("-fmodules-ts");
#endif
copts.emplace_back("-DBOOST_DISABLE_ASSERTS");
Expand Down
19 changes: 19 additions & 0 deletions tools/include/eosio/codegen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,12 @@ namespace eosio { namespace cdt {
StringRef main_name;
Rewriter rewriter;
CompilerInstance* ci;
bool apply_was_found = false;

public:
std::vector<CXXMethodDecl*> action_decls;
std::vector<CXXMethodDecl*> notify_decls;

explicit eosio_codegen_visitor(CompilerInstance *CI)
: generation_utils([&](){throw cg.codegen_ex;}), ci(CI) {
cg.ast_context = &(CI->getASTContext());
Expand Down Expand Up @@ -351,6 +355,15 @@ namespace eosio { namespace cdt {
//cg.cxx_methods.emplace(name, decl);
return true;
}

virtual bool VisitDecl(clang::Decl* decl) {
if (auto* fd = dyn_cast<clang::FunctionDecl>(decl)) {
if (fd->getNameInfo().getAsString() == "apply")
apply_was_found = true;
}
return true;
}

/*
virtual bool VisitRecordDecl(RecordDecl* decl) {
static std::set<std::string> _action_set; //used for validations
Expand Down Expand Up @@ -401,6 +414,12 @@ namespace eosio { namespace cdt {
visitor->set_main_fid(fid);
visitor->set_main_name(main_fe->getName());
visitor->TraverseDecl(Context.getTranslationUnitDecl());
for (auto ad : visitor->action_decls)
visitor->create_action_dispatch(ad);

for (auto nd : visitor->notify_decls)
visitor->create_notify_dispatch(nd);

int fd;
llvm::SmallString<128> fn;
try {
Expand Down