StdTypes.hx 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Copyright (C)2005-2017 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. package java;
  23. @:notNull @:runtimeValue @:coreType extern abstract Int8 from Int {}
  24. @:notNull @:runtimeValue @:coreType extern abstract Int16 from Int {}
  25. @:notNull @:runtimeValue @:coreType extern abstract Char16 from Int {}
  26. @:notNull @:runtimeValue @:coreType extern abstract Int64 from Int from Float
  27. {
  28. @:op(A+B) public static function addI(lhs:Int64, rhs:Int):Int64;
  29. @:op(A+B) public static function add(lhs:Int64, rhs:Int64):Int64;
  30. @:op(A*B) public static function mulI(lhs:Int64, rhs:Int):Int64;
  31. @:op(A*B) public static function mul(lhs:Int64, rhs:Int64):Int64;
  32. @:op(A%B) public static function modI(lhs:Int64, rhs:Int):Int64;
  33. @:op(A%B) public static function mod(lhs:Int64, rhs:Int64):Int64;
  34. @:op(A-B) public static function subI(lhs:Int64, rhs:Int):Int64;
  35. @:op(A-B) public static function sub(lhs:Int64, rhs:Int64):Int64;
  36. @:op(A/B) public static function divI(lhs:Int64, rhs:Int):Int64;
  37. @:op(A/B) public static function div(lhs:Int64, rhs:Int64):Int64;
  38. @:op(A|B) public static function orI(lhs:Int64, rhs:Int):Int64;
  39. @:op(A|B) public static function or(lhs:Int64, rhs:Int64):Int64;
  40. @:op(A^B) public static function xorI(lhs:Int64, rhs:Int):Int64;
  41. @:op(A^B) public static function xor(lhs:Int64, rhs:Int64):Int64;
  42. @:op(A&B) public static function andI(lhs:Int64, rhs:Int):Int64;
  43. @:op(A&B) public static function and(lhs:Int64, rhs:Int64):Int64;
  44. @:op(A<<B) public static function shlI(lhs:Int64, rhs:Int):Int64;
  45. @:op(A<<B) public static function shl(lhs:Int64, rhs:Int64):Int64;
  46. @:op(A>>B) public static function shrI(lhs:Int64, rhs:Int):Int64;
  47. @:op(A>>B) public static function shr(lhs:Int64, rhs:Int64):Int64;
  48. @:op(A>>>B) public static function ushrI(lhs:Int64, rhs:Int):Int64;
  49. @:op(A>>>B) public static function ushr(lhs:Int64, rhs:Int64):Int64;
  50. @:op(A>B) public static function gt(lhs:Int64, rhs:Int64):Bool;
  51. @:op(A>=B) public static function gte(lhs:Int64, rhs:Int64):Bool;
  52. @:op(A<B) public static function lt(lhs:Int64, rhs:Int64):Bool;
  53. @:op(A<=B) public static function lte(lhs:Int64, rhs:Int64):Bool;
  54. @:op(~A) public static function bneg(t:Int64):Int64;
  55. @:op(-A) public static function neg(t:Int64):Int64;
  56. @:op(++A) public static function preIncrement(t:Int64):Int64;
  57. @:op(A++) public static function postIncrement(t:Int64):Int64;
  58. @:op(--A) public static function preDecrement(t:Int64):Int64;
  59. @:op(A--) public static function postDecrement(t:Int64):Int64;
  60. }