-
-
Notifications
You must be signed in to change notification settings - Fork 653
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #3705 closes #3938 closes #3956 closes #4004 closes #4239 closes #4241 closes #4265 closes #4399 closes #4456 closes #4563 closes #4727 closes #4731
- Loading branch information
Showing
24 changed files
with
2,187 additions
and
1,601 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class Main { | ||
static function main() { | ||
var i = getInt(); | ||
call(i++, i > 0 ? { call(0, 0); 1; } : 1); | ||
} | ||
|
||
static function getInt() { return 0; } | ||
|
||
static function call(a:Int, b:Int) { Sys.stderr().writeString(a + " " + b + "\n"); } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-main Main | ||
-D analyzer | ||
-x neko.n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
0 0 | ||
0 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class Main { | ||
static function main() { | ||
var c = Std.int(Math.random() - 0.5); //0 | ||
|
||
Sys.stderr().writeString(switch (c) { | ||
case 1: '1'; | ||
default: 'analyzer removed this '; | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-main Main | ||
-D analyzer | ||
-x neko.n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
analyzer removed this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class Main { | ||
static function main() { | ||
Sys.stderr().writeString("" + foo(2)); | ||
} | ||
|
||
static var array:Array<Int> = [1,2,3,4,5]; | ||
|
||
static function foo(value:Int):Int { | ||
var i:Int = 0; | ||
var m:Int = 0; | ||
while(i < array.length) { | ||
if(array[i] == value) { | ||
m = i; | ||
} | ||
++i; | ||
} | ||
return m; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-main Main | ||
-D analyzer | ||
-x neko.n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
class A { | ||
public function f():Array<A> { | ||
return []; | ||
} | ||
|
||
public function f2():A { | ||
return this; | ||
} | ||
} | ||
|
||
@:generic | ||
class B<T:{function new():Void;}> { | ||
var items:Map<Int,A>; | ||
|
||
public function new() { | ||
items = new Map(); | ||
} | ||
|
||
public function f():Array<A> { | ||
var a = []; | ||
for (node in items) | ||
a = a.concat(node.f()); | ||
return a; | ||
} | ||
} | ||
|
||
class Main { | ||
static function main() { | ||
var b = new B<Main>(); | ||
Sys.stderr().writeString("" + b.f()); | ||
} | ||
|
||
public function new() { } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-main Main | ||
-D analyzer | ||
-x neko.n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class Main { | ||
static function main() { | ||
Sys.stderr().writeString("" + test(get(true))); | ||
Sys.stderr().writeString("" + test(get(false))); | ||
} | ||
|
||
static function get(b:Bool) return b; | ||
|
||
static inline function test(a:Bool):Int { | ||
if (a) | ||
return 42; | ||
else | ||
return 43; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-main Main | ||
-D analyzer | ||
-x neko.n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
4243 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
d57112a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected. Merry Christmas!
d57112a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Merry Christmas!
d57112a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Simn Wow it's very impressive. Is there any notation like C "volatile" to impeach a variable optimisation, ? An example use case is for Shared memories.
d57112a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh my god... Simply wow!
d57112a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot simon!!! :)