Skip to content

Commit

Permalink
Release 0.29.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTAllen committed Jul 6, 2019
2 parents 9213b98 + 59f60ec commit 6e02ac7
Show file tree
Hide file tree
Showing 40 changed files with 857 additions and 284 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ jobs:
user: pony
steps:
- checkout
- run: make all default_ssl=openssl_1.1.0 default_pic=true -j3
- run: make test-ci default_ssl=openssl_1.1.0 default_pic=true
- run: make all default_ssl=openssl_1.1.x default_pic=true -j3
- run: make test-ci default_ssl=openssl_1.1.x default_pic=true

alpine-llvm-5-debug:
docker:
Expand Down
8 changes: 4 additions & 4 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ task:
- pkg install -y gmake pcre2 libunwind llvm70 git

test_script:
- LLVM_CONFIG=llvm-config70 gmake all config=release -j3 default_ssl=openssl_1.1.0
- LLVM_CONFIG=llvm-config70 gmake test-ci config=release default_ssl=openssl_1.1.0
- LLVM_CONFIG=llvm-config70 gmake all config=release -j3 default_ssl=openssl_1.1.x
- LLVM_CONFIG=llvm-config70 gmake test-ci config=release default_ssl=openssl_1.1.x

task:
freebsd_instance:
Expand All @@ -26,8 +26,8 @@ task:
- pkg install -y gmake pcre2 libunwind llvm70 git

test_script:
- LLVM_CONFIG=llvm-config70 gmake all config=debug -j3 default_ssl=openssl_1.1.0
- LLVM_CONFIG=llvm-config70 gmake test-ci config=debug default_ssl=openssl_1.1.0
- LLVM_CONFIG=llvm-config70 gmake all config=debug -j3 default_ssl=openssl_1.1.x
- LLVM_CONFIG=llvm-config70 gmake test-ci config=debug default_ssl=openssl_1.1.x

task:
osx_instance:
Expand Down
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
open_collective: ponyc
2 changes: 1 addition & 1 deletion .packaging/deb/rules
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ifeq ($(DEB_HOST_ARCH),armhf)
endif

ifeq (,$(filter $(DEB_DISTRIBUTION),xenial))
MAKE_OPTIONS += default_ssl='openssl_1.1.0' default_pic=true
MAKE_OPTIONS += default_ssl='openssl_1.1.x' default_pic=true
endif


Expand Down
4 changes: 2 additions & 2 deletions .packaging/rpm/ponyc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
%global extra_build_args use="llvm_link_static" LLVM_CONFIG=/usr/lib64/llvm3.9/bin/llvm-config
%else
%if %{?_vendor} == suse
%global extra_build_args default_ssl='openssl_1.1.0'
%global extra_build_args default_ssl='openssl_1.1.x'
%else
%global extra_build_args default_ssl='openssl_1.1.0' LLVM_CONFIG=/usr/lib64/llvm3.9/bin/llvm-config
%global extra_build_args default_ssl='openssl_1.1.x' LLVM_CONFIG=/usr/lib64/llvm3.9/bin/llvm-config
%endif
%endif

Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,35 @@

All notable changes to the Pony compiler and standard library will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a CHANGELOG](http://keepachangelog.com/).

## [0.29.0] - 2019-07-06

### Fixed

- Do not permit leading zeros in JSON numbers ([PR #3167](https://github.com/ponylang/ponyc/pull/3167))
- Make reading via TCPConnection re-entrant safe ([PR #3175](https://github.com/ponylang/ponyc/pull/3175))
- Cleanup TCPConnection GC-safety mechanism for writev buffers ([PR #3177](https://github.com/ponylang/ponyc/pull/3177))
- Add SSL tests and fix some SSL related bugs ([PR #3174](https://github.com/ponylang/ponyc/pull/3174))
- Fix lib/llvm to support MacOS ([PR #3181](https://github.com/ponylang/ponyc/pull/3181))
- Close Denial of Service issue with TCPConnection.expect ([PR #3197](https://github.com/ponylang/ponyc/pull/3197))
- Fix return type checking to allow aliasing for non-ephemeral return types. ([PR #3201](https://github.com/ponylang/ponyc/pull/3201))

### Added

- Allow use of OpenSSL 1.1.1 when building Pony ([PR #3156](https://github.com/ponylang/ponyc/pull/3156))
- Add `pointer.offset` to get arbitrary pointer tags via offset ([PR #3177](https://github.com/ponylang/ponyc/pull/3177))
- Add DTrace/SystemTap probes for muted & unmuted events ([PR #3196](https://github.com/ponylang/ponyc/pull/3196))
- Add method to AsioEvent to see if an event is a oneshot ([PR #3198](https://github.com/ponylang/ponyc/pull/3198))

### Changed

- Do not permit leading zeros in JSON numbers ([PR #3167](https://github.com/ponylang/ponyc/pull/3167))
- Make TCPConnection yield on writes to not hog cpu ([PR #3176](https://github.com/ponylang/ponyc/pull/3176))
- Change how TCP connection reads data to improve performance ([PR #3178](https://github.com/ponylang/ponyc/pull/3178))
- Allow use of runtime TCP connect without ASIO one shot ([PR #3171](https://github.com/ponylang/ponyc/pull/3171))
- Simplify buffering in TCPConnection ([PR #3185](https://github.com/ponylang/ponyc/pull/3185))
- Allow for fine-grained control of yielding CPU in TCPConnection ([PR #3197](https://github.com/ponylang/ponyc/pull/3187))
- Make TCPConnection.expect partial ([PR #3197](https://github.com/ponylang/ponyc/pull/3197))

## [0.28.1] - 2019-06-01

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions Makefile-lib-llvm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ rebuild-test: clean
#
# For example:
# $ time CC=clang CXX=clang++ make -j10 -f Makefile-lib-llvm \
# verbose=1 config=debug default_pic=true default_ssl=openssl_1.1.0 llvm_target=llvm-current rebuild-some-tests \
# verbose=1 config=debug default_pic=true default_ssl=openssl_1.1.x llvm_target=llvm-current rebuild-some-tests \
# gtest_filter=--gtest_filter=CodegenOptimisationTest.MergeSendMessageReordering 2>&1 | tee clang-rebuild-some-tests.txt
.PHONY: rebuild-some-tests
rebuild-some-tests: clean
Expand Down Expand Up @@ -100,7 +100,7 @@ help:
@echo ' default_ssl=Name Make Name the default ssl version'
@echo ' where Name is one of:'
@echo ' openssl_0.9.0'
@echo ' openssl_1.1.0'
@echo ' openssl_1.1.x'
@echo ' llvm_target=Target Make llvm where Target is one of:'
@echo ' all (default if not specified)'
@echo ' rebuild'
Expand Down
27 changes: 14 additions & 13 deletions Makefile-ponyc
Original file line number Diff line number Diff line change
Expand Up @@ -383,19 +383,20 @@ ifeq ($(runtime-bitcode),yes)
endif

# Set default ssl version
valid_ssl_versions=openssl_0.9.0 openssl_1.1.0 openssl_1.1.1 openssl_1.1.x
ifdef default_ssl
ifeq ("openssl_0.9.0","$(default_ssl)")
default_ssl_valid:=ok
endif
ifeq ("openssl_1.1.0","$(default_ssl)")
default_ssl_valid:=ok
endif
ifeq (ok,$(default_ssl_valid))
$(warning default_ssl is $(default_ssl))
ifeq ($(filter-out $(valid_ssl_versions),$(default_ssl)),)
# both openssl_1.1.0 and openssl_1.1.1 are translated to openssl_1.1.x
ifneq (,$(findstring openssl_1.1.,$(default_ssl)))
pony_default_ssl:=openssl_1.1.x
else
pony_default_ssl:=$(default_ssl)
endif
$(info pony_default_ssl is $(pony_default_ssl))
else
$(error default_ssl=$(default_ssl) is invalid, expecting one of openssl_0.9.0 or openssl_1.1.0)
$(error default_ssl=$(default_ssl) is invalid (valid values: $(valid_ssl_versions)))
endif
BUILD_FLAGS += -DPONY_DEFAULT_SSL=\"$(default_ssl)\"
BUILD_FLAGS += -DPONY_DEFAULT_SSL=\"$(pony_default_ssl)\"
endif

makefile_abs_path := $(realpath $(lastword $(MAKEFILE_LIST)))
Expand Down Expand Up @@ -991,8 +992,8 @@ test-stdlib: stdlib
$(SILENT)rm stdlib

test-core: all
$(SILENT)$(PONY_BUILD_DIR)/libponyc.tests
$(SILENT)$(PONY_BUILD_DIR)/libponyrt.tests
$(SILENT)$(PONY_BUILD_DIR)/libponyc.tests --gtest_shuffle
$(SILENT)$(PONY_BUILD_DIR)/libponyrt.tests --gtest_shuffle

test: test-core test-stdlib test-examples

Expand Down Expand Up @@ -1112,7 +1113,7 @@ help:
@echo ' default_ssl=Name Make Name the default ssl version'
@echo ' where Name is one of:'
@echo ' openssl_0.9.0'
@echo ' openssl_1.1.0'
@echo ' openssl_1.1.x'
@echo
@echo 'USE OPTIONS:'
@echo ' valgrind'
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ cd ../../../
#### Debug/test ....
Now build and test using `LLVM_CFG=llvm-default.cfg` and any other appropriate parameters:
```
make -j12 LLVM_CFG=llvm-default.cfg default_pic=true default_ssl=openssl_1.1.0 -f Makefile-lib-llvm
make -j12 LLVM_CFG=llvm-default.cfg default_pic=true default_ssl=openssl_1.1.x -f Makefile-lib-llvm
```
When satisfied create a commit pushing to your repo:
```
Expand Down Expand Up @@ -390,7 +390,7 @@ To build ponyc and compile and run helloworld:

```bash
cd ~/ponyc/
make default_pic=true default_ssl=openssl_1.1.0
make default_pic=true default_ssl=openssl_1.1.x
./build/release/ponyc examples/helloworld
./helloworld
```
Expand Down Expand Up @@ -469,7 +469,7 @@ Build ponyc, compile and run helloworld:

```bash
cd ~/ponyc/
make default_pic=true default_ssl=openssl_1.1.0
make default_pic=true default_ssl=openssl_1.1.x
./build/release/ponyc examples/helloworld
./helloworld
```
Expand Down Expand Up @@ -513,7 +513,7 @@ To build ponyc, compile and run helloworld:

```bash
cd ~/ponyc/
make default_ssl='openssl_1.1.0'
make default_ssl='openssl_1.1.x'
./build/release/ponyc examples/helloworld
./helloworld
```
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.28.1
0.29.0
68 changes: 61 additions & 7 deletions lib/llvm/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,45 @@
# Build llvm library
# See README.md and `make help` for instructions

ifeq ($(OS),Windows_NT)
OSTYPE = windows
else
UNAME_S := $(shell uname -s)

ifeq ($(UNAME_S),Linux)
OSTYPE = linux

ifndef AR
ifneq (,$(shell which gcc-ar 2> /dev/null))
AR = gcc-ar
endif
endif

ALPINE=$(wildcard /etc/alpine-release)
endif

ifeq ($(UNAME_S),Darwin)
OSTYPE = osx
endif

ifeq ($(UNAME_S),FreeBSD)
OSTYPE = bsd
CXX = c++
endif

ifeq ($(UNAME_S),DragonFly)
OSTYPE = bsd
CXX = c++
endif

ifeq ($(UNAME_S),OpenBSD)
OSTYPE = bsd
CXX = c++
LLVM_CONFIG = /usr/local/bin/llvm-config
default_pic = true
endif
endif

# Set LLVM_CFG if not set
ifeq (,$(LLVM_CFG))
LLVM_CFG := llvm-default.cfg
Expand All @@ -11,13 +50,21 @@ ifeq (,$(LLVM_RULES))
LLVM_RULES := llvm-base.rules
endif

# Look for readlink or greadlink
ifneq (,$(shell which readlink 2> /dev/null))
LLVM_READ_LINK = readlink
# Look for greadlink or readlink
ifeq ($(OSTYPE), osx)
# On osx only use greadlink as readlink, if it exists,
# doesn't support -e parameter.
ifneq (,$(shell which greadlink 2> /dev/null))
LLVM_READ_LINK = greadlink
else
$(error No greadlink command, for Mac OS X `install coreutils`!)
endif
else ifneq (,$(shell which greadlink 2> /dev/null))
LLVM_READ_LINK = greadlink
else ifneq (,$(shell which readlink 2> /dev/null))
LLVM_READ_LINK = readlink
else
$(error No readlink command, for Mac OS X `install coreutils`!)
$(error No greadlink or readlink command)
endif

LLVM_ROOT_DIR := $(shell pwd)
Expand All @@ -30,7 +77,9 @@ endif
# Some defaults
LLVM_BUILD_ENGINE ?= Unix Makefiles
LLVM_BUILD_TYPE ?= Release
LLVM_LINKER ?= gold

# Define LLVM_LINKER to pass LLVM_USE_LINKER to have llvm output -fuse-ld=${LLVM_LINKER}
#LLVM_LINKER ?= gold

# There must always be a LLVM_CHECKOUT_REF
ifeq (,$(LLVM_CHECKOUT_REF))
Expand All @@ -49,7 +98,9 @@ LLVM_BUILD_DIR := $(LLVM_GEN_DIR)/build
LLVM_INSTALL_DIR := $(LLVM_GEN_DIR)/dist
LLVM_TGT_DIR := $(LLVM_GEN_DIR)/tgt

LLVM_USE_LINKER := -DLLVM_USE_LINKER=$(LLVM_LINKER)
ifneq (,${LLVM_LINKER})
LLVM_USE_LINKER := -DLLVM_USE_LINKER=$(LLVM_LINKER)
endif

ifneq (,$(verbose))
VERBOSE_CMAKE := -DCMAKE_VERBOSE_MAKEFILE=true
Expand Down Expand Up @@ -88,7 +139,9 @@ else ifeq ($(MAKECMDGOALS),rebuild)
else ifeq ($(MAKECMDGOALS),get-submodule)
# nothing to init
else
ifeq ($(shell $(LLVM_READ_LINK) -f $(LLVM_INSTALL_DIR_SYMLINK)), $(LLVM_INSTALL_DIR))
# Check and see if we've installed this version. If so we don't need to get the source.
READ_LINK_RSLT := $(shell $(LLVM_READ_LINK) -e $(LLVM_INSTALL_DIR_SYMLINK))
ifeq ($(READ_LINK_RSLT), $(LLVM_INSTALL_DIR))
GET_LLVM_SRC_TARGET := $(LLVM_TGT_DIR)/get-nothing
else
GET_LLVM_SRC_TARGET := $(LLVM_TGT_DIR)/get-llvm-src-$(LLVM_TGT_TAG)
Expand All @@ -111,6 +164,7 @@ endif
#$(info lib/llvm/Makefile LLVM_BUILD_DIR="$(LLVM_BUILD_DIR)")
#$(info lib/llvm/Makefile LLVM_INSTALL_DIR="$(LLVM_INSTALL_DIR)")
#$(info lib/llvm/Makefile LLVM_INSTALL_DIR_SYMLINK="$(LLVM_INSTALL_DIR_SYMLINK)")
#$(info lib/llvm/Makefile READ_LINK_RSLT="$(READ_LINK_RSLT)")
#$(info lib/llvm/Makefile GET_LLVM_SRC_TARGET="$(GET_LLVM_SRC_TARGET)")
#$(info lib/llvm/Makefile LLVM_PROJECT_LIST="$(LLVM_PROJECT_LIST)")
#$(info lib/llvm/Makefile PROJECT_LIST="$(PROJECT_LIST)")
Expand Down
4 changes: 2 additions & 2 deletions lib/llvm/llvm-base.rules
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ all: $(LLVM_BUILD_DIR) $(LLVM_TGT_DIR) install

.PHONY: install
install: $(LLVM_TGT_DIR)/installed-llvm-$(LLVM_TGT_TAG)
@ln -sf -T $(LLVM_INSTALL_DIR) $(LLVM_INSTALL_DIR_SYMLINK)
@ln -sf $(LLVM_INSTALL_DIR) $(LLVM_INSTALL_DIR_SYMLINK)

.PHONY: rebuild
rebuild: clean-built-installed
@$(MAKE) $(LLVM_TGT_DIR)/installed-llvm-$(LLVM_TGT_TAG)
@ln -sf -T $(LLVM_INSTALL_DIR) $(LLVM_INSTALL_DIR_SYMLINK)
@ln -sf $(LLVM_INSTALL_DIR) $(LLVM_INSTALL_DIR_SYMLINK)

$(LLVM_BUILD_DIR):
@mkdir -p $(LLVM_BUILD_DIR)
Expand Down
6 changes: 6 additions & 0 deletions packages/builtin/asio_event.pony
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ primitive AsioEvent
"""
flags == 0

fun oneshotable(flags: U32): Bool =>
"""
Returns true if the flags contain the oneshot flag.
"""
(flags and (1 << 8)) != 0

fun dispose(): U32 => 0

fun read(): U32 => 1 << 0
Expand Down
6 changes: 6 additions & 0 deletions packages/builtin/pointer.pony
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ struct Pointer[A]
"""
compile_intrinsic

fun tag offset(n: USize): Pointer[A] tag =>
"""
Return a tag pointer to the n-th element.
"""
_unsafe()._offset(n)

fun tag _element_size(): USize =>
"""
Return the size of a single element in an array of type A.
Expand Down
Loading

0 comments on commit 6e02ac7

Please sign in to comment.