Граф коммитов

80 Коммитов

Автор SHA1 Сообщение Дата
Jakub Míšek 1e47a4b932 test for f20c5fb525
test for https://github.com/peachpiecompiler/peachpie/issues/1059#issuecomment-1194030716
2022-07-25 15:39:10 +02:00
Jakub Míšek 9dfc4483f5 fdiv test 2020-11-23 16:09:20 +01:00
Jakub Míšek 360264c1c6 random_int test
ref https://github.com/peachpiecompiler/peachpie/issues/752
2020-11-23 15:45:47 +01:00
Jakub Míšek a83dc3f5cd fdiv test
ref https://github.com/peachpiecompiler/peachpie/issues/752
2020-11-23 15:22:39 +01:00
Robert Husák a44ccc3c93 Fix passing current directory to is_file
It caused an exception in Substring instead of returning false.
2020-08-28 17:26:27 +02:00
Jakub Míšek 3a06251baa analysis of recursion fix, test
fixes https://github.com/peachpiecompiler/peachpie/issues/754
recursion will get analyzed to reach "return" block
2020-05-23 10:35:36 +02:00
Jakub Míšek d9b28a47fa runtimechain does not convert array indexes to IntStringKey
fixes Conversion from ".." to "IntStringKey" not implemented compiler exception
2020-05-14 16:05:56 +02:00
Jakub Míšek 0742c56053 test for return from finally 2020-05-11 18:00:15 +02:00
Jakub Míšek 7bc4eca67f tests: return from finally, yielding from catch/finally
ref https://github.com/peachpiecompiler/peachpie/issues/604
2020-05-10 16:11:19 +02:00
Robert Husák bc3734f2f0 Fix null dereference in dynamic call site with nullable string parameter
Fixes #725
2020-04-14 15:10:01 +02:00
Robert Husák 11d231beb8 Add test for #720 2020-04-03 10:29:07 +02:00
Jakub Míšek 635e4769e2 is_numeric() tests
https://github.com/peachpiecompiler/peachpie/issues/712
https://github.com/peachpiecompiler/peachpie/issues/711
2020-03-29 22:10:21 +02:00
Robert Husák 8c840d15ed Implement calling of [$b, "A::foo"] and [$this, "parent::foo"]
Fixes #710
2020-03-24 18:12:04 +01:00
Jakub Míšek ea6513e431 copy analysis must respect values containing references
fixes https://github.com/iolevel/wpdotnet-sdk/issues/65
fixes https://github.com/iolevel/wpdotnet-sdk/issues/64
2020-03-10 16:17:44 +01:00
Jakub Míšek f62047db4e better callsite overload resolution for params, test, perf
- correctly calculates cost of the overload with params
- correctly counts mandatory parameters
- does not allocate empty array
2020-02-29 17:39:55 +01:00
Jakub Míšek 364ac6c819 anonymous function with callback resolves protected members properly 2020-02-27 16:21:38 +01:00
Jakub Míšek a2050635bb binding null to param by ref fix, test 2020-02-27 14:26:40 +01:00
Jakub Míšek 5a0b9a99ca self:: and parent:: forwarding of $this expected in expression analysis
avoids wrong method resolution when there are static and instance method overloads
2020-02-25 14:54:56 +01:00
Jakub Míšek 116a19ced1 is_a() test
https://github.com/peachpiecompiler/peachpie/issues/659
2020-02-06 23:15:33 +01:00
Robert Husák 095e86162d Extend tests of type hint analysis, cleanup 2020-01-16 17:18:01 +01:00
Robert Husák 036c04cc42 Fix invalid callback handling in call_user_func and array_map 2020-01-14 22:49:15 +01:00
Robert Husák 6b544afda9 Validate nullable callable arguments properly 2020-01-14 14:42:39 +01:00
Robert Husák 3113cec35e Add callable parameter validation 2020-01-14 14:42:39 +01:00
Robert Husák 18970978ac Throw errors when invoking invalid callbacks 2020-01-14 14:42:39 +01:00
Jakub Míšek d22aa23ee5 fixed warnings in tests 2020-01-07 14:09:21 +01:00
Jakub Míšek 151374203c test for #591
ref https://github.com/peachpiecompiler/peachpie/issues/591
2019-11-23 15:39:25 +01:00
Jakub Míšek 9f9d73d0c6 test for dynamic invocation with functions overloads and default parameters 2019-11-08 14:01:02 +01:00
Jakub Míšek f3aab31253 runtime chain for array items
ref https://github.com/peachpiecompiler/peachpie/issues/252
2019-11-07 11:40:25 +01:00
Jakub Míšek 20a4c8e7c9 default parameter within trait fix 2019-11-01 11:26:10 +01:00
Jakub Míšek cd8373e2d7 default parameter test 2019-10-28 12:55:55 +01:00
Jakub Míšek 0b79a068a0 correct static method call through an instance
fixes https://github.com/iolevel/wpdotnet-sdk/issues/47
correct compilation of 2bcc64cbd7/wordpress/wp-includes/class-wp-image-editor.php (L316)
2019-10-26 18:28:30 +02:00
Jakub Míšek 1e313cd5a5 baking default parameter values in static fields
instead of representing parameter defaults in serialized byte array, use a synthesized static readonly field that initialized the value once
- updated parameter reflection
- updated callsites
- updated compiler to emit load of the field
- removed unnecessary serialization routines from compiler
+ perf, mem, clean
+ fixes issues with default values
+ tests added
2019-10-25 16:34:10 +02:00
Jakub Míšek 874376a573 relaxed argument analysis + test
- ref https://github.com/peachpiecompiler/peachpie/issues/252
- marks variables that **might** by passed by ref as ref
- test added
2019-10-22 15:11:00 +02:00
Robert Husák cfa7ffd1f1 Use __NAMESPACE__ in tests for better maintainability 2019-10-22 14:28:56 +02:00
Robert Husák 60d4079bca Fix call_user_func_array test 2019-10-22 09:09:21 +02:00
Robert Husák fb78126943 Add namespaces to script tests 2019-10-21 16:49:45 +02:00
Jakub Míšek 1a335c4dc1 tests from recent issues 2019-08-25 22:57:07 +02:00
Robert Husák 3133bef88d Add test of $this in Generator in anonymous function
- test case of #449
2019-06-19 23:45:04 +02:00
Jakub Míšek c8b9d77c0c binding overloads call in correct order
when calling a function overloads dynamically, their order matters!
- cheapest are checked first (might get to the end faster)
- less params first (MissingArg warning is not checked there (faster) so we evaluate method with less params first to call the best match first and avoid the wrong one) (test `param_default.php`)
- fixes https://github.com/peachpiecompiler/peachpie/issues/409
2019-04-06 17:45:45 +02:00
Jakub Míšek 57399de9d2 param that can be null is correctly treated in flow analysis + test
fixes https://github.com/peachpiecompiler/peachpie/issues/355
2019-01-29 17:29:16 +01:00
Jakub Míšek 0430ab5a27 Create instance_call_004.php 2019-01-25 18:10:51 +01:00
Jakub Míšek f8145681c4 test fix 2018-09-27 18:15:20 +02:00
Jakub Míšek 296723bf67 safe use of value as array
- throws `InvalidCastException` if non-array used as array, null allowed
- correct pass value as array (null remains as null)
+ test for returning array from function
2018-09-27 16:48:43 +02:00
Robert Husák 8a4b3f6af9 Properly reset bound method in instance call during analysis 2018-03-07 15:58:39 +01:00
Robert Husák ab70477c81 Fix call site generation inside lambda function
The class context was missing, causing private methods not to be found.
2017-11-29 12:02:20 +01:00
Jakub Míšek 4994491b87
Merge pull request #111 from peachpiecompiler/dev/mediawiki
Dev/mediawiki
2017-11-25 13:09:20 +01:00
Jakub Míšek a11f458595 test - instance call 2017-11-24 16:56:55 +01:00
Robert Husák d3acefe624 Fix conversion of variable args to PhpValue 2017-11-24 02:25:13 +01:00
Jakub Míšek af8330163e get_called_class 2017-11-20 11:36:32 +01:00
Jakub Míšek 88a9028763 static members via class instance
- accessing static fields and class consts using target class instance,
not just the class name
- calling static methods via class instance
2017-11-17 16:31:55 +01:00