xamarin-macios/tests/test-libraries/rename.h

131 строка
5.3 KiB
C
Исходник Обычный вид История

2016-04-26 15:00:35 +03:00
#if PREFIX == 1
#define theUltimateAnswer object_theUltimateAnswer
#define useZLib object_useZLib
#define ObjCRegistrarTest object_ObjCRegistrarTest
#define ObjCBlockTester object_ObjCBlockTester
2016-04-26 15:00:35 +03:00
#define FakeType2 object_FakeType2
#define UltimateMachine object_UltimateMachine
#define FrameworkTest object_FrameworkTest
#define Sc object_Sc
#define Scc object_Scc
#define Sccc object_Sccc
2016-04-26 15:00:35 +03:00
#define Sd object_Sd
#define Sdd object_Sdd
#define Sddd object_Sddd
#define Sdddd object_Sdddd
#define Sddddd object_Sddddd
2016-04-26 15:00:35 +03:00
#define Si object_Si
#define Sii object_Sii
#define Siii object_Siii
#define Siiii object_Siiii
#define Siiiii object_Siiiii
#define Sid object_Sid
#define Sdi object_Sdi
#define Sidi object_Sidi
#define Sidid object_Sidid
2016-04-26 15:00:35 +03:00
#define Siid object_Siid
#define Sddi object_Sddi
#define Sdidi object_Sdidi
2016-04-26 15:00:35 +03:00
#define Sl object_Sl
#define Sll object_Sll
#define Slll object_Slll
#define Sllll object_Sllll
#define Slllll object_Slllll
#define Sldld object_Sldld
#define Sdldl object_Sdldl
2016-04-26 15:00:35 +03:00
#define Scccc object_Scccc
#define Sffff object_Sffff
#define Sif object_Sif
#define Sifif object_Sifif
2016-04-26 15:00:35 +03:00
#define Sf object_Sf
#define Sff object_Sff
#define Sfff object_Sfff
#define Sffff object_Sffff
#define Sfffff object_Sfffff
2016-04-26 15:00:35 +03:00
#define Siff object_Siff
#define Siiff object_Siiff
#define Sfi object_Sfi
#define Sfifi object_Sfifi
#define Ss object_Ss
#define Sss object_Sss
#define Ssss object_Ssss
#define Sssss object_Sssss
#define CtorChaining1 object_CtorChaining1
#define ObjCExceptionTest object_ObjCExceptionTest
#define ObjCProtocolClassTest object_ObjCProtocolClassTest
#define x_mdltransform_get_rotation_matrix object_x_mdltransform_get_rotation_matrix
#define x_mdltransformcomponent_get_local_transform object_x_mdltransformcomponent_get_local_transform
#define x_mdltransform_create_global_transform object_x_mdltransform_create_global_transform
#define x_get_matrix_float4x4 object_x_get_matrix_float4x4
#define x_get_matrix_float4x3 object_x_get_matrix_float4x3
#define x_get_matrix_float3x3 object_x_get_matrix_float3x3
#define x_get_matrix_float2x2 object_x_get_matrix_float2x2
Optimize calls to BlockLiteral.SetupBlock to inject the block signature. (#3391) * [linker] Optimize calls to BlockLiteral.SetupBlock to inject the block signature. Optimize calls to BlockLiteral.SetupBlock[Unsafe] to calculate the block signature at build time, and inject it into the call site. This makes block invocations 10-15x faster (I've added tests that asserts at least an 8x increase). It's also required in order to be able to remove the dynamic registrar code in the future (since calculating the block signature at runtime requires the dynamic registrar). * [mtouch/mmp] Add support for reporting errors/warnings that point to the code line causing the error/warning. Add support for reporting errors/warnings that point to the code line causing the error/warning by adding ErrorHelper overloads that take the exact instruction to report (previously we defaulted to the first line/instruction in a method). * [tests] Add support for asserting filename/linenumber in warning messages. * Make all methods that manually create BlockLiterals optimizable. * [tests] Create a BaseOptimizeGeneratedCodeTest test that's included in both XI's and XM's link all test. * [tests] Add link all test (for both XI and XM) to test the BlockLiteral.SetupBlock optimization. * [tests] Add mtouch/mmp tests for the BlockLiteral.SetupBlock optimization. * [tests][linker] Make the base test class abstract, so tests in the base class aren't executed twice. * [tests][linker] Don't execute linkall-only tests in linksdk. The optimization tests only apply when the test assembly is linked, and that only happens in linkall, so exclude those tests in linksdk. * [tests][mmptest] Update test according to mmp changes. Fixes these test failures: 1) Failed : Xamarin.MMP.Tests.MMPTests.MM0132("inline-runtime-arch") The warning 'MM0132: Unknown optimization: 'inline-runtime-arch'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size.' was not found in the output: Message #1 did not match: actual: 'Unknown optimization: 'inline-runtime-arch'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size, blockliteral-setupblock.' expected: 'Unknown optimization: 'inline-runtime-arch'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size.' Message #2 did not match: actual: 'Unknown optimization: 'inline-runtime-arch'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size, blockliteral-setupblock.' expected: 'Unknown optimization: 'inline-runtime-arch'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size.' 2) Failed : Xamarin.MMP.Tests.MMPTests.MM0132("foo") The warning 'MM0132: Unknown optimization: 'foo'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size.' was not found in the output: Message #1 did not match: actual: 'Unknown optimization: 'foo'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size, blockliteral-setupblock.' expected: 'Unknown optimization: 'foo'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size.' Message #2 did not match: actual: 'Unknown optimization: 'foo'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size, blockliteral-setupblock.' expected: 'Unknown optimization: 'foo'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size.' * [tests][linker] Fix typo. Fixes this test failure: 1) SetupBlock_CustomDelegate (Linker.Shared.BaseOptimizeGeneratedCodeTest.SetupBlock_CustomDelegate) Counter Expected: 1 But was: 2 * [registrar] Minor adjustment to error message to match previous (and better) behavior. Fixes this test failure: 1) Failed : Xamarin.Registrar.GenericType_WithInvalidParameterTypes The error 'MT4136: The registrar cannot marshal the parameter type 'System.Collections.Generic.List`1<U>' of the parameter 'arg' in the method 'Open`1.Bar(System.Collections.Generic.List`1<U>)'' was not found in the output: Message #1 did not match: actual: 'The registrar cannot marshal the parameter type 'System.Collections.Generic.List`1<Foundation.NSObject>' of the parameter 'arg' in the method 'Open`1.Bar(System.Collections.Generic.List`1<U>)'' expected: 'The registrar cannot marshal the parameter type 'System.Collections.Generic.List`1<U>' of the parameter 'arg' in the method 'Open`1.Bar(System.Collections.Generic.List`1<U>)'' * [docs] mmp shows MM errors/warnings. * [docs] Improve according to reviews. * [tests] Fix merge failure causing test duplication.
2018-02-06 09:08:15 +03:00
#define x_call_block object_x_call_block
2016-04-26 15:00:35 +03:00
#elif PREFIX == 2
#define theUltimateAnswer ar_theUltimateAnswer
#define useZLib ar_useZLib
#define ObjCRegistrarTest ar_ObjCRegistrarTest
#define ObjCBlockTester ar_ObjCBlockTester
2016-04-26 15:00:35 +03:00
#define FakeType2 ar_FakeType2
#define UltimateMachine ar_UltimateMachine
#define FrameworkTest ar_FrameworkTest
#define Sc ar_Sc
#define Scc ar_Scc
#define Sccc ar_Sccc
2016-04-26 15:00:35 +03:00
#define Sd ar_Sd
#define Sdd ar_Sdd
#define Sddd ar_Sddd
#define Sdddd ar_Sdddd
#define Sddddd ar_Sddddd
2016-04-26 15:00:35 +03:00
#define Si ar_Si
#define Sii ar_Sii
#define Siii ar_Siii
#define Siiii ar_Siiii
#define Siiiii ar_Siiiii
#define Sid ar_Sid
#define Sdi ar_Sdi
#define Sidi ar_Sidi
#define Sidid ar_Sidid
2016-04-26 15:00:35 +03:00
#define Siid ar_Siid
#define Sddi ar_Sddi
#define Sdidi ar_Sdidi
2016-04-26 15:00:35 +03:00
#define Sl ar_Sl
#define Sll ar_Sll
#define Slll ar_Slll
#define Sllll ar_Sllll
#define Slllll ar_Slllll
#define Sldld ar_Sldld
#define Sdldl ar_Sdldl
2016-04-26 15:00:35 +03:00
#define Scccc ar_Scccc
#define Sffff ar_Sffff
#define Sif ar_Sif
#define Sifif ar_Sifif
2016-04-26 15:00:35 +03:00
#define Sf ar_Sf
#define Sff ar_Sff
#define Sfff ar_Sfff
#define Sffff ar_Sffff
#define Sfffff ar_Sfffff
2016-04-26 15:00:35 +03:00
#define Siff ar_Siff
#define Siiff ar_Siiff
#define Sfi ar_Sfi
#define Sfifi ar_Sfifi
#define Ss ar_Ss
#define Sss ar_Sss
#define Ssss ar_Ssss
#define Sssss ar_Sssss
#define CtorChaining1 ar_CtorChaining1
#define ObjCExceptionTest ar_ObjCExceptionTest
#define ObjCProtocolClassTest ar_ObjCProtocolClassTest
#define x_mdltransform_get_rotation_matrix ar_x_mdltransform_get_rotation_matrix
#define x_mdltransformcomponent_get_local_transform ar_x_mdltransformcomponent_get_local_transform
#define x_mdltransform_create_global_transform ar_x_mdltransform_create_global_transform
#define x_get_matrix_float4x4 ar_x_get_matrix_float4x4
#define x_get_matrix_float4x3 ar_x_get_matrix_float4x3
#define x_get_matrix_float3x3 ar_x_get_matrix_float3x3
#define x_get_matrix_float2x2 ar_x_get_matrix_float2x2
Optimize calls to BlockLiteral.SetupBlock to inject the block signature. (#3391) * [linker] Optimize calls to BlockLiteral.SetupBlock to inject the block signature. Optimize calls to BlockLiteral.SetupBlock[Unsafe] to calculate the block signature at build time, and inject it into the call site. This makes block invocations 10-15x faster (I've added tests that asserts at least an 8x increase). It's also required in order to be able to remove the dynamic registrar code in the future (since calculating the block signature at runtime requires the dynamic registrar). * [mtouch/mmp] Add support for reporting errors/warnings that point to the code line causing the error/warning. Add support for reporting errors/warnings that point to the code line causing the error/warning by adding ErrorHelper overloads that take the exact instruction to report (previously we defaulted to the first line/instruction in a method). * [tests] Add support for asserting filename/linenumber in warning messages. * Make all methods that manually create BlockLiterals optimizable. * [tests] Create a BaseOptimizeGeneratedCodeTest test that's included in both XI's and XM's link all test. * [tests] Add link all test (for both XI and XM) to test the BlockLiteral.SetupBlock optimization. * [tests] Add mtouch/mmp tests for the BlockLiteral.SetupBlock optimization. * [tests][linker] Make the base test class abstract, so tests in the base class aren't executed twice. * [tests][linker] Don't execute linkall-only tests in linksdk. The optimization tests only apply when the test assembly is linked, and that only happens in linkall, so exclude those tests in linksdk. * [tests][mmptest] Update test according to mmp changes. Fixes these test failures: 1) Failed : Xamarin.MMP.Tests.MMPTests.MM0132("inline-runtime-arch") The warning 'MM0132: Unknown optimization: 'inline-runtime-arch'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size.' was not found in the output: Message #1 did not match: actual: 'Unknown optimization: 'inline-runtime-arch'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size, blockliteral-setupblock.' expected: 'Unknown optimization: 'inline-runtime-arch'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size.' Message #2 did not match: actual: 'Unknown optimization: 'inline-runtime-arch'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size, blockliteral-setupblock.' expected: 'Unknown optimization: 'inline-runtime-arch'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size.' 2) Failed : Xamarin.MMP.Tests.MMPTests.MM0132("foo") The warning 'MM0132: Unknown optimization: 'foo'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size.' was not found in the output: Message #1 did not match: actual: 'Unknown optimization: 'foo'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size, blockliteral-setupblock.' expected: 'Unknown optimization: 'foo'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size.' Message #2 did not match: actual: 'Unknown optimization: 'foo'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size, blockliteral-setupblock.' expected: 'Unknown optimization: 'foo'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size.' * [tests][linker] Fix typo. Fixes this test failure: 1) SetupBlock_CustomDelegate (Linker.Shared.BaseOptimizeGeneratedCodeTest.SetupBlock_CustomDelegate) Counter Expected: 1 But was: 2 * [registrar] Minor adjustment to error message to match previous (and better) behavior. Fixes this test failure: 1) Failed : Xamarin.Registrar.GenericType_WithInvalidParameterTypes The error 'MT4136: The registrar cannot marshal the parameter type 'System.Collections.Generic.List`1<U>' of the parameter 'arg' in the method 'Open`1.Bar(System.Collections.Generic.List`1<U>)'' was not found in the output: Message #1 did not match: actual: 'The registrar cannot marshal the parameter type 'System.Collections.Generic.List`1<Foundation.NSObject>' of the parameter 'arg' in the method 'Open`1.Bar(System.Collections.Generic.List`1<U>)'' expected: 'The registrar cannot marshal the parameter type 'System.Collections.Generic.List`1<U>' of the parameter 'arg' in the method 'Open`1.Bar(System.Collections.Generic.List`1<U>)'' * [docs] mmp shows MM errors/warnings. * [docs] Improve according to reviews. * [tests] Fix merge failure causing test duplication.
2018-02-06 09:08:15 +03:00
#define x_call_block ar_x_call_block
2016-04-26 15:00:35 +03:00
#else
// keep original names
#endif