Skip to content

Commit

Permalink
Merge branch 'release-0.8.0' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTAllen committed Oct 27, 2016
2 parents 4986123 + 2612d73 commit cc187c6
Show file tree
Hide file tree
Showing 21 changed files with 447 additions and 199 deletions.
6 changes: 3 additions & 3 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ branches:
environment:
matrix:
- llvm: 3.9.0
- llvm: 3.8.0
- llvm: 3.8.1
- llvm: 3.7.1

configuration:
Expand Down Expand Up @@ -129,10 +129,10 @@ test_script:
- C:\projects\ponyc\build\%CONFIGURATION%\testrt.exe
- CALL "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\amd64\\vcvars64.bat"
- C:\projects\ponyc\build\%CONFIGURATION%\ponyc.exe -V 3 -o C:\projects\ponyc\ -d -s --verify packages/stdlib
- stdlib.exe
- stdlib.exe --sequential
- del stdlib.exe
- C:\projects\ponyc\build\%CONFIGURATION%\ponyc.exe -V 3 -o C:\projects\ponyc\ --verify packages/stdlib
- stdlib.exe
- stdlib.exe --sequential
- del stdlib.exe
- C:\projects\ponyc\build\%CONFIGURATION%\ponyc.exe -V 3 -o C:\projects\ponyc\ -d -s --verify examples
- examples.exe
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ matrix:
packages:
- g++-5
env:
- LLVM_VERSION="3.8.0"
- LLVM_VERSION="3.8.1"
- LLVM_CONFIG="llvm-config-3.8"
- config=debug
- CC1=gcc-5
Expand All @@ -83,7 +83,7 @@ matrix:
packages:
- g++-5
env:
- LLVM_VERSION="3.8.0"
- LLVM_VERSION="3.8.1"
- LLVM_CONFIG="llvm-config-3.8"
- config=release
- CC1=gcc-5
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

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.8.0] - 2016-10-27

### Fixed

- Link the correct version of `libponyrt` when compiling with `--pic` on Linux (issue #1359)

### Added

- Runtime function `pony_send_next`. This function can help optimise some message sending scenarios.
- Floating point `min_normalised`. The function returns the smallest normalised positive number, as `min_value` used to do (issue #1351)

### Changed

- Floating point `min_value` now returns the smallest negative number instead of the smallest normalised positive number (issue #1351)

## [0.7.0] - 2016-10-22

### Fixed
Expand Down
15 changes: 10 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
FROM ubuntu:16.04

RUN apt-get update \
&& apt-get install -y make g++ git \
&& apt-get install -y make g++ git wget xz-utils \
zlib1g-dev libncurses5-dev libssl-dev \
llvm-dev libpcre2-dev \
&& rm -rf /var/lib/apt/lists/*
libpcre2-dev \
&& rm -rf /var/lib/apt/lists/* \
&& wget http://llvm.org/releases/3.9.0/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz \
&& tar xf clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz \
&& cp -r clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04/* /usr/local \
&& rm -rf /clang*

WORKDIR /src/ponyc
COPY Makefile LICENSE VERSION /src/ponyc/
Expand All @@ -13,10 +17,11 @@ COPY lib /src/ponyc/lib
COPY test /src/ponyc/test
COPY packages /src/ponyc/packages

RUN make config=release install \
RUN make \
&& make install \
&& rm -rf /src/ponyc/build

RUN mkdir /src/main
WORKDIR /src/main
WORKDIR /src/main

CMD ponyc
23 changes: 19 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,9 @@ install: libponyc libponyrt ponyc
@mkdir -p $(destdir)/lib
@mkdir -p $(destdir)/include/pony/detail
$(SILENT)cp $(PONY_BUILD_DIR)/libponyrt.a $(destdir)/lib
ifeq ($(OSTYPE),linux)
$(SILENT)cp $(PONY_BUILD_DIR)/libponyrt-pic.a $(destdir)/lib
endif
ifneq ($(wildcard $(PONY_BUILD_DIR)/libponyrt.bc),)
$(SILENT)cp $(PONY_BUILD_DIR)/libponyrt.bc $(destdir)/lib
endif
Expand All @@ -594,6 +597,9 @@ ifeq ($$(symlink),yes)
@mkdir -p $(prefix)/include/pony/detail
$(SILENT)ln $(symlink.flags) $(destdir)/bin/ponyc $(prefix)/bin/ponyc
$(SILENT)ln $(symlink.flags) $(destdir)/lib/libponyrt.a $(prefix)/lib/libponyrt.a
ifeq ($(OSTYPE),linux)
$(SILENT)ln $(symlink.flags) $(destdir)/lib/libponyrt-pic.a $(prefix)/lib/libponyrt-pic.a
endif
ifneq ($(wildcard $(destdir)/lib/libponyrt.bc),)
$(SILENT)ln $(symlink.flags) $(destdir)/lib/libponyrt.bc $(prefix)/lib/libponyrt.bc
endif
Expand All @@ -610,6 +616,9 @@ uninstall:
-$(SILENT)rm -rf $(destdir) 2>/dev/null ||:
-$(SILENT)rm $(prefix)/bin/ponyc 2>/dev/null ||:
-$(SILENT)rm $(prefix)/lib/libponyrt.a 2>/dev/null ||:
ifeq ($(OSTYPE),linux)
-$(SILENT)rm $(prefix)/lib/libponyrt-pic.a 2>/dev/null ||:
endif
ifneq ($(wildcard $(prefix)/lib/libponyrt.bc),)
-$(SILENT)rm $(prefix)/lib/libponyrt.bc 2>/dev/null ||:
endif
Expand All @@ -624,7 +633,7 @@ test: all
@$(PONY_BUILD_DIR)/libponyc.tests
@$(PONY_BUILD_DIR)/libponyrt.tests
@$(PONY_BUILD_DIR)/ponyc -d -s --verify packages/stdlib
@./stdlib
@./stdlib --sequential
@rm stdlib

test-examples: all
Expand All @@ -636,10 +645,10 @@ test-ci: all
@$(PONY_BUILD_DIR)/libponyc.tests
@$(PONY_BUILD_DIR)/libponyrt.tests
@$(PONY_BUILD_DIR)/ponyc -d -s --verify packages/stdlib
@./stdlib
@./stdlib --sequential
@rm stdlib
@$(PONY_BUILD_DIR)/ponyc --verify packages/stdlib
@./stdlib
@./stdlib --sequential
@rm stdlib
@PONYPATH=. $(PONY_BUILD_DIR)/ponyc -d -s examples
@./examples1
Expand All @@ -661,13 +670,19 @@ deploy: test
@mkdir -p $(package)/usr/lib/pony/$(package_version)/lib
$(SILENT)cp build/release/libponyc.a $(package)/usr/lib/pony/$(package_version)/lib
$(SILENT)cp build/release/libponyrt.a $(package)/usr/lib/pony/$(package_version)/lib
ifeq ($(OSTYPE),linux)
$(SILENT)cp build/release/libponyrt-pic.a $(package)/usr/lib/pony/$(package_version)/lib
endif
ifneq ($(wildcard build/release/libponyrt.bc),)
$(SILENT)cp build/release/libponyrt.bc $(package)/usr/lib/pony/$(package_version)/lib
endif
$(SILENT)cp build/release/ponyc $(package)/usr/lib/pony/$(package_version)/bin
$(SILENT)cp src/libponyrt/pony.h $(package)/usr/lib/pony/$(package_version)/include
$(SILENT)cp src/common/pony/detail/atomics.h $(package)/usr/lib/pony/$(package_version)/include/pony/detail
$(SILENT)ln -s /usr/lib/pony/$(package_version)/lib/libponyrt.a $(package)/usr/lib/libponyrt.a
ifeq ($(OSTYPE),linux)
$(SILENT)ln -s /usr/lib/pony/$(package_version)/lib/libponyrt-pic.a $(package)/usr/lib/libponyrt-pic.a
endif
ifneq ($(wildcard /usr/lib/pony/$(package_version)/lib/libponyrt.bc),)
$(SILENT)ln -s /usr/lib/pony/$(package_version)/lib/libponyrt.bc $(package)/usr/lib/libponyrt.bc
endif
Expand Down Expand Up @@ -704,7 +719,7 @@ stats:

clean:
@rm -rf $(PONY_BUILD_DIR)
@rm src/common/dtrace_probes.h
@rm -f src/common/dtrace_probes.h
-@rmdir build 2>/dev/null ||:
@echo 'Repository cleaned ($(PONY_BUILD_DIR)).'

Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ Or, for master builds:
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)).
Expand All @@ -97,7 +96,6 @@ Or, for master builds:
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)):
Expand Down Expand Up @@ -390,13 +388,16 @@ $ make LTO_PLUGIN=/usr/lib/LLVMgold.so

Refer to your compiler documentation for the plugin to use in your case.


## VirtualBox

Pony binaries can trigger illegal instruction errors under VirtualBox 4.x, for at least the x86_64 platform and possibly others.

Use VirtualBox 5.x to avoid possible problems.

## AVX2 Support

The Pony prebuilt binaries trigger illegal instruction errors under CPUs without [AVX2](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#Advanced_Vector_Extensions_2) support.

## Building Pony on Non-x86 platforms

On ARM platforms, the default gcc architecture specification used in the Makefile of _native_ does not work correctly, and can even result in the gcc compiler crashing. You will have to override the compiler architecture specification on the _make_ command line. For example, on a RaspberryPi2 you would say:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.0
0.8.0
24 changes: 18 additions & 6 deletions packages/builtin/float.pony
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,23 @@ primitive F32 is FloatingPoint[F32]

new min_value() =>
"""
Minimum positive value representable at full precision (ie a normalised
number).
Minimum negative value representable.
"""
from_bits(0x00800000)
from_bits(0xFF7FFFFF)

new max_value() =>
"""
Maximum positive value representable.
"""
from_bits(0x7F7FFFFF)

new min_normalised() =>
"""
Minimum positive value representable at full precision (ie a normalised
number).
"""
from_bits(0x00800000)

new epsilon() =>
"""
Minimum positive value such that (1 + epsilon) != 1.
Expand Down Expand Up @@ -173,17 +179,23 @@ primitive F64 is FloatingPoint[F64]

new min_value() =>
"""
Minimum positive value representable at full precision (ie a normalised
number).
Minimum negative value representable.
"""
from_bits(0x0010_0000_0000_0000)
from_bits(0xFFEF_FFFF_FFFF_FFFF)

new max_value() =>
"""
Maximum positive value representable.
"""
from_bits(0x7FEF_FFFF_FFFF_FFFF)

new min_normalised() =>
"""
Minimum positive value representable at full precision (ie a normalised
number).
"""
from_bits(0x0010_0000_0000_0000)

new epsilon() =>
"""
Minimum positive value such that (1 + epsilon) != 1.
Expand Down
1 change: 1 addition & 0 deletions packages/builtin/real.pony
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ trait val _UnsignedInteger[A: _UnsignedInteger[A] val] is Integer[A]
_ToString._u64(u64(), false)

trait val FloatingPoint[A: FloatingPoint[A] val] is Real[A]
new val min_normalised()
new val epsilon()
fun tag radix(): U8
fun tag precision2(): U8
Expand Down
10 changes: 5 additions & 5 deletions packages/collections/map.pony
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,19 @@ class HashMap[K, V, H: HashFunction[K] val]
using the provided function. If the provided key has not been added to
the map yet, it sets its value to the provided value.
As a simple example, say we had a map with U64 values and we wanted to
As a simple example, say we had a map with I64 values and we wanted to
add 4 to the current value for key "test", which let's say is currently 2.
We call
m.upsert("test", 4, lambda(x: U64, y: U64): U64 => x + y end)
m.upsert("test", 4, lambda(x: I64, y: I64): I64 => x - y end)
This changes the value associated with "test" to 6.
This changes the value associated with "test" to -2.
If we have not yet added the key "new-key" to the map and we call
m.upsert("new-key", 4, lambda(x: U64, y: U64): U64 => x + y end)
m.upsert("new-key", 4, lambda(x: I64, y: I64): I64 => x - y end)
then "new-key" is added to the map with a value of 4.
then "new-key" is added to the map with a value of -4.
Returns the value that we set the key to
"""
Expand Down
Loading

0 comments on commit cc187c6

Please sign in to comment.