mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 04:06:08 +02:00
* do str(...) optimization only in level 3+ mode
This commit is contained in:
parent
81b22cc5d1
commit
3539b4a6f3
@ -2737,6 +2737,10 @@ implementation
|
|||||||
case intrinsiccode of
|
case intrinsiccode of
|
||||||
in_str_x_string:
|
in_str_x_string:
|
||||||
begin
|
begin
|
||||||
|
{ rare optimization opportunity which takes some extra time,
|
||||||
|
so check only at level 3+ }
|
||||||
|
if not(cs_opt_level3 in current_settings.optimizerswitches) then
|
||||||
|
exit;
|
||||||
{ If n is a constant, attempt to convert, for example:
|
{ If n is a constant, attempt to convert, for example:
|
||||||
"Str(5, Output);" to "Output := '5';" }
|
"Str(5, Output);" to "Output := '5';" }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user