Skip to content

Commit

Permalink
Merge branch 'release-0.9.0' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTAllen committed Nov 11, 2016
2 parents cc187c6 + 4c00dad commit 5a0bd57
Show file tree
Hide file tree
Showing 71 changed files with 1,599 additions and 493 deletions.
57 changes: 43 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,56 +116,64 @@ matrix:
- CXX1=g++-5
- os: osx
env:
- LLVM_VERSION="3.6.2"
- LLVM_CONFIG="llvm-config-3.6"
- config=debug
- CC1=clang-3.6
- CXX1=clang++-3.6
- os: osx
env:
- LLVM_VERSION="3.6.2"
- LLVM_CONFIG="llvm-config-3.6"
- config=release
- lto=no
- CC1=clang-3.6
- CXX1=clang++-3.6
- os: osx
env:
- LLVM_VERSION="3.7.1"
- LLVM_CONFIG="llvm-config-3.7"
- config=debug
- CC1=clang-3.7
- CXX1=clang++-3.7
- os: osx
env:
- LLVM_VERSION="3.7.1"
- LLVM_CONFIG="llvm-config-3.7"
- config=release
- lto=no
- CC1=clang-3.7
- CXX1=clang++-3.7
- os: osx
env:
- LLVM_VERSION="3.8.1"
- LLVM_CONFIG="llvm-config-3.8"
- config=debug
- CC1=clang-3.8
- CXX1=clang++-3.8
- os: osx
env:
- LLVM_VERSION="3.8.1"
- LLVM_CONFIG="llvm-config-3.8"
- config=release
- lto=no
- CC1=clang-3.8
- CXX1=clang++-3.8
# LLVM 3.9 can be enabled for OSX once Homebrew supports it.
#- os: osx
# env:
# - LLVM_CONFIG="llvm-config-3.9"
# - config=debug
# - CC1=clang-3.9
# - CXX1=clang++-3.9
#- os: osx
# env:
# - LLVM_CONFIG="llvm-config-3.9"
# - config=release
# - CC1=clang-3.9
# - CXX1=clang++-3.9
- os: osx
env:
- LLVM_VERSION="3.9.0"
- LLVM_CONFIG="llvm-config-3.9"
- config=debug
- CC1=clang-3.9
- CXX1=clang++-3.9
- os: osx
env:
- LLVM_VERSION="3.9.0"
- LLVM_CONFIG="llvm-config-3.9"
- config=release
- lto=no
- CC1=clang-3.9
- CXX1=clang++-3.9


rvm:
Expand Down Expand Up @@ -208,7 +216,28 @@ install:
then
brew update;
brew install gmp; brew link --overwrite gmp;
brew install llvm36 llvm37 llvm38 pcre2 libressl;
if [ "${LLVM_VERSION}" = "3.6.2" ];
then
brew install llvm36;
fi;
if [ "${LLVM_VERSION}" = "3.7.1" ];
then
brew install llvm37;
fi;
if [ "${LLVM_VERSION}" = "3.8.1" ];
then
brew install llvm38;
fi;
if [ "${LLVM_VERSION}" = "3.9.0" ];
then
brew install llvm;
brew link --overwrite --force llvm;
mkdir llvmsym;
ln -s `which llvm-config` llvmsym/llvm-config-3.9;
ln -s `which clang++` llvmsym/clang++-3.9;
export PATH=llvmsym/:$PATH;
fi;
brew install pcre2 libressl;
fi;

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

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.9.0] - 2016-11-11

### Fixed

- Stop leaking memory during serialization (issue #1413) (PR #1414)
- Fixed compiler segmentation fault when given an invalid target triple. (PR #1406)
- Fixed error message when no type arguments are given (issue #1396) (PR #1397)
- Fixed compiler assert failure when constructor is called on type intersection (issue #1398) (PR #1401)
- Fix compiler assert fail on circular type inference error (issue #1334) (PR #1339)
- Performance problem in the scheduler queue when running with many threads (issue #1404)
- Invalid name mangling in generated C headers (issue #1377)

### Added

- Method chaining (RFC #25) (PR #1411)
- Iter class methods `all`, `any`, `collect`, `count`, `find`, `last`, `nth`, `run`, `skip`, `skip_while`, `take`, `take_while` (issue #1370)
- Output of `ponyc --version` shows C compiler used to build pony (issue #1245)
- Makefile detects `llvmconfig39` in addition to `llvm-config-3.9` (#1379)
- LLVM 3.9 support

### Changed

- Changed lambda literal syntax to be more concise (issue #1391) (PR #1400)

## [0.8.0] - 2016-10-27

### Fixed
Expand Down
9 changes: 8 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,14 @@ Before issuing a pull request we ask that you squash all your commits into a sin

If you aren't sure how to squash multiple commits into one, Steve Klabnik wrote [a handy guide](http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) that you can refer to.

We keep a [CHANGELOG](CHANGELOG.md) of all software changes with behavioural effects in ponyc. If your PR includes such changes (rather than say a documentation update), please make sure that as part of PR, you have also updated the CHANGELOG. The entries in the CHANGELOG are in time-ascending order, so please add your change description to the bottom of the appropriate section ("Fixed", "Added", or "Changed") of the "unreleased" log.
We keep a [CHANGELOG](CHANGELOG.md) of all software changes with behavioural effects in ponyc. If your PR includes such changes (rather than say a documentation update), a Pony team member will do the following before merging it, so that the PR will be automatically added to the CHANGELOG:

* Ensure that the ticket is tagged with one or more appropriate "changelog - *" labels - each label corresponds to a section of the changelog where this change will be automatically mentioned.
* Ensure that the ticket title is appropriate - the title will be used as the summary of the change, so it should be appropriately formatted, including a ticket reference if the PR is a fix to an existing bug ticket.
* For example, an appropriate title for a PR that fixes a bug reported in issue ticket #98 might look like:
* *Fixed compiler crash related to tuple recovery (issue #98)*

Once those conditions are met, the PR can be merged, and an automated system will immediately add the entry to the changelog. Keeping the changelog entries out of the file changes in the PR helps to avoid conflicts and other administrative headaches when many PRs are in progress.

Documentation Formatting
---------------
Expand Down
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ AR_FLAGS ?= rcs
ALL_CFLAGS = -std=gnu11 -fexceptions \
-DPONY_VERSION=\"$(tag)\" -DLLVM_VERSION=\"$(llvm_version)\" \
-DPONY_COMPILER=\"$(CC)\" -DPONY_ARCH=\"$(arch)\" \
-DBUILD_COMPILER=\"$(compiler_version)\" \
-DPONY_BUILD_CONFIG=\"$(config)\"
ALL_CXXFLAGS = -std=gnu++11 -fno-rtti

Expand Down Expand Up @@ -186,6 +187,10 @@ ifndef LLVM_CONFIG
LLVM_CONFIG = llvm-config-3.6
LLVM_LINK = llvm-link-3.6
LLVM_OPT = opt-3.6
else ifneq (,$(shell which llvm-config39 2> /dev/null))
LLVM_CONFIG = llvm-config39
LLVM_LINK = llvm-link39
LLVM_OPT = opt39
else ifneq (,$(shell which llvm-config38 2> /dev/null))
LLVM_CONFIG = llvm-config38
LLVM_LINK = llvm-link38
Expand Down Expand Up @@ -215,6 +220,17 @@ endif

llvm_version := $(shell $(LLVM_CONFIG) --version)

ifeq ($(llvm_version),3.6.2)
else ifeq ($(llvm_version),3.7.1)
else ifeq ($(llvm_version),3.8.1)
else ifeq ($(llvm_version),3.9.0)
else
$(warning WARNING: Unsupported LLVM version: $(llvm_version))
$(warning Please use LLVM 3.6.2, 3.7.1, 3.8.1, or 3.9.0)
endif

compiler_version := "$(shell $(CC) --version | sed -n 1p)"

ifeq ($(runtime-bitcode),yes)
ifeq (,$(shell $(CC) -v 2>&1 | grep clang))
$(error Compiling the runtime as a bitcode file requires clang)
Expand Down Expand Up @@ -575,7 +591,11 @@ $(foreach target,$(targets),$(eval $(call EXPAND_COMMAND,$(target))))


define EXPAND_INSTALL
ifeq ($(OSTYPE),linux)
install: libponyc libponyrt libponyrt-pic ponyc
else
install: libponyc libponyrt ponyc
endif
@mkdir -p $(destdir)/bin
@mkdir -p $(destdir)/lib
@mkdir -p $(destdir)/include/pony/detail
Expand Down Expand Up @@ -642,6 +662,7 @@ test-examples: all
@rm examples1

test-ci: all
@$(PONY_BUILD_DIR)/ponyc --version
@$(PONY_BUILD_DIR)/libponyc.tests
@$(PONY_BUILD_DIR)/libponyrt.tests
@$(PONY_BUILD_DIR)/ponyc -d -s --verify packages/stdlib
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ If you're using `docker-machine` instead of native docker, make sure you aren't

## Linux using an RPM package (via Bintray)

For Red Hat, CentOS, or Fedora Linux, the `master` and `release` branches are packaged and availabe on Bintray ([pony-language/ponyc-rpm](https://bintray.com/pony-language/ponyc-rpm)).
For Red Hat, CentOS, Oracle Linux, or Fedora Linux, the `master` and `release` branches are packaged and available on Bintray ([pony-language/ponyc-rpm](https://bintray.com/pony-language/ponyc-rpm)).

To install release builds via Yum:
To install release builds via Yum:
```bash
wget https://bintray.com/pony-language/ponyc-rpm/rpm -O bintray-pony-language-ponyc-rpm.repo
sudo mv bintray-pony-language-ponyc-rpm.repo /etc/yum.repos.d/
Expand All @@ -80,7 +80,7 @@ yum install ponyc-master

## Linux using a DEB package (via Bintray)

For Ubuntu or Debian Linux, the `master` and `release` branches are packaged and availabe on Bintray ([pony-language/ponyc-debian](https://bintray.com/pony-language/ponyc-debian)).
For Ubuntu or Debian Linux, the `master` and `release` branches are packaged and available on Bintray ([pony-language/ponyc-debian](https://bintray.com/pony-language/ponyc-debian)).

To install release builds via Apt:

Expand All @@ -98,7 +98,7 @@ sudo apt-get install ponyc-master

## Windows using ZIP (via Bintray)

For Windows, the `master` and `release` branches are packaged and availabe on Bintray ([pony-language/ponyc-win](https://bintray.com/pony-language/ponyc-win)):
For Windows, the `master` and `release` branches are packaged and available on Bintray ([pony-language/ponyc-win](https://bintray.com/pony-language/ponyc-win)):

```powershell
Invoke-WebRequest -Uri https://dl.bintray.com/pony-language/ponyc-win/ponyc-VERSION.zip -UseBasicParsing -OutFile ponyc-VERSION.zip
Expand Down Expand Up @@ -144,7 +144,7 @@ Pony requires one of the following versions of LLVM:
- 3.6.2
- 3.7.1
- 3.8.1
- 3.9.0 (unsupported on OSX at the moment)
- 3.9.0

Compiling Pony is only possible on x86 and ARM (either 32 or 64 bits).

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.0
0.9.0
30 changes: 15 additions & 15 deletions examples/delegates/main.pony
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@ Demonstrate the basic use of delegates in pony
use "time"

trait Wombat
fun box battle_call() : String val =>
fun box battle_call(): String val =>
"Huzzah!"

class SimpleWombat is Wombat

class KungFuWombat is Wombat
fun box battle_call() : String val =>
fun box battle_call(): String val =>
"Bonzai!"

trait Drone
fun box battle_call() : String val =>
fun box battle_call(): String val =>
"Beep Boop!"

class DroneWombat is ( Drone & Wombat)
fun box battle_call() : String val =>
class DroneWombat is (Drone & Wombat)
fun box battle_call(): String val =>
"Beep boop Huzzah!"

actor Main is Wombat
let wombatness : Wombat delegate Wombat
let wombatness: Wombat delegate Wombat

new create(env : Env) =>
new create(env: Env) =>
let x = Time.nanos() % 3

wombatness = match x
| 0 => SimpleWombat
| 1 => DroneWombat
| 2 => KungFuWombat
else
SimpleWombat
end
wombatness =
match x
| 0 => SimpleWombat
| 1 => DroneWombat
| 2 => KungFuWombat
else
SimpleWombat
end

env.out.print("Welcome to Wombat Combat!")
env.out.print("Battle cry: " + this.battle_call())

2 changes: 1 addition & 1 deletion examples/echo/echo.pony
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Listener is TCPListenNotify
_out.print("couldn't listen")
listen.close()

fun ref connected(listen: TCPListener ref) : TCPConnectionNotify iso^ =>
fun ref connected(listen: TCPListener ref): TCPConnectionNotify iso^ =>
Server(_out)

class Server is TCPConnectionNotify
Expand Down
6 changes: 3 additions & 3 deletions examples/lambda/lambda.pony
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ Simple example of creating and calling a lambda function.
actor Main
new create(env: Env) =>
// First let's pass an add function.
let x = f(lambda(a: U32, b: U32): U32 => a + b end, 6)
let x = f({(a: U32, b: U32): U32 => a + b }, 6)
env.out.print("Add: " + x.string())

// Now a multiply.
let y = f(lambda(a: U32, b: U32): U32 => a * b end, 6)
let y = f({(a: U32, b: U32): U32 => a * b }, 6)
env.out.print("Mult: " + y.string())

// And finally a lambda that raises an error.
let z = f(lambda(a: U32, b: U32): U32 ? => error end, 6)
let z = f({(a: U32, b: U32): U32 ? => error }, 6)
env.out.print("Error: " + z.string())

fun f(fn: {(U32, U32): U32 ?} val, x: U32): U32 =>
Expand Down
4 changes: 2 additions & 2 deletions examples/mixed/main.pony
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ actor Worker
false
end

fun ref factorize(bigint: U64) : Array[U64] =>
fun ref factorize(bigint: U64): Array[U64] =>
var factors = Array[U64](2)

if bigint <= 3 then
Expand Down Expand Up @@ -81,7 +81,7 @@ actor Ring
Worker(_env)
end

fun tag spawn_ring(env: Env, size: U32, pass': U32) : Ring =>
fun tag spawn_ring(env: Env, size: U32, pass': U32): Ring =>
var next: Ring = this

for i in Range[U32](0, size) do
Expand Down
2 changes: 0 additions & 2 deletions examples/producer-consumer/consumer.pony
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ actor Consumer
be consuming(product: Product) =>
_out.print("**Consumer** Consuming product " + product.id.string())
_quantity_to_consume = _quantity_to_consume -1


Loading

0 comments on commit 5a0bd57

Please sign in to comment.