Created
October 6, 2015 11:58
-
-
Save clemos/fc48d8076d936531a386 to your computer and use it in GitHub Desktop.
Haxe/PHP bits issue
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
// PHP | |
Test.hx:6: 200015 | |
Test.hx:7: 200015 | |
Test.hx:10: -1 | |
Test.hx:11: -1 | |
Test.hx:14: 0 | |
Test.hx:17: 0 | |
// CPP | |
haxelib run hxcpp Build.xml haxe -Dhaxe3="1" -Dhaxe_ver="3.3" -Dhxcpp_api_level="321" -Dsource-header="Generated by Haxe" -I"" -I"/opt/haxe/std/cpp/_std/" -I"/opt/haxe/std/" | |
Test.hx:6: -1 | |
Test.hx:7: -1 | |
Test.hx:10: -1 | |
Test.hx:11: -1 | |
Test.hx:14: -1072787802 | |
Test.hx:17: -1072787802 | |
// JS (node) | |
-1 | |
-1 | |
-1 | |
-1 | |
3222179494 | |
3222179494 | |
// Neko | |
Test.hx:6: -1 | |
Test.hx:7: -1 | |
Test.hx:10: -1 | |
Test.hx:11: -1 | |
Test.hx:14: -1072787802 | |
Test.hx:17: -1072787802 |
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
import haxe.Int32; | |
class Test { | |
static function main() { | |
// taken from https://github.com/HaxeFoundation/haxe/blob/development/tests/unit/src/unit/issues/Issue3414.hx.disabled | |
var x = 200015; | |
trace((((x << 28)) >> 28)); | |
trace(((x << 28) & 0xffffffff) >> 28); | |
var x32 : Int32 = 200015; | |
trace((((x32 << 28)) >> 28)); | |
trace(((x32 << 28) & 0xffffffff) >> 28); | |
var y = -1072787802; | |
trace( y >>> 0 ); | |
var y32 : Int32 = -1072787802; | |
trace( y >>> 0 ); | |
} | |
} |
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
-main Test | |
-php test.php | |
-cmd php test.php/index.php | |
--next | |
-main Test | |
-cpp test.cpp | |
-cmd test.cpp/Test | |
--next | |
-main Test | |
-js test.js | |
-cmd node test.js | |
--next | |
-main Test | |
-neko test.n | |
-cmd neko test.n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment