exiftool-vendored.exe 12.80.0 → 12.82.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/bin/exiftool.exe +0 -0
- package/bin/exiftool_files/Changes +44 -0
- package/bin/exiftool_files/Licenses_Strawberry_Perl.zip +0 -0
- package/bin/exiftool_files/README +3 -2
- package/bin/exiftool_files/exiftool.pl +36 -14
- package/bin/exiftool_files/lib/Archive/Zip/Archive.pm +399 -65
- package/bin/exiftool_files/lib/Archive/Zip/DirectoryMember.pm +1 -1
- package/bin/exiftool_files/lib/Archive/Zip/FileMember.pm +1 -1
- package/bin/exiftool_files/lib/Archive/Zip/Member.pm +499 -195
- package/bin/exiftool_files/lib/Archive/Zip/NewFileMember.pm +1 -1
- package/bin/exiftool_files/lib/Archive/Zip/StringMember.pm +2 -2
- package/bin/exiftool_files/lib/Archive/Zip/ZipFileMember.pm +79 -20
- package/bin/exiftool_files/lib/Archive/Zip.pm +179 -29
- package/bin/exiftool_files/lib/AutoLoader.pm +453 -0
- package/bin/exiftool_files/lib/B/Deparse.pm +209 -137
- package/bin/exiftool_files/lib/B.pm +1 -1
- package/bin/exiftool_files/lib/Benchmark.pm +1123 -0
- package/bin/exiftool_files/lib/Class/Struct.pm +2 -2
- package/bin/exiftool_files/lib/Compress/Raw/Bzip2.pm +14 -9
- package/bin/exiftool_files/lib/Compress/Raw/Lzma.pm +982 -0
- package/bin/exiftool_files/lib/Compress/Raw/Zlib.pm +91 -86
- package/bin/exiftool_files/lib/Compress/Zlib.pm +105 -100
- package/bin/exiftool_files/lib/Config.pm +9 -9
- package/bin/exiftool_files/lib/Config_heavy.pl +36 -33
- package/bin/exiftool_files/lib/CryptX.pm +2 -82
- package/bin/exiftool_files/lib/Data/Dumper.pm +2 -2
- package/bin/exiftool_files/lib/Digest/MD5.pm +12 -9
- package/bin/exiftool_files/lib/Digest/Perl/MD5.pm +1 -191
- package/bin/exiftool_files/lib/Digest/base.pm +26 -20
- package/bin/exiftool_files/lib/DynaLoader.pm +7 -4
- package/bin/exiftool_files/lib/Encode.pm +3 -3
- package/bin/exiftool_files/lib/Errno.pm +13 -13
- package/bin/exiftool_files/lib/Exporter/Heavy.pm +2 -2
- package/bin/exiftool_files/lib/Exporter.pm +1 -1
- package/bin/exiftool_files/lib/ExtUtils/Command/MM.pm +323 -0
- package/bin/exiftool_files/lib/ExtUtils/Command.pm +382 -0
- package/bin/exiftool_files/lib/File/Find.pm +1 -1
- package/bin/exiftool_files/lib/File/Glob.pm +1 -8
- package/bin/exiftool_files/lib/File/GlobMapper.pm +2 -2
- package/bin/exiftool_files/lib/File/HomeDir/Darwin/Carbon.pm +2 -40
- package/bin/exiftool_files/lib/File/HomeDir/Darwin/Cocoa.pm +2 -34
- package/bin/exiftool_files/lib/File/HomeDir/Darwin.pm +2 -28
- package/bin/exiftool_files/lib/File/HomeDir/Driver.pm +2 -35
- package/bin/exiftool_files/lib/File/HomeDir/FreeDesktop.pm +2 -62
- package/bin/exiftool_files/lib/File/HomeDir/MacOS9.pm +2 -53
- package/bin/exiftool_files/lib/File/HomeDir/Test.pm +2 -43
- package/bin/exiftool_files/lib/File/HomeDir/Unix.pm +2 -53
- package/bin/exiftool_files/lib/File/HomeDir/Windows.pm +2 -69
- package/bin/exiftool_files/lib/File/HomeDir.pm +5 -416
- package/bin/exiftool_files/lib/File/Path.pm +3 -3
- package/bin/exiftool_files/lib/File/Spec/Win32.pm +2 -2
- package/bin/exiftool_files/lib/File/Temp.pm +70 -35
- package/bin/exiftool_files/lib/File/Which.pm +1 -240
- package/bin/exiftool_files/lib/File/stat.pm +3 -2
- package/bin/exiftool_files/lib/IO/Compress/Adapter/Bzip2.pm +16 -17
- package/bin/exiftool_files/lib/IO/Compress/Adapter/Deflate.pm +19 -20
- package/bin/exiftool_files/lib/IO/Compress/Base/Common.pm +5 -5
- package/bin/exiftool_files/lib/IO/Compress/Base.pm +35 -26
- package/bin/exiftool_files/lib/IO/Compress/Brotli.pm +159 -0
- package/bin/exiftool_files/lib/IO/Compress/Bzip2.pm +50 -25
- package/bin/exiftool_files/lib/IO/Compress/Gzip/Constants.pm +6 -6
- package/bin/exiftool_files/lib/IO/Compress/Gzip.pm +58 -32
- package/bin/exiftool_files/lib/IO/Compress/RawDeflate.pm +63 -38
- package/bin/exiftool_files/lib/IO/Compress/Zlib/Extra.pm +20 -20
- package/bin/exiftool_files/lib/IO/Dir.pm +1 -1
- package/bin/exiftool_files/lib/IO/File.pm +1 -1
- package/bin/exiftool_files/lib/IO/Handle.pm +1 -21
- package/bin/exiftool_files/lib/IO/Pipe.pm +1 -1
- package/bin/exiftool_files/lib/IO/Seekable.pm +1 -1
- package/bin/exiftool_files/lib/IO/Select.pm +16 -2
- package/bin/exiftool_files/lib/IO/Socket/INET.pm +14 -9
- package/bin/exiftool_files/lib/IO/Socket/UNIX.pm +17 -1
- package/bin/exiftool_files/lib/IO/Socket.pm +474 -126
- package/bin/exiftool_files/lib/IO/String.pm +425 -0
- package/bin/exiftool_files/lib/IO/Uncompress/Adapter/Inflate.pm +13 -14
- package/bin/exiftool_files/lib/IO/Uncompress/Base.pm +142 -132
- package/bin/exiftool_files/lib/IO/Uncompress/Brotli.pm +119 -0
- package/bin/exiftool_files/lib/IO/Uncompress/Gunzip.pm +43 -37
- package/bin/exiftool_files/lib/IO/Uncompress/RawInflate.pm +49 -43
- package/bin/exiftool_files/lib/IO.pm +2 -2
- package/bin/exiftool_files/lib/Image/ExifTool/BuildTagLookup.pm +44 -31
- package/bin/exiftool_files/lib/Image/ExifTool/CanonVRD.pm +2 -2
- package/bin/exiftool_files/lib/Image/ExifTool/FujiFilm.pm +20 -7
- package/bin/exiftool_files/lib/Image/ExifTool/GM.pm +543 -0
- package/bin/exiftool_files/lib/Image/ExifTool/Geolocation.pm +332 -149
- package/bin/exiftool_files/lib/Image/ExifTool/Geotag.pm +9 -4
- package/bin/exiftool_files/lib/Image/ExifTool/M2TS.pm +32 -4
- package/bin/exiftool_files/lib/Image/ExifTool/MakerNotes.pm +2 -2
- package/bin/exiftool_files/lib/Image/ExifTool/Microsoft.pm +1 -1
- package/bin/exiftool_files/lib/Image/ExifTool/Nikon.pm +331 -22
- package/bin/exiftool_files/lib/Image/ExifTool/NikonCustom.pm +55 -1
- package/bin/exiftool_files/lib/Image/ExifTool/Olympus.pm +1 -0
- package/bin/exiftool_files/lib/Image/ExifTool/OpenEXR.pm +21 -3
- package/bin/exiftool_files/lib/Image/ExifTool/PNG.pm +3 -3
- package/bin/exiftool_files/lib/Image/ExifTool/QuickTime.pm +40 -24
- package/bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl +61 -30
- package/bin/exiftool_files/lib/Image/ExifTool/README +2 -0
- package/bin/exiftool_files/lib/Image/ExifTool/Sony.pm +1 -1
- package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +4815 -4775
- package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +931 -617
- package/bin/exiftool_files/lib/Image/ExifTool/WriteQuickTime.pl +30 -8
- package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +10 -4
- package/bin/exiftool_files/lib/Image/ExifTool/XMP.pm +4 -2
- package/bin/exiftool_files/lib/Image/ExifTool.pm +77 -41
- package/bin/exiftool_files/lib/Image/ExifTool.pod +24 -11
- package/bin/exiftool_files/lib/List/Util.pm +97 -8
- package/bin/exiftool_files/lib/MIME/Base64.pm +5 -5
- package/bin/exiftool_files/lib/MIME/Charset/_Compat.pm +106 -0
- package/bin/exiftool_files/lib/MIME/Charset.pm +1303 -0
- package/bin/exiftool_files/lib/Math/BigFloat.pm +444 -27
- package/bin/exiftool_files/lib/Math/BigInt/Calc.pm +296 -313
- package/bin/exiftool_files/lib/Math/BigInt/FastCalc.pm +1 -1
- package/bin/exiftool_files/lib/Math/BigInt/GMP.pm +2 -115
- package/bin/exiftool_files/lib/Math/BigInt/LTM.pm +2 -24
- package/bin/exiftool_files/lib/Math/BigInt/Lib.pm +61 -32
- package/bin/exiftool_files/lib/Math/BigInt.pm +292 -107
- package/bin/exiftool_files/lib/POSIX.pm +1 -1
- package/bin/exiftool_files/lib/PerlIO/scalar.pm +41 -0
- package/bin/exiftool_files/lib/PerlIO.pm +397 -0
- package/bin/exiftool_files/lib/Portable/CPAN.pm +94 -94
- package/bin/exiftool_files/lib/Portable/Config.pm +94 -94
- package/bin/exiftool_files/lib/Portable/FileSpec.pm +180 -180
- package/bin/exiftool_files/lib/Portable/HomeDir.pm +110 -110
- package/bin/exiftool_files/lib/Portable/LoadYaml.pm +430 -430
- package/bin/exiftool_files/lib/Portable/minicpan.pm +55 -55
- package/bin/exiftool_files/lib/Portable.pm +246 -320
- package/bin/exiftool_files/lib/Scalar/Util.pm +9 -4
- package/bin/exiftool_files/lib/Socket.pm +16 -12
- package/bin/exiftool_files/lib/Storable.pm +1444 -1441
- package/bin/exiftool_files/lib/TAP/Base.pm +133 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Base.pm +467 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Color.pm +116 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Console/ParallelSession.pm +201 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Console/Session.pm +205 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Console.pm +100 -0
- package/bin/exiftool_files/lib/TAP/Formatter/File/Session.pm +95 -0
- package/bin/exiftool_files/lib/TAP/Formatter/File.pm +56 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Session.pm +220 -0
- package/bin/exiftool_files/lib/TAP/Harness/Beyond.pod +426 -0
- package/bin/exiftool_files/lib/TAP/Harness/Env.pm +215 -0
- package/bin/exiftool_files/lib/TAP/Harness.pm +1054 -0
- package/bin/exiftool_files/lib/TAP/Object.pm +155 -0
- package/bin/exiftool_files/lib/TAP/Parser/Aggregator.pm +414 -0
- package/bin/exiftool_files/lib/TAP/Parser/Grammar.pm +584 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator/Array.pm +100 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator/Process.pm +378 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator/Stream.pm +116 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator.pm +162 -0
- package/bin/exiftool_files/lib/TAP/Parser/IteratorFactory.pm +339 -0
- package/bin/exiftool_files/lib/TAP/Parser/Multiplexer.pm +194 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Bailout.pm +62 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Comment.pm +60 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Plan.pm +119 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Pragma.pm +62 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Test.pm +271 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Unknown.pm +48 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Version.pm +62 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/YAML.pm +61 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result.pm +297 -0
- package/bin/exiftool_files/lib/TAP/Parser/ResultFactory.pm +183 -0
- package/bin/exiftool_files/lib/TAP/Parser/Scheduler/Job.pm +127 -0
- package/bin/exiftool_files/lib/TAP/Parser/Scheduler/Spinner.pm +61 -0
- package/bin/exiftool_files/lib/TAP/Parser/Scheduler.pm +448 -0
- package/bin/exiftool_files/lib/TAP/Parser/Source.pm +381 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Executable.pm +184 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/File.pm +136 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Handle.pm +124 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Perl.pm +370 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/RawTAP.pm +130 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler.pm +191 -0
- package/bin/exiftool_files/lib/TAP/Parser/YAMLish/Reader.pm +332 -0
- package/bin/exiftool_files/lib/TAP/Parser/YAMLish/Writer.pm +254 -0
- package/bin/exiftool_files/lib/TAP/Parser.pm +1931 -0
- package/bin/exiftool_files/lib/Test/Builder/Formatter.pm +107 -0
- package/bin/exiftool_files/lib/Test/Builder/IO/Scalar.pm +659 -0
- package/bin/exiftool_files/lib/Test/Builder/Module.pm +182 -0
- package/bin/exiftool_files/lib/Test/Builder/Tester/Color.pm +51 -0
- package/bin/exiftool_files/lib/Test/Builder/Tester.pm +675 -0
- package/bin/exiftool_files/lib/Test/Builder/TodoDiag.pm +68 -0
- package/bin/exiftool_files/lib/Test/Builder.pm +2653 -0
- package/bin/exiftool_files/lib/Test/Harness.pm +618 -0
- package/bin/exiftool_files/lib/Test/More.pm +1997 -0
- package/bin/exiftool_files/lib/Test/Simple.pm +220 -0
- package/bin/exiftool_files/lib/Test/Tester/Capture.pm +241 -0
- package/bin/exiftool_files/lib/Test/Tester/CaptureRunner.pm +79 -0
- package/bin/exiftool_files/lib/Test/Tester/Delegate.pm +45 -0
- package/bin/exiftool_files/lib/Test/Tester.pm +695 -0
- package/bin/exiftool_files/lib/Test/Tutorial.pod +618 -0
- package/bin/exiftool_files/lib/Test/use/ok.pm +64 -0
- package/bin/exiftool_files/lib/Text/ParseWords.pm +303 -0
- package/bin/exiftool_files/lib/Tie/StdHandle.pm +2 -2
- package/bin/exiftool_files/lib/Time/HiRes.pm +73 -68
- package/bin/exiftool_files/lib/Time/Local.pm +82 -35
- package/bin/exiftool_files/lib/Time/Piece.pm +19 -4
- package/bin/exiftool_files/lib/Time/Seconds.pm +1 -1
- package/bin/exiftool_files/lib/UNIVERSAL.pm +203 -0
- package/bin/exiftool_files/lib/Unicode/GCString.pm +60 -0
- package/bin/exiftool_files/lib/Unicode/LineBreak/Constants.pm +68 -0
- package/bin/exiftool_files/lib/Unicode/LineBreak.pm +248 -0
- package/bin/exiftool_files/lib/Win32/API/Struct.pm +1 -177
- package/bin/exiftool_files/lib/Win32/API/Type.pm +1 -100
- package/bin/exiftool_files/lib/Win32/API.pm +1 -830
- package/bin/exiftool_files/lib/Win32/FindFile.pm +2 -123
- package/bin/exiftool_files/lib/Win32.pm +213 -89
- package/bin/exiftool_files/lib/Win32API/File.pm +1 -1
- package/bin/exiftool_files/lib/auto/B/B.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Bzip2/Bzip2.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Lzma/Lzma.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Lzma/autosplit.ix +3 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Zlib/Zlib.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/CryptX/CryptX.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Cwd/Cwd.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Data/Dumper/Dumper.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Digest/MD5/MD5.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Digest/SHA/SHA.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Encode/Encode.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Fcntl/Fcntl.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/File/Glob/Glob.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/IO/Compress/Brotli/Brotli.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/IO/IO.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/List/Util/Util.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/MIME/Base64/Base64.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Math/BigInt/FastCalc/FastCalc.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Math/BigInt/GMP/GMP.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/POSIX/POSIX.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/PerlIO/scalar/scalar.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Socket/Socket.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Storable/Storable.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Time/HiRes/HiRes.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Time/Piece/Piece.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Unicode/LineBreak/LineBreak.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32/API/API.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32/FindFile/FindFile.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32/Win32.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32API/File/File.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/mro/mro.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/re/re.xs.dll +0 -0
- package/bin/exiftool_files/lib/feature.pm +49 -17
- package/bin/exiftool_files/lib/mro.pm +4 -20
- package/bin/exiftool_files/lib/overload.pm +15 -15
- package/bin/exiftool_files/lib/parent.pm +10 -2
- package/bin/exiftool_files/lib/re.pm +91 -33
- package/bin/exiftool_files/lib/warnings.pm +17 -6
- package/bin/exiftool_files/libgcc_s_seh-1.dll +0 -0
- package/bin/exiftool_files/liblzma-5__.dll +0 -0
- package/bin/exiftool_files/libstdc++-6.dll +0 -0
- package/bin/exiftool_files/libwinpthread-1.dll +0 -0
- package/bin/exiftool_files/perl.exe +0 -0
- package/bin/exiftool_files/perl532.dll +0 -0
- package/package.json +7 -5
- package/bin/exiftool_files/libgcc_s_dw2-1.dll +0 -0
- package/bin/exiftool_files/perl530.dll +0 -0
|
@@ -52,7 +52,7 @@ use B qw(class main_root main_start main_cv svref_2object opnumber perlstring
|
|
|
52
52
|
MDEREF_SHIFT
|
|
53
53
|
);
|
|
54
54
|
|
|
55
|
-
$VERSION = '1.
|
|
55
|
+
$VERSION = '1.54';
|
|
56
56
|
use strict;
|
|
57
57
|
our $AUTOLOAD;
|
|
58
58
|
use warnings ();
|
|
@@ -271,7 +271,7 @@ BEGIN {
|
|
|
271
271
|
|
|
272
272
|
|
|
273
273
|
BEGIN { for (qw[ const stringify rv2sv list glob pushmark null aelem
|
|
274
|
-
kvaslice kvhslice padsv
|
|
274
|
+
kvaslice kvhslice padsv argcheck
|
|
275
275
|
nextstate dbstate rv2av rv2hv helem custom ]) {
|
|
276
276
|
eval "sub OP_\U$_ () { " . opnumber($_) . "}"
|
|
277
277
|
}}
|
|
@@ -279,6 +279,8 @@ BEGIN { for (qw[ const stringify rv2sv list glob pushmark null aelem
|
|
|
279
279
|
# _pessimise_walk(): recursively walk the optree of a sub,
|
|
280
280
|
# possibly undoing optimisations along the way.
|
|
281
281
|
|
|
282
|
+
sub DEBUG { 0 }
|
|
283
|
+
|
|
282
284
|
sub _pessimise_walk {
|
|
283
285
|
my ($self, $startop) = @_;
|
|
284
286
|
|
|
@@ -1176,42 +1178,68 @@ sub pad_subs {
|
|
|
1176
1178
|
# or altered. In this case we return "()" and fall back to general
|
|
1177
1179
|
# deparsing of the individual sigelems as 'my $x = $_[N]' etc.
|
|
1178
1180
|
#
|
|
1179
|
-
# We're only called if the
|
|
1181
|
+
# We're only called if the top is an ex-argcheck, which is a placeholder
|
|
1182
|
+
# indicating a signature subtree.
|
|
1183
|
+
#
|
|
1184
|
+
# Return a signature string, or an empty list if no deparseable as a
|
|
1185
|
+
# signature
|
|
1180
1186
|
|
|
1181
1187
|
sub deparse_argops {
|
|
1182
|
-
my ($self, $
|
|
1188
|
+
my ($self, $topop, $cv) = @_;
|
|
1183
1189
|
|
|
1184
1190
|
my @sig;
|
|
1185
|
-
|
|
1186
|
-
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
$topop = $topop->first;
|
|
1194
|
+
return unless $$topop and $topop->name eq 'lineseq';
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
# last op should be nextstate
|
|
1198
|
+
my $last = $topop->last;
|
|
1199
|
+
return unless $$last
|
|
1200
|
+
and ( _op_is_or_was($last, OP_NEXTSTATE)
|
|
1201
|
+
or _op_is_or_was($last, OP_DBSTATE));
|
|
1202
|
+
|
|
1203
|
+
# first OP_NEXTSTATE
|
|
1204
|
+
|
|
1205
|
+
my $o = $topop->first;
|
|
1206
|
+
return unless $$o;
|
|
1207
|
+
return if $o->label;
|
|
1187
1208
|
|
|
1188
1209
|
# OP_ARGCHECK
|
|
1189
1210
|
|
|
1190
1211
|
$o = $o->sibling;
|
|
1212
|
+
return unless $$o and $o->name eq 'argcheck';
|
|
1213
|
+
|
|
1191
1214
|
my ($params, $opt_params, $slurpy) = $o->aux_list($cv);
|
|
1192
1215
|
my $mandatory = $params - $opt_params;
|
|
1193
1216
|
my $seen_slurpy = 0;
|
|
1194
1217
|
my $last_ix = -1;
|
|
1195
1218
|
|
|
1196
|
-
# keep looking for valid nextstate + argelem pairs
|
|
1219
|
+
# keep looking for valid nextstate + argelem pairs, terminated
|
|
1220
|
+
# by a final nextstate
|
|
1197
1221
|
|
|
1198
1222
|
while (1) {
|
|
1199
|
-
# OP_NEXTSTATE
|
|
1200
1223
|
$o = $o->sibling;
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1224
|
+
return unless $$o;
|
|
1225
|
+
|
|
1226
|
+
# skip trailing nextstate
|
|
1227
|
+
last if $$o == $$last;
|
|
1228
|
+
|
|
1229
|
+
# OP_NEXTSTATE
|
|
1230
|
+
return unless $o->name =~ /^(next|db)state$/;
|
|
1231
|
+
return if $o->label;
|
|
1204
1232
|
|
|
1205
1233
|
# OP_ARGELEM
|
|
1206
|
-
|
|
1207
|
-
last unless $$
|
|
1234
|
+
$o = $o->sibling;
|
|
1235
|
+
last unless $$o;
|
|
1208
1236
|
|
|
1209
|
-
if ($
|
|
1210
|
-
my $ix = $
|
|
1237
|
+
if ($o->name eq 'argelem') {
|
|
1238
|
+
my $ix = $o->string($cv);
|
|
1211
1239
|
while (++$last_ix < $ix) {
|
|
1212
1240
|
push @sig, $last_ix < $mandatory ? '$' : '$=';
|
|
1213
1241
|
}
|
|
1214
|
-
my $var = $self->padname($
|
|
1242
|
+
my $var = $self->padname($o->targ);
|
|
1215
1243
|
if ($var =~ /^[@%]/) {
|
|
1216
1244
|
return if $seen_slurpy;
|
|
1217
1245
|
$seen_slurpy = 1;
|
|
@@ -1221,8 +1249,8 @@ sub deparse_argops {
|
|
|
1221
1249
|
else {
|
|
1222
1250
|
return if $ix >= $params;
|
|
1223
1251
|
}
|
|
1224
|
-
if ($
|
|
1225
|
-
my $kid = $
|
|
1252
|
+
if ($o->flags & OPf_KIDS) {
|
|
1253
|
+
my $kid = $o->first;
|
|
1226
1254
|
return unless $$kid and $kid->name eq 'argdefelem';
|
|
1227
1255
|
my $def = $self->deparse($kid->first, 7);
|
|
1228
1256
|
$def = "($def)" if $kid->first->flags & OPf_PARENS;
|
|
@@ -1230,13 +1258,13 @@ sub deparse_argops {
|
|
|
1230
1258
|
}
|
|
1231
1259
|
push @sig, $var;
|
|
1232
1260
|
}
|
|
1233
|
-
elsif ($
|
|
1234
|
-
and ($
|
|
1235
|
-
and $
|
|
1261
|
+
elsif ($o->name eq 'null'
|
|
1262
|
+
and ($o->flags & OPf_KIDS)
|
|
1263
|
+
and $o->first->name eq 'argdefelem')
|
|
1236
1264
|
{
|
|
1237
1265
|
# special case - a void context default expression: $ = expr
|
|
1238
1266
|
|
|
1239
|
-
my $defop = $
|
|
1267
|
+
my $defop = $o->first;
|
|
1240
1268
|
my $ix = $defop->targ;
|
|
1241
1269
|
while (++$last_ix < $ix) {
|
|
1242
1270
|
push @sig, $last_ix < $mandatory ? '$' : '$=';
|
|
@@ -1248,10 +1276,9 @@ sub deparse_argops {
|
|
|
1248
1276
|
push @sig, '$ = ' . $def;
|
|
1249
1277
|
}
|
|
1250
1278
|
else {
|
|
1251
|
-
|
|
1279
|
+
return;
|
|
1252
1280
|
}
|
|
1253
1281
|
|
|
1254
|
-
$o = $o2;
|
|
1255
1282
|
}
|
|
1256
1283
|
|
|
1257
1284
|
while (++$last_ix < $params) {
|
|
@@ -1259,9 +1286,10 @@ sub deparse_argops {
|
|
|
1259
1286
|
}
|
|
1260
1287
|
push @sig, $slurpy if $slurpy and !$seen_slurpy;
|
|
1261
1288
|
|
|
1262
|
-
return (
|
|
1289
|
+
return (join(', ', @sig));
|
|
1263
1290
|
}
|
|
1264
1291
|
|
|
1292
|
+
|
|
1265
1293
|
# Deparse a sub. Returns everything except the 'sub foo',
|
|
1266
1294
|
# e.g. ($$) : method { ...; }
|
|
1267
1295
|
# or : prototype($$) lvalue ($a, $b) { ...; };
|
|
@@ -1304,27 +1332,26 @@ Carp::confess("SPECIAL in deparse_sub") if $cv->isa("B::SPECIAL");
|
|
|
1304
1332
|
$self->pad_subs($cv);
|
|
1305
1333
|
$self->pessimise($root, $cv->START);
|
|
1306
1334
|
my $lineseq = $root->first;
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
}
|
|
1335
|
+
|
|
1336
|
+
# stub sub may have single op rather than list of ops
|
|
1337
|
+
my $is_list = ($lineseq->name eq "lineseq");
|
|
1338
|
+
my $firstop = $is_list ? $lineseq->first : $lineseq;
|
|
1339
|
+
|
|
1340
|
+
# Try to deparse first subtree as a signature if possible.
|
|
1341
|
+
# Top of signature subtree has an ex-argcheck as a placeholder
|
|
1342
|
+
if ( $has_sig
|
|
1343
|
+
and $$firstop
|
|
1344
|
+
and $firstop->name eq 'null'
|
|
1345
|
+
and $firstop->targ == OP_ARGCHECK
|
|
1346
|
+
) {
|
|
1347
|
+
my ($mysig) = $self->deparse_argops($firstop, $cv);
|
|
1348
|
+
if (defined $mysig) {
|
|
1349
|
+
$sig = $mysig;
|
|
1350
|
+
$firstop = $is_list ? $firstop->sibling : undef;
|
|
1326
1351
|
}
|
|
1352
|
+
}
|
|
1327
1353
|
|
|
1354
|
+
if ($is_list && $firstop) {
|
|
1328
1355
|
my @ops;
|
|
1329
1356
|
for (my $o = $firstop; $$o; $o=$o->sibling) {
|
|
1330
1357
|
push @ops, $o;
|
|
@@ -1341,9 +1368,12 @@ Carp::confess("SPECIAL in deparse_sub") if $cv->isa("B::SPECIAL");
|
|
|
1341
1368
|
$body .= ";\n$subs" if length($subs);
|
|
1342
1369
|
}
|
|
1343
1370
|
}
|
|
1344
|
-
|
|
1371
|
+
elsif ($firstop) {
|
|
1345
1372
|
$body = $self->deparse($root->first, 0);
|
|
1346
1373
|
}
|
|
1374
|
+
else {
|
|
1375
|
+
$body = ';'; # stub sub
|
|
1376
|
+
}
|
|
1347
1377
|
|
|
1348
1378
|
my $l = '';
|
|
1349
1379
|
if ($self->{'linenums'}) {
|
|
@@ -2184,6 +2214,7 @@ my %ignored_hints = (
|
|
|
2184
2214
|
'strict/refs' => 1,
|
|
2185
2215
|
'strict/subs' => 1,
|
|
2186
2216
|
'strict/vars' => 1,
|
|
2217
|
+
'feature/bits' => 1,
|
|
2187
2218
|
);
|
|
2188
2219
|
|
|
2189
2220
|
my %rev_feature;
|
|
@@ -2304,7 +2335,7 @@ sub keyword {
|
|
|
2304
2335
|
}
|
|
2305
2336
|
# This sub may be called for a program that has no nextstate ops. In
|
|
2306
2337
|
# that case we may have a lexical sub named no/use/sub in scope but
|
|
2307
|
-
#
|
|
2338
|
+
# $self->lex_in_scope will return false because it depends on the
|
|
2308
2339
|
# current nextstate op. So we need this alternate method if there is
|
|
2309
2340
|
# no current cop.
|
|
2310
2341
|
if (!$self->{'curcop'}) {
|
|
@@ -3029,6 +3060,8 @@ sub pp_sge { binop(@_, "ge", 15) }
|
|
|
3029
3060
|
sub pp_sle { binop(@_, "le", 15) }
|
|
3030
3061
|
sub pp_scmp { maybe_targmy(@_, \&binop, "cmp", 14) }
|
|
3031
3062
|
|
|
3063
|
+
sub pp_isa { binop(@_, "isa", 15) }
|
|
3064
|
+
|
|
3032
3065
|
sub pp_sassign { binop(@_, "=", 7, SWAP_CHILDREN) }
|
|
3033
3066
|
sub pp_aassign { binop(@_, "=", 7, SWAP_CHILDREN | LIST_CONTEXT) }
|
|
3034
3067
|
|
|
@@ -3167,6 +3200,64 @@ sub pp_andassign { logassignop(@_, "&&=") }
|
|
|
3167
3200
|
sub pp_orassign { logassignop(@_, "||=") }
|
|
3168
3201
|
sub pp_dorassign { logassignop(@_, "//=") }
|
|
3169
3202
|
|
|
3203
|
+
my %cmpchain_cmpops = (
|
|
3204
|
+
eq => ["==", 14],
|
|
3205
|
+
i_eq => ["==", 14],
|
|
3206
|
+
ne => ["!=", 14],
|
|
3207
|
+
i_ne => ["!=", 14],
|
|
3208
|
+
seq => ["eq", 14],
|
|
3209
|
+
sne => ["ne", 14],
|
|
3210
|
+
lt => ["<", 15],
|
|
3211
|
+
i_lt => ["<", 15],
|
|
3212
|
+
gt => [">", 15],
|
|
3213
|
+
i_gt => [">", 15],
|
|
3214
|
+
le => ["<=", 15],
|
|
3215
|
+
i_le => ["<=", 15],
|
|
3216
|
+
ge => [">=", 15],
|
|
3217
|
+
i_ge => [">=", 15],
|
|
3218
|
+
slt => ["lt", 15],
|
|
3219
|
+
sgt => ["gt", 15],
|
|
3220
|
+
sle => ["le", 15],
|
|
3221
|
+
sge => ["ge", 15],
|
|
3222
|
+
);
|
|
3223
|
+
sub pp_cmpchain_and {
|
|
3224
|
+
my($self, $op, $cx) = @_;
|
|
3225
|
+
my($prec, $dep);
|
|
3226
|
+
while(1) {
|
|
3227
|
+
my($thiscmp, $rightcond);
|
|
3228
|
+
if($op->name eq "cmpchain_and") {
|
|
3229
|
+
$thiscmp = $op->first;
|
|
3230
|
+
$rightcond = $thiscmp->sibling;
|
|
3231
|
+
} else {
|
|
3232
|
+
$thiscmp = $op;
|
|
3233
|
+
}
|
|
3234
|
+
my $thiscmptype = $cmpchain_cmpops{$thiscmp->name} // (return "XXX");
|
|
3235
|
+
if(defined $prec) {
|
|
3236
|
+
$thiscmptype->[1] == $prec or return "XXX";
|
|
3237
|
+
$thiscmp->first->name eq "null" &&
|
|
3238
|
+
!($thiscmp->first->flags & OPf_KIDS)
|
|
3239
|
+
or return "XXX";
|
|
3240
|
+
} else {
|
|
3241
|
+
$prec = $thiscmptype->[1];
|
|
3242
|
+
$dep = $self->deparse($thiscmp->first, $prec);
|
|
3243
|
+
}
|
|
3244
|
+
$dep .= " ".$thiscmptype->[0]." ";
|
|
3245
|
+
my $operand = $thiscmp->last;
|
|
3246
|
+
if(defined $rightcond) {
|
|
3247
|
+
$operand->name eq "cmpchain_dup" or return "XXX";
|
|
3248
|
+
$operand = $operand->first;
|
|
3249
|
+
}
|
|
3250
|
+
$dep .= $self->deparse($operand, $prec);
|
|
3251
|
+
last unless defined $rightcond;
|
|
3252
|
+
if($rightcond->name eq "null" && ($rightcond->flags & OPf_KIDS) &&
|
|
3253
|
+
$rightcond->first->name eq "cmpchain_and") {
|
|
3254
|
+
$rightcond = $rightcond->first;
|
|
3255
|
+
}
|
|
3256
|
+
$op = $rightcond;
|
|
3257
|
+
}
|
|
3258
|
+
return $self->maybe_parens($dep, $cx, $prec);
|
|
3259
|
+
}
|
|
3260
|
+
|
|
3170
3261
|
sub rv2gv_or_string {
|
|
3171
3262
|
my($self,$op) = @_;
|
|
3172
3263
|
if ($op->name eq "gv") { # could be open("open") or open("###")
|
|
@@ -3360,7 +3451,7 @@ sub pp_glob {
|
|
|
3360
3451
|
my $kid = $op->first->sibling; # skip pushmark
|
|
3361
3452
|
my $keyword =
|
|
3362
3453
|
$op->flags & OPf_SPECIAL ? 'glob' : $self->keyword('glob');
|
|
3363
|
-
my $text = $self->deparse($kid);
|
|
3454
|
+
my $text = $self->deparse($kid, $cx);
|
|
3364
3455
|
return $cx >= 5 || $self->{'parens'}
|
|
3365
3456
|
? "$keyword($text)"
|
|
3366
3457
|
: "$keyword $text";
|
|
@@ -5685,100 +5776,81 @@ sub tr_chr {
|
|
|
5685
5776
|
}
|
|
5686
5777
|
}
|
|
5687
5778
|
|
|
5688
|
-
|
|
5779
|
+
sub tr_invmap {
|
|
5780
|
+
my ($invlist_ref, $map_ref) = @_;
|
|
5689
5781
|
|
|
5690
|
-
|
|
5691
|
-
my
|
|
5692
|
-
my
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
$from[$i][1]--;
|
|
5722
|
-
$to[$i][1]--;
|
|
5723
|
-
unshift @from, ord '-';
|
|
5724
|
-
unshift @to, ord '-';
|
|
5725
|
-
last;
|
|
5726
|
-
}
|
|
5727
|
-
}
|
|
5728
|
-
for my $i (0 .. $#delfrom) {
|
|
5729
|
-
if ($delfrom[$i][0] == ord '-') {
|
|
5730
|
-
push @delfrom, splice(@delfrom, $i, 1);
|
|
5731
|
-
last;
|
|
5732
|
-
} elsif ($delfrom[$i][1] == ord '-') {
|
|
5733
|
-
$delfrom[$i][1]--;
|
|
5734
|
-
push @delfrom, ord '-';
|
|
5735
|
-
last;
|
|
5736
|
-
}
|
|
5782
|
+
my $infinity = ~0 >> 1; # IV_MAX
|
|
5783
|
+
my $from = "";
|
|
5784
|
+
my $to = "";
|
|
5785
|
+
|
|
5786
|
+
for my $i (0.. @$invlist_ref - 1) {
|
|
5787
|
+
my $this_from = $invlist_ref->[$i];
|
|
5788
|
+
my $map = $map_ref->[$i];
|
|
5789
|
+
my $upper = ($i < @$invlist_ref - 1)
|
|
5790
|
+
? $invlist_ref->[$i+1]
|
|
5791
|
+
: $infinity;
|
|
5792
|
+
my $range = $upper - $this_from - 1;
|
|
5793
|
+
if (DEBUG) {
|
|
5794
|
+
print STDERR "i=$i, from=$this_from, upper=$upper, range=$range\n";
|
|
5795
|
+
}
|
|
5796
|
+
next if $map == ~0;
|
|
5797
|
+
next if $map == ~0 - 1;
|
|
5798
|
+
$from .= tr_chr($this_from);
|
|
5799
|
+
$to .= tr_chr($map);
|
|
5800
|
+
next if $range == 0; # Single code point
|
|
5801
|
+
if ($range == 1) { # Adjacent code points
|
|
5802
|
+
$from .= tr_chr($this_from + 1);
|
|
5803
|
+
$to .= tr_chr($map + 1);
|
|
5804
|
+
}
|
|
5805
|
+
elsif ($upper != $infinity) {
|
|
5806
|
+
$from .= "-" . tr_chr($this_from + $range);
|
|
5807
|
+
$to .= "-" . tr_chr($map + $range);
|
|
5808
|
+
}
|
|
5809
|
+
else {
|
|
5810
|
+
$from .= "-INFTY";
|
|
5811
|
+
$to .= "-INFTY";
|
|
5812
|
+
}
|
|
5737
5813
|
}
|
|
5738
|
-
|
|
5739
|
-
|
|
5814
|
+
|
|
5815
|
+
return ($from, $to);
|
|
5816
|
+
}
|
|
5817
|
+
|
|
5818
|
+
sub tr_decode_utf8 {
|
|
5819
|
+
my($tr_av, $flags) = @_;
|
|
5820
|
+
printf STDERR "flags=0x%x\n", $flags if DEBUG;
|
|
5821
|
+
my $invlist = $tr_av->ARRAYelt(0);
|
|
5822
|
+
my @invlist = unpack("J*", $invlist->PV);
|
|
5823
|
+
my @map = unpack("J*", $tr_av->ARRAYelt(1)->PV);
|
|
5824
|
+
|
|
5825
|
+
if (DEBUG) {
|
|
5826
|
+
for my $i (0 .. @invlist - 1) {
|
|
5827
|
+
printf STDERR "[%d]\t%x\t", $i, $invlist[$i];
|
|
5828
|
+
my $map = $map[$i];
|
|
5829
|
+
if ($map == ~0) {
|
|
5830
|
+
print STDERR "TR_UNMAPPED\n";
|
|
5831
|
+
}
|
|
5832
|
+
elsif ($map == ~0 - 1) {
|
|
5833
|
+
print STDERR "TR_SPECIAL\n";
|
|
5834
|
+
}
|
|
5835
|
+
else {
|
|
5836
|
+
printf STDERR "%x\n", $map;
|
|
5837
|
+
}
|
|
5838
|
+
}
|
|
5740
5839
|
}
|
|
5741
|
-
|
|
5840
|
+
|
|
5841
|
+
my ($from, $to) = tr_invmap(\@invlist, \@map);
|
|
5842
|
+
|
|
5742
5843
|
if ($flags & OPpTRANS_COMPLEMENT) {
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
$next = $from[$i][1] + 1;
|
|
5748
|
-
}
|
|
5749
|
-
@from = ();
|
|
5750
|
-
for my $range (@newfrom) {
|
|
5751
|
-
if ($range->[0] <= $range->[1]) {
|
|
5752
|
-
push @from, $range;
|
|
5753
|
-
}
|
|
5754
|
-
}
|
|
5844
|
+
shift @map;
|
|
5845
|
+
pop @invlist;
|
|
5846
|
+
my $throw_away;
|
|
5847
|
+
($from, $throw_away) = tr_invmap(\@invlist, \@map);
|
|
5755
5848
|
}
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
$from .= tr_chr($chunk->[0]) . "-" . tr_chr($chunk->[1]);
|
|
5761
|
-
} elsif ($diff == 1) {
|
|
5762
|
-
$from .= tr_chr($chunk->[0]) . tr_chr($chunk->[1]);
|
|
5763
|
-
} else {
|
|
5764
|
-
$from .= tr_chr($chunk->[0]);
|
|
5765
|
-
}
|
|
5766
|
-
}
|
|
5767
|
-
for my $chunk (@to) {
|
|
5768
|
-
$diff = $chunk->[1] - $chunk->[0];
|
|
5769
|
-
if ($diff > 1) {
|
|
5770
|
-
$to .= tr_chr($chunk->[0]) . "-" . tr_chr($chunk->[1]);
|
|
5771
|
-
} elsif ($diff == 1) {
|
|
5772
|
-
$to .= tr_chr($chunk->[0]) . tr_chr($chunk->[1]);
|
|
5773
|
-
} else {
|
|
5774
|
-
$to .= tr_chr($chunk->[0]);
|
|
5775
|
-
}
|
|
5849
|
+
|
|
5850
|
+
if (DEBUG) {
|
|
5851
|
+
print STDERR "Returning ", escape_str($from), "/",
|
|
5852
|
+
escape_str($to), "\n";
|
|
5776
5853
|
}
|
|
5777
|
-
#$final = sprintf("%04x", $final) if defined $final;
|
|
5778
|
-
#$none = sprintf("%04x", $none) if defined $none;
|
|
5779
|
-
#$extra = sprintf("%04x", $extra) if defined $extra;
|
|
5780
|
-
#print STDERR "final: $final\n none: $none\nextra: $extra\n";
|
|
5781
|
-
#print STDERR $swash{'LIST'}->PV;
|
|
5782
5854
|
return (escape_str($from), escape_str($to));
|
|
5783
5855
|
}
|
|
5784
5856
|
|
|
@@ -5792,9 +5864,9 @@ sub pp_trans {
|
|
|
5792
5864
|
($from, $to) = tr_decode_byte($op->pv, $priv_flags);
|
|
5793
5865
|
} elsif ($class eq "PADOP") {
|
|
5794
5866
|
($from, $to)
|
|
5795
|
-
= tr_decode_utf8($self->padval($op->padix)
|
|
5867
|
+
= tr_decode_utf8($self->padval($op->padix), $priv_flags);
|
|
5796
5868
|
} else { # class($op) eq "SVOP"
|
|
5797
|
-
($from, $to) = tr_decode_utf8($op->sv
|
|
5869
|
+
($from, $to) = tr_decode_utf8($op->sv, $priv_flags);
|
|
5798
5870
|
}
|
|
5799
5871
|
my $flags = "";
|
|
5800
5872
|
$flags .= "c" if $priv_flags & OPpTRANS_COMPLEMENT;
|