Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
Simn committed Dec 24, 2016
2 parents ebc0572 + 783001f commit 6e3d9dc
Show file tree
Hide file tree
Showing 923 changed files with 24,061 additions and 1,057 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
/tests/unit/node_modules/

/haxe.sublime*
.idea
build.bat
/.vscode
tests/unit/compile.php.hxml
Expand All @@ -73,6 +74,7 @@ tests/unit/unit.py
tests/unit/unit.py.res1.txt
tests/unit/unit.py.res2.bin
tests/sys/bin/
/tests/sys/dump/
tests/optimization/dump/
tests/misc/projects/*/*.n
tests/unit/bin/
Expand All @@ -88,4 +90,6 @@ tests/misc/projects/Issue4070/cpp/
/tests/misc/eventLoop/dump
/tests/misc/eventLoop/eventLoop.py
/tests/misc/eventLoop/php
*.vscode/
*.vscode/

/tests/sys/temp
18 changes: 17 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ addons: &addons

install_linux: &install_linux
# Install neko and haxe dependencies
- sudo add-apt-repository ppa:haxe/ocaml -y
- sudo apt-get update
- sudo apt-get install -y
ocaml
ocaml-native-compilers
camlp4
pkg-config
Expand All @@ -49,10 +52,13 @@ install_linux: &install_linux
- sudo make install
- popd
# Setup database
- travis_retry sudo apt-get install mysql-server -y
- travis_retry sudo apt-get install mysql-server-5.6 -y
- mysql -u root -e "create user travis@localhost identified by '';"
- mysql -u root -e "create database haxe_test;"
- mysql -u root -e "grant all on haxe_test.* to travis@localhost;"
# Setup JDK
- jdk_switcher use oraclejdk7
- java -version
# Build haxe
- make package_src -s
- make -s
Expand Down Expand Up @@ -128,6 +134,15 @@ matrix:
g++-multilib
install: *install_linux

- os: linux
env:
- TEST=php7
before_install:
- phpenv global "7.0"
# - sudo apt-get install php7-cli php7-mysql php7-sqlite -y || (sudo add-apt-repository ppa:ondrej/php -y && sudo apt-get update -y && sudo apt-get install php7.0-cli php7.0-mysql php7.0-sqlite -y)
- php -v || true
install: *install_linux

#######
# osx #
#######
Expand All @@ -146,6 +161,7 @@ script:
- eval `ssh-agent -s` # for deployment to haxe.org
- pushd tests
- mkdir ~/haxelib && haxelib setup ~/haxelib
- haxelib install record-macros
- haxe -version
- haxe RunCi.hxml
- neko RunCi.n
Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ MODULES=json version globals path context/meta syntax/ast display/displayTypes t
syntax/lexer context/common generators/genxml \
syntax/parser typing/abstract typing/typecore display/display optimization/optimizerTexpr \
optimization/optimizer typing/overloads typing/typeload generators/codegen generators/gencommon generators/genas3 \
generators/gencpp generators/genjs generators/genneko generators/genphp generators/genswf9 \
generators/gencpp generators/genjs generators/genneko generators/genphp generators/genphp7 generators/genswf9 \
generators/genswf generators/genjava generators/gencs generators/genpy macro/macroApi macro/interp generators/hlcode generators/hlopt generators/hlinterp generators/hl2c \
generators/genlua \
optimization/dce optimization/analyzerConfig optimization/analyzerTypes optimization/analyzerTexpr \
Expand Down Expand Up @@ -134,7 +134,7 @@ uninstall:
else \
rm -rf $(INSTALL_LIB_DIR); \
fi


# Modules

Expand Down Expand Up @@ -180,6 +180,8 @@ src/generators/genswf.$(MODULE_EXT): src/globals.$(MODULE_EXT) src/typing/type.$

src/generators/hlinterp.$(MODULE_EXT): src/context/common.$(MODULE_EXT) src/generators/hlcode.$(MODULE_EXT) src/macro/interp.$(MODULE_EXT) src/generators/hlopt.$(MODULE_EXT) src/macro/macroApi.$(MODULE_EXT)

src/generators/genphp7.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/path.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT)

src/generators/hl2c.$(MODULE_EXT): src/generators/hlcode.$(MODULE_EXT)

src/generators/hlopt.$(MODULE_EXT): src/generators/hlcode.$(MODULE_EXT)
Expand Down Expand Up @@ -249,7 +251,7 @@ src/typing/typer.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/context/me

# main

src/main.$(MODULE_EXT): src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/typing/error.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/path.$(MODULE_EXT) src/optimization/filters.$(MODULE_EXT) src/typing/matcher.$(MODULE_EXT) src/typing/typer.$(MODULE_EXT) src/typing/typeload.$(MODULE_EXT) src/typing/typecore.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/parser.$(MODULE_EXT) src/optimization/optimizer.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/macro/interp.$(MODULE_EXT) src/generators/genxml.$(MODULE_EXT) src/generators/genswf.$(MODULE_EXT) src/generators/genphp.$(MODULE_EXT) src/generators/genneko.$(MODULE_EXT) src/generators/genjs.$(MODULE_EXT) src/generators/genlua.$(MODULE_EXT) src/generators/gencpp.$(MODULE_EXT) src/generators/genas3.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/generators/genjava.$(MODULE_EXT) src/generators/gencs.$(MODULE_EXT) src/generators/genpy.$(MODULE_EXT) src/generators/genhl.$(MODULE_EXT) src/display/display.$(MODULE_EXT) src/server.$(MODULE_EXT) src/display/displayOutput.$(MODULE_EXT) libs/ilib/il.$(LIB_EXT)
src/main.$(MODULE_EXT): src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/typing/error.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/path.$(MODULE_EXT) src/optimization/filters.$(MODULE_EXT) src/typing/matcher.$(MODULE_EXT) src/typing/typer.$(MODULE_EXT) src/typing/typeload.$(MODULE_EXT) src/typing/typecore.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/parser.$(MODULE_EXT) src/optimization/optimizer.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/macro/interp.$(MODULE_EXT) src/generators/genxml.$(MODULE_EXT) src/generators/genswf.$(MODULE_EXT) src/generators/genphp.$(MODULE_EXT) src/generators/genphp7.$(MODULE_EXT) src/generators/genneko.$(MODULE_EXT) src/generators/genjs.$(MODULE_EXT) src/generators/genlua.$(MODULE_EXT) src/generators/gencpp.$(MODULE_EXT) src/generators/genas3.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/generators/genjava.$(MODULE_EXT) src/generators/gencs.$(MODULE_EXT) src/generators/genpy.$(MODULE_EXT) src/generators/genhl.$(MODULE_EXT) src/display/display.$(MODULE_EXT) src/server.$(MODULE_EXT) src/display/displayOutput.$(MODULE_EXT) libs/ilib/il.$(LIB_EXT)

src/globals.$(MODULE_EXT): src/version.$(MODULE_EXT)

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ For the complete Haxe licenses, please see https://haxe.org/foundation/open-sour

## Installing Haxe

The latest stable release is [Haxe 3.4.0-rc.1](https://haxe.org/download/version/3.4.0-rc.1/). Pre-built binaries are available for your platform:
The latest stable release is [Haxe 3.4.0-rc.2](https://haxe.org/download/version/3.4.0-rc.2/). Pre-built binaries are available for your platform:

* **[Windows installer](https://haxe.org/download/file/3.4.0-rc.1/haxe-3.4.0-rc.1-win.exe)**
* **[Windows binaries](https://haxe.org/download/file/3.4.0-rc.1/haxe-3.4.0-rc.1-win.zip)**
* **[OSX installer](https://haxe.org/download/file/3.4.0-rc.1/haxe-3.4.0-rc.1-osx-installer.pkg)**
* **[OSX binaries](https://haxe.org/download/file/3.4.0-rc.1/haxe-3.4.0-rc.1-osx.tar.gz)**
* **[Windows installer](https://haxe.org/download/file/3.4.0-rc.2/haxe-3.4.0-rc.2-win.exe)**
* **[Windows binaries](https://haxe.org/download/file/3.4.0-rc.2/haxe-3.4.0-rc.2-win.zip)**
* **[OSX installer](https://haxe.org/download/file/3.4.0-rc.2/haxe-3.4.0-rc.2-osx-installer.pkg)**
* **[OSX binaries](https://haxe.org/download/file/3.4.0-rc.2/haxe-3.4.0-rc.2-osx.tar.gz)**
* **[Linux Software Packages](https://haxe.org/download/linux)**
* **[Linux 32-bit binaries](https://haxe.org/download/file/3.4.0-rc.1/haxe-3.4.0-rc.1-linux32.tar.gz)**
* **[Linux 64-bit binaries](https://haxe.org/download/file/3.4.0-rc.1/haxe-3.4.0-rc.1-linux64.tar.gz)**
* **[Linux 32-bit binaries](https://haxe.org/download/file/3.4.0-rc.2/haxe-3.4.0-rc.2-linux32.tar.gz)**
* **[Linux 64-bit binaries](https://haxe.org/download/file/3.4.0-rc.2/haxe-3.4.0-rc.2-linux64.tar.gz)**

Automated development builds are available from [build.haxe.org](http://build.haxe.org).

Expand Down
6 changes: 5 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ environment:
MYSQL_USER: root
MYSQL_PASSWORD: Password12!
matrix:
- TEST: "neko,python,cs,java,macro"
- TEST: "neko,python,cs,java,macro,php7"
- TEST: "cpp"

services:
Expand All @@ -36,6 +36,10 @@ install:
- '%CYG_ROOT%/bin/bash -lc "opam install camlp4 --yes"'
# Install neko
- choco install neko --prerelease --ignore-dependencies -s 'https://ci.appveyor.com/nuget/neko' -y
- choco install php --ignore-dependencies
- echo extension=php_mysqli.dll >> C:\tools\php\php.ini
- echo extension=php_sqlite3.dll >> C:\tools\php\php.ini
- echo extension=php_openssl.dll >> C:\tools\php\php.ini
- RefreshEnv
# do not use chocolatey's shim, which is buggy when processing arguments
# see https://github.com/chocolatey/shimgen/issues/27
Expand Down
34 changes: 34 additions & 0 deletions extra/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
2016-12-24: 3.4.0-RC2

New features:

js : added API documentation to HTML externs (#5868)
php : added php7 target, enabled with -D php7

Bugfixes:

all : fixed top-down inference infinite recursion issue (#5848)
all : fixed regression in Compiler.include (#5847)
all : fixed Not_found exception related to try/catch (#5851)
all : fixed metadata completion showing up in trace arguments (#5775)
all : fixed problem with useless pattern detection (#5873)
all : fixed issue with toString handling in trace arguments (#5858)
all : fixed inline constructor scoping (#5855)
cpp : fixed issue with cpp.Pointer variables being eliminated (#5850)
js : added Notification API to HTML externs (#5852)
js : fixed several options structures in HTML externs (#5849)
php/cs : FileSystem.deleteFile() and FileSystem.deleteDirectory() now throw on non-existent path (#5742)
php/lua : fixed field access on `null` (#4988)
php : fixed static field access on a `Class<T>` stored to a field (#5383)
php : fixed invalid detection of `NativeArray` by `Std.is()` (#5565)
php : fixed `stdin()`, `stdout()`, `stderr()` of `Sys` to use predefined constants for corresponding channels (#5733)
php : fixed Std.parseInt() on hexstrings for PHP7+ (#5521)
php : fixed typed cast in assign operations (#5135)
php : fixed exception thrown by `Reflect.fields(o)` when `o` is `Class<T>` (#5608)
php : fixed json encoding of empty objects (#5015)
php : fixed checking floats for equality (#4260)
php : throw if invalid json string supplied to Json.parse() (#4592)
php : fixed ssl connections (#4581)
php : fixed writing bytes containing zero byte to MySQL & SQLite (#4489)
php : fixed call()() cases for PHP5 (#5569)

2016-11-29: 3.4.0-RC1

New features:
Expand Down
9 changes: 7 additions & 2 deletions extra/ImportAll.hx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ class ImportAll {
haxe.macro.Compiler.define("doc_gen");
}
switch( pack ) {
case "php7":
if( !Context.defined("php7") ) return;
case "php":
if( !Context.defined("php") ) return;
if( !Context.defined("php") || Context.defined("php7") ) return;
case "neko":
if( !Context.defined("neko") ) return;
case "js":
Expand Down Expand Up @@ -71,7 +73,7 @@ class ImportAll {
if( file == ".svn" || file == "_std" )
continue;
var full = (pack == "") ? file : pack + "." + file;
if( StringTools.endsWith(file, ".hx") && file.indexOf(".") < 0 ) {
if( StringTools.endsWith(file, ".hx") && file.substr(0, file.length - 3).indexOf(".") < 0 ) {
var cl = full.substr(0, full.length - 3);
switch( cl ) {
case "ImportAll", "neko.db.MacroManager": continue;
Expand All @@ -83,6 +85,9 @@ class ImportAll {
case "haxe.remoting.SyncSocketConnection": if( !(Context.defined("neko") || Context.defined("php") || Context.defined("cpp")) ) continue;
case "sys.db.Sqlite" | "sys.db.Mysql" | "cs.db.AdoNet": continue;
}
if( Context.defined("php7") && cl.indexOf("php7.") == 0 ) {
cl = "php." + cl.substr("php7.".length);
}
Context.getModule(cl);
} else if( sys.FileSystem.isDirectory(p + "/" + file) )
run(full);
Expand Down
6 changes: 6 additions & 0 deletions extra/all.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@

--next

-D php7
-php all_php7
-xml php7.xml

--next

-php all_php
-xml php.xml

Expand Down
9 changes: 4 additions & 5 deletions extra/release-checklist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@

# Making the release

- Copy relevant changelog part to CHANGES.md.
- Copy relevant changelog part to downloads/$version/CHANGES.md.
- Write announcement post.
- Copy announcement post to RELEASE.md.
- Update versions.json
- Push the generated binaries and installers to haxe.org.
- Copy announcement post to downloads/$version/RELEASE.md.
- Update downloads/versions.json
- Push the generated binaries and installers to haxe.org, requires git-lfs

# Announcing the release

- Regenerate and upload API documentation (check --title and -D version values).
- Update http://haxe.org/file/CHANGES.txt
- Post announcement post to haxelang.
4 changes: 4 additions & 0 deletions haxe.hxproj
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,10 @@
<hidden path="src\macro\macroApi.cmt" />
<hidden path="src\macro\macroApi.cmx" />
<hidden path="src\macro\macroApi.o" />
<hidden path="src\generators\genphp7.cmi" />
<hidden path="src\generators\genphp7.cmt" />
<hidden path="src\generators\genphp7.cmx" />
<hidden path="src\generators\genphp7.o" />
</hiddenPaths>
<!-- Executed before build -->
<preBuildCommand>make -j4 FD_OUTPUT=1 -f Makefile.win kill haxe</preBuildCommand>
Expand Down
19 changes: 14 additions & 5 deletions src/context/common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ open Globals

type package_rule =
| Forbidden
| Directory of string
| Remap of string

type pos = Globals.pos
Expand Down Expand Up @@ -315,6 +316,8 @@ let get_signature com =
com.defines_signature <- Some s;
s

let php7 com = com.platform = Php && PMap.exists "php7" com.defines

module CompilationServer = struct
type cache = {
c_haxelib : (string list, string list) Hashtbl.t;
Expand Down Expand Up @@ -704,11 +707,17 @@ let get_config com =
pf_reserved_type_paths = [([],"Object");([],"Error")];
}
| Php ->
{
default_config with
pf_static = false;
pf_pad_nulls = true;
}
if php7 com then
{
default_config with
pf_static = false;
}
else
{
default_config with
pf_static = false;
pf_pad_nulls = true;
}
| Cpp ->
{
default_config with
Expand Down
6 changes: 5 additions & 1 deletion src/context/meta.ml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ type strict_meta =
| Overload
| PhpConstants
| PhpGlobal
| PhpClassConst
| PhpMagic
| PrivateAccess
| Property
| Protected
Expand Down Expand Up @@ -307,7 +309,9 @@ let get_info = function
| Optional -> ":optional",("Marks the field of a structure as optional",[UsedOn TClassField])
| Overload -> ":overload",("Allows the field to be called with different argument types",[HasParam "Function specification (no expression)";UsedOn TClassField])
| PhpConstants -> ":phpConstants",("Marks the static fields of a class as PHP constants, without $",[Platform Php;UsedOn TClass])
| PhpGlobal -> ":phpGlobal",("Puts the static fields of a class in the global PHP namespace",[Platform Php;UsedOn TClass])
| PhpGlobal -> ":phpGlobal",("(php7) Puts the static fields of a class in the global PHP namespace",[Platforms [Php;Php];UsedOn TClass])
| PhpClassConst -> ":phpClassConst",("(php7) Generate static var of an extern class as a PHP class constant",[Platform Php;UsedOn TClass])
| PhpMagic -> ":phpMagic",("(php7) Treat annotated field as special PHP magic field",[Platform Php;UsedOn TClassField])
| Public -> ":public",("Marks a class field as being public",[UsedOn TClassField;UsedInternally])
| PublicFields -> ":publicFields",("Forces all class fields of inheriting classes to be public",[UsedOn TClass])
| QuotedField -> ":quotedField",("Used internally to mark structure fields which are quoted in syntax",[UsedInternally])
Expand Down
2 changes: 2 additions & 0 deletions src/display/displayOutput.ml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ module TypePathHandler = struct
| x :: l ->
(try
match PMap.find x com.package_rules with
| Directory d -> d :: l
| Remap s -> s :: l
| _ -> p
with
Expand All @@ -267,6 +268,7 @@ module TypePathHandler = struct
match PMap.find f com.package_rules with
| Forbidden -> ()
| Remap f -> packages := f :: !packages
| Directory _ -> raise Not_found
with Not_found ->
packages := f :: !packages
else
Expand Down
Loading

0 comments on commit 6e3d9dc

Please sign in to comment.