Remove use native_types, add use varint_types

master
韩天峰 1 month ago
parent 0eba3b72f9
commit 86c56ad1bf
  1. 2
      benchmark/bench.php
  2. 2
      benchmark/micro_bench.php
  3. 2
      examples/array-loop/main.php
  4. 2
      examples/array-loop/std-array.php
  5. 2
      examples/debug/mem_leak.php
  6. 2
      examples/error/unset-int-prop.php
  7. 2
      examples/error/unset-int-var.php
  8. 2
      examples/high-precision.php
  9. 2
      examples/perf/class-static-prop.php
  10. 2
      examples/perf/code.php
  11. 2
      examples/perf/empty_class_static_prop.php
  12. 2
      examples/pi.php
  13. 2
      examples/wasm-hello/src/WasiDemo.php
  14. 1
      phpunit/code/assign-divide-by-zero.php
  15. 1
      phpunit/code/assign-modulo-by-zero.php
  16. 2
      phpunit/code/big-numeric/bigfloat-pow-operator.php
  17. 2
      phpunit/code/big-numeric/decimal-pow-operator.php
  18. 2
      phpunit/code/big-numeric/mixed-big-comparison.php
  19. 1
      phpunit/code/bigfloat-unsupported-mod.php
  20. 1
      phpunit/code/bigfloat-unsupported-shift.php
  21. 1
      phpunit/code/bigint-post-inc.php
  22. 1
      phpunit/code/bigint-pre-inc.php
  23. 2
      phpunit/code/constant-overflow-native-add.php
  24. 2
      phpunit/code/constant-overflow-native-div-subtree.php
  25. 2
      phpunit/code/constant-overflow-native-div.php
  26. 2
      phpunit/code/constant-overflow-native-mod.php
  27. 2
      phpunit/code/constant-overflow-native-mul.php
  28. 2
      phpunit/code/constant-overflow-native-neg.php
  29. 2
      phpunit/code/constant-overflow-native-nested-add.php
  30. 2
      phpunit/code/constant-overflow-native-nested-div.php
  31. 2
      phpunit/code/constant-overflow-native-nested-mod.php
  32. 2
      phpunit/code/constant-overflow-native-nested-zero.php
  33. 2
      phpunit/code/constant-overflow-native-nonconstant.php
  34. 2
      phpunit/code/constant-overflow-native-ok.php
  35. 2
      phpunit/code/constant-overflow-native-sub.php
  36. 1
      phpunit/code/constant-overflow-warning.php
  37. 2
      phpunit/code/control-flow/loop-switch-continue.php
  38. 2
      phpunit/code/control-flow/standalone-switch-continue.php
  39. 1
      phpunit/code/decimal-pre-dec.php
  40. 1
      phpunit/code/decimal-unsupported-bitand.php
  41. 1
      phpunit/code/decimal-unsupported-bitor.php
  42. 7
      phpunit/code/divide-by-zero-any.php
  43. 1
      phpunit/code/divide-by-zero-int.php
  44. 1
      phpunit/code/divide-by-zero-string.php
  45. 2
      phpunit/code/dynamic-scalar-binary-operands.php
  46. 2
      phpunit/code/hot-path-codegen.php
  47. 4
      phpunit/code/local-literal-declaration-initializer-varint.php
  48. 2
      phpunit/code/local-literal-declaration-initializer.php
  49. 1
      phpunit/code/modulo-by-zero-int.php
  50. 2
      phpunit/code/native-bool-array-dim-write.php
  51. 2
      phpunit/code/native-float-array-dim-write.php
  52. 2
      phpunit/code/native-int-array-dim-write.php
  53. 2
      phpunit/code/native-method-unset-keeps-optimization.php
  54. 2
      phpunit/code/native-property-assign-op-class-const.php
  55. 2
      phpunit/code/native-property-assign-op-int.php
  56. 3
      phpunit/code/native-property-full-name.php
  57. 2
      phpunit/code/native-property-private-other-class.php
  58. 2
      phpunit/code/native-property-protected-unrelated-class.php
  59. 2
      phpunit/code/native-property-static-type-mismatch.php
  60. 2
      phpunit/code/native-property-this-write-conversion.php
  61. 2
      phpunit/code/native-property-unset-disables-hoist.php
  62. 2
      phpunit/code/native-property-write-conversion.php
  63. 2
      phpunit/code/native-scalar-binary-operands.php
  64. 2
      phpunit/code/nullsafe-nested-private-property.php
  65. 2
      phpunit/code/nullsafe-private-property.php
  66. 2
      phpunit/code/object-prop-subclass-mismatch.php
  67. 1
      phpunit/code/php-int-max-fold-global.php
  68. 2
      phpunit/code/php-int-max-fold-namespace.php
  69. 1
      phpunit/code/re-assign-array-to-bool.php
  70. 1
      phpunit/code/re-assign-array-to-float.php
  71. 1
      phpunit/code/re-assign-array-to-int.php
  72. 1
      phpunit/code/re-assign-array-to-obj.php
  73. 1
      phpunit/code/re-assign-bool-to-array.php
  74. 1
      phpunit/code/re-assign-bool-to-obj.php
  75. 1
      phpunit/code/re-assign-float-to-array.php
  76. 1
      phpunit/code/re-assign-float-to-obj.php
  77. 1
      phpunit/code/re-assign-int-to-array.php
  78. 1
      phpunit/code/re-assign-int-to-obj.php
  79. 2
      phpunit/code/re-assign-obj-to-array.php
  80. 1
      phpunit/code/re-assign-obj-to-bool.php
  81. 1
      phpunit/code/re-assign-obj-to-float.php
  82. 1
      phpunit/code/re-assign-obj-to-int.php
  83. 1
      phpunit/code/re-assign-obj-to-str.php
  84. 1
      phpunit/code/re-assign-str-to-array.php
  85. 1
      phpunit/code/re-assign-str-to-bool.php
  86. 1
      phpunit/code/re-assign-str-to-float.php
  87. 1
      phpunit/code/re-assign-str-to-int.php
  88. 2
      phpunit/code/readonly-property-no-native-ref.php
  89. 7
      phpunit/code/removed-native-types.php
  90. 2
      phpunit/code/shift-boundary-native-neg-left.php
  91. 2
      phpunit/code/shift-boundary-native-neg-right.php
  92. 2
      phpunit/code/shift-boundary-native-negative.php
  93. 2
      phpunit/code/shift-boundary-native-nested-neg-right.php
  94. 2
      phpunit/code/shift-boundary-native-nested-overflow.php
  95. 2
      phpunit/code/shift-boundary-native-ok.php
  96. 2
      phpunit/code/shift-boundary-native-overflow.php
  97. 2
      phpunit/code/shift-boundary-native-sign-bit.php
  98. 2
      phpunit/code/shift-boundary-native-wrapped-overflow.php
  99. 1
      phpunit/code/shift-boundary-warning.php
  100. 1
      phpunit/code/typed-scalar-arithmetic-codegen.php
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,6 +1,4 @@
<?php
use native_types;
function simple(): void
{
$a = 0;

@ -1,8 +1,6 @@
<?php
declare(strict_types=1);
use native_types;
function hallo() {
}

@ -1,7 +1,5 @@
<?php
use native_types;
function main(int $argc, array $argv): void
{
$u = (int)$argv[2];

@ -1,7 +1,5 @@
<?php
use native_types;
function main()
{
$array = std::array(std::array(std::array(Type::Int, 13), 16), 19);

@ -1,6 +1,4 @@
<?php
use native_types;
function gen_random (int $n) {
global $LAST;
return( ($n * ($LAST = ($LAST * IA + IC) % IM)) / IM );

@ -1,6 +1,4 @@
<?php
use native_types;
class Test {
public int $x = 100;

@ -1,6 +1,4 @@
<?php
use native_types;
function main()
{
$x = 100;

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{
$integer = std::bigInt("123456789012345678901234567890");

@ -1,6 +1,4 @@
<?php
use native_types;
class Foo {
static public int $a;
static public object $o;

@ -1,6 +1,4 @@
<?php
use native_types;
const N = 1000_0000;
const ROUNDS = 5;

@ -1,9 +1,7 @@
<?php
use native_types;
class Foo {
static public int $a;
}
function main() {
$s = microtime( true);
$n = 1000_0000;

@ -1,6 +1,4 @@
<?php
use native_types;
function main()
{
ini_set("precision", 17);

@ -1,8 +1,6 @@
<?php
declare(strict_types=1);
use native_types;
final class WasiDemo
{

@ -1,4 +1,5 @@
<?php
use varint_types;
function main(): void
{

@ -1,4 +1,5 @@
<?php
use varint_types;
function main(): void
{

@ -1,6 +1,4 @@
<?php
use native_types;
function main(): void
{
$bigfloat = std::bigFloat('2');

@ -1,6 +1,4 @@
<?php
use native_types;
function main(): void
{
$decimal = std::decimal('2');

@ -1,6 +1,4 @@
<?php
use native_types;
function main(): void
{
$bigint = std::bigInt('2');

@ -1,6 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main()
{
$a = std::bigFloat("3.14");

@ -1,6 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main()
{
$a = std::bigFloat("10.0");

@ -1,6 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main()
{
$a = std::bigInt(100);

@ -1,6 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main()
{
$a = std::bigInt(100);

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function addToMaximum(int $value): int
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,4 +1,5 @@
<?php
use varint_types;
declare(strict_types=1);

@ -1,7 +1,5 @@
<?php
use native_types;
function switch_continue_in_for(): void
{
for ($i = 0; $i < 2; $i++) {

@ -1,7 +1,5 @@
<?php
use native_types;
function standalone_switch_continue(int $value): void
{
switch ($value) {

@ -1,6 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main()
{
$a = std::decimal("100");

@ -1,6 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main()
{
$a = std::decimal("3.14");

@ -1,6 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main()
{
$a = std::decimal("100");

@ -0,0 +1,7 @@
<?php
function divideByZeroAny(): void
{
$value = std::any(10);
var_dump($value / 0);
}

@ -1,4 +1,5 @@
<?php
use varint_types;
function main(): void
{

@ -1,4 +1,5 @@
<?php
use varint_types;
function main(): void
{

@ -1,5 +1,7 @@
<?php
use varint_types;
function recursivePhpInt(int $value): int
{
return $value < 2

@ -1,7 +1,5 @@
<?php
use native_types;
function hotPathTrace(string $value): string
{
return $value;

@ -1,8 +1,8 @@
<?php
use native_types;
use varint_types;
function localLiteralDeclarationInitializerNative(): void
function localLiteralDeclarationInitializerVarInt(): void
{
$integer = 42;
$negative = -7;

@ -8,6 +8,7 @@ function localLiteralDeclarationInitializer(): void
$boolean = true;
$string = 'hello';
$nullValue = null;
$explicitAny = std::any(100);
if ($boolean) {
$nested = 9;
@ -24,5 +25,6 @@ function localLiteralDeclarationInitializer(): void
$nullValue,
$nested,
$computed,
$explicitAny,
);
}

@ -1,4 +1,5 @@
<?php
use varint_types;
function main(): void
{

@ -1,6 +1,4 @@
<?php
use native_types;
function main(): void
{
$value = false;

@ -1,6 +1,4 @@
<?php
use native_types;
function main(): void
{
$value = 1.5;

@ -1,6 +1,4 @@
<?php
use native_types;
function main(): void
{
$value = 1;

@ -1,7 +1,5 @@
<?php
use native_types;
class NativeMethodUnsetKeepsOptimization
{
public int $value = 7;

@ -1,7 +1,5 @@
<?php
use native_types;
class NativePropertyAssignOpClassConstBox
{
public int $flags = 7;

@ -1,7 +1,5 @@
<?php
use native_types;
class NativePropertyAssignOpIntBox
{
public int $value = 1;

@ -1,7 +1,5 @@
<?php
namespace NativePropSource {
use native_types;
class Target
{
@ -12,7 +10,6 @@ namespace NativePropSource {
}
namespace NativePropSource\Target {
use native_types;
use NativePropSource\Target;
class Child extends Target

@ -1,7 +1,5 @@
<?php
use native_types;
class NativePrivateOwner
{
private int $value = 1;

@ -1,7 +1,5 @@
<?php
use native_types;
class NativeProtectedOwner
{
protected int $value = 1;

@ -1,6 +1,4 @@
<?php
use native_types;
class NativePropertyStaticTypeMismatchBox
{
public int $value = 0;

@ -1,6 +1,4 @@
<?php
use native_types;
class NativePropertyThisWriteConversionBox
{
public int $value = 0;

@ -1,7 +1,5 @@
<?php
use native_types;
class NativePropertyUnsetDisablesHoist
{
public int $value = 7;

@ -1,6 +1,4 @@
<?php
use native_types;
class NativePropertyWriteConversionBox
{
public int $value = 0;

@ -1,7 +1,5 @@
<?php
use native_types;
function recursiveNativeInt(int $value): int
{
return $value < 2

@ -1,7 +1,5 @@
<?php
use native_types;
class NullsafeNestedOwner
{
public NullsafeNestedChild $child;

@ -1,7 +1,5 @@
<?php
use native_types;
class NullsafePrivateOwner
{
private int $value = 1;

@ -1,6 +1,4 @@
<?php
use native_types;
class TypedObjectPropBase
{
}

@ -1,4 +1,5 @@
<?php
use varint_types;
function lowercaseIsRuntime()
{

@ -2,6 +2,8 @@
namespace FoldNs;
use varint_types;
const PHP_INT_MAX = 5;
function shadowedFold(): int

@ -1,5 +1,4 @@
<?php
use native_types;
function main()
{
$x = true;

@ -1,5 +1,4 @@
<?php
use native_types;
function main()
{
$x = 3.14;

@ -1,5 +1,4 @@
<?php
use native_types;
function main()
{
$x = 42;

@ -1,5 +1,4 @@
<?php
use native_types;
function main()
{
$obj = new stdClass();

@ -1,5 +1,4 @@
<?php
use native_types;
function main()
{
$x = [1, 2];

@ -1,5 +1,4 @@
<?php
use native_types;
function main()
{
$obj = new stdClass();

@ -1,5 +1,4 @@
<?php
use native_types;
function main()
{
$x = [1, 2];

@ -1,5 +1,4 @@
<?php
use native_types;
function main()
{
$obj = new stdClass();

@ -1,5 +1,4 @@
<?php
use native_types;
function main()
{
$x = [1, 2];

@ -1,5 +1,4 @@
<?php
use native_types;
function main()
{
$obj = new stdClass();

@ -1,6 +1,4 @@
<?php
use native_types;
function main()
{
$obj = [];

@ -1,5 +1,4 @@
<?php
use native_types;
function main()
{
$x = true;

@ -1,5 +1,4 @@
<?php
use native_types;
function main()
{
$x = 3.14;

@ -1,5 +1,4 @@
<?php
use native_types;
function main()
{
$x = 42;

@ -1,6 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main()
{
$x = "hello";

@ -1,5 +1,4 @@
<?php
use native_types;
function main()
{
$x = [1, 2];

@ -1,5 +1,4 @@
<?php
use native_types;
function main()
{
$x = true;

@ -1,5 +1,4 @@
<?php
use native_types;
function main()
{
$x = 3.14;

@ -1,5 +1,4 @@
<?php
use native_types;
function main()
{
$x = 42;

@ -1,7 +1,5 @@
<?php
use native_types;
class ReadonlyPropertyNoNativeRef
{
public readonly int $integer;

@ -0,0 +1,7 @@
<?php
use native_types;
function removedNativeTypes(): void
{
}

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,7 +1,5 @@
<?php
declare(strict_types=1);
use native_types;
function main(): void
{

@ -1,4 +1,5 @@
<?php
use varint_types;
declare(strict_types=1);

@ -1,4 +1,5 @@
<?php
use varint_types;
function divTypedInts(int $a, int $b): float
{

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save