Browse Source

Restoring authorship annotation for <tobo@yandex-team.ru>. Commit 1 of 2.

tobo 3 years ago
parent
commit
7fe8390925

+ 2 - 2
build/plugins/_common.py

@@ -1,6 +1,6 @@
 import sys
 import hashlib
-import base64
+import base64 
 
 
 class Result(object):
@@ -22,7 +22,7 @@ def lazy(func):
 
 
 def pathid(path):
-    return base64.b32encode(hashlib.md5(path).digest()).lower().strip('=')
+    return base64.b32encode(hashlib.md5(path).digest()).lower().strip('=') 
 
 
 def listid(l):

+ 1 - 1
build/plugins/res.py

@@ -41,7 +41,7 @@ def onfat_resource(unit, *args):
     # we make several calls of rescompiler
     # https://msdn.microsoft.com/ru-ru/library/windows/desktop/ms682425.aspx
     for part_args in split(args, 8000):
-        output = listid(part_args) + '.cpp'
+        output = listid(part_args) + '.cpp' 
         inputs = [x for x, y in iterpair(part_args) if x != '-']
         if inputs:
             inputs = ['IN'] + inputs

+ 71 - 71
build/scripts/build_catboost.py

@@ -1,71 +1,71 @@
-import sys
-import os
-import shutil
-import re
-import subprocess
-
-def get_value(val):
-    dct = val.split('=', 1)
-    if len(dct) > 1:
-        return dct[1]
-    return ''
-
-
-class BuildCbBase(object):
-    def run(self, cbmodel, cbname, cb_cpp_path):
-
-        data_prefix = "CB_External_"
-        data = data_prefix + cbname
-        datasize = data + "Size"
-
-        cbtype = "const NCatboostCalcer::TCatboostCalcer"
-        cbload = "(ReadModel({0}, {1}, EModelType::CatboostBinary))".format(data, datasize)
-
-        cb_cpp_tmp_path = cb_cpp_path + ".tmp"
-        cb_cpp_tmp = open(cb_cpp_tmp_path, 'w')
-
-        cb_cpp_tmp.write("#include <kernel/catboost/catboost_calcer.h>\n")
-
-        ro_data_path = os.path.dirname(cb_cpp_path) + "/" + data_prefix + cbname + ".rodata"
-        cb_cpp_tmp.write("namespace{\n")
-        cb_cpp_tmp.write("    extern \"C\" {\n")
-        cb_cpp_tmp.write("        extern const unsigned char {1}{0}[];\n".format(cbname, data_prefix))
-        cb_cpp_tmp.write("        extern const ui32 {1}{0}Size;\n".format(cbname, data_prefix))
-        cb_cpp_tmp.write("    }\n")
-        cb_cpp_tmp.write("}\n")
-        archiverCall = subprocess.Popen([self.archiver, "-q", "-p", "-o", ro_data_path, cbmodel], stdout=None, stderr=subprocess.PIPE)
-        archiverCall.wait()
-        cb_cpp_tmp.write("extern {0} {1};\n".format(cbtype, cbname))
-        cb_cpp_tmp.write("{0} {1}{2};".format(cbtype, cbname, cbload))
-        cb_cpp_tmp.close()
-        shutil.move(cb_cpp_tmp_path, cb_cpp_path)
-
-class BuildCb(BuildCbBase):
-    def run(self, argv):
-        if len(argv) < 5:
-            print >>sys.stderr, "BuildCb.Run(<ARCADIA_ROOT> <archiver> <mninfo> <mnname> <cppOutput> [params...])"
-            sys.exit(1)
-
-        self.SrcRoot = argv[0]
-        self.archiver = argv[1]
-        cbmodel = argv[2]
-        cbname = argv[3]
-        cb_cpp_path = argv[4]
-
-        super(BuildCb, self).run(cbmodel, cbname, cb_cpp_path)
-
-
-def build_cb_f(argv):
-    build_cb = BuildCb()
-    build_cb.run(argv)
-
-
-if __name__ == '__main__':
-    if len(sys.argv) < 2:
-        print >>sys.stderr, "Usage: build_cb.py <funcName> <args...>"
-        sys.exit(1)
-
-    if (sys.argv[2:]):
-        globals()[sys.argv[1]](sys.argv[2:])
-    else:
-        globals()[sys.argv[1]]()
+import sys 
+import os 
+import shutil 
+import re 
+import subprocess 
+ 
+def get_value(val): 
+    dct = val.split('=', 1) 
+    if len(dct) > 1: 
+        return dct[1] 
+    return '' 
+ 
+ 
+class BuildCbBase(object): 
+    def run(self, cbmodel, cbname, cb_cpp_path): 
+ 
+        data_prefix = "CB_External_" 
+        data = data_prefix + cbname 
+        datasize = data + "Size" 
+ 
+        cbtype = "const NCatboostCalcer::TCatboostCalcer" 
+        cbload = "(ReadModel({0}, {1}, EModelType::CatboostBinary))".format(data, datasize) 
+ 
+        cb_cpp_tmp_path = cb_cpp_path + ".tmp" 
+        cb_cpp_tmp = open(cb_cpp_tmp_path, 'w') 
+ 
+        cb_cpp_tmp.write("#include <kernel/catboost/catboost_calcer.h>\n") 
+ 
+        ro_data_path = os.path.dirname(cb_cpp_path) + "/" + data_prefix + cbname + ".rodata" 
+        cb_cpp_tmp.write("namespace{\n") 
+        cb_cpp_tmp.write("    extern \"C\" {\n") 
+        cb_cpp_tmp.write("        extern const unsigned char {1}{0}[];\n".format(cbname, data_prefix)) 
+        cb_cpp_tmp.write("        extern const ui32 {1}{0}Size;\n".format(cbname, data_prefix)) 
+        cb_cpp_tmp.write("    }\n") 
+        cb_cpp_tmp.write("}\n") 
+        archiverCall = subprocess.Popen([self.archiver, "-q", "-p", "-o", ro_data_path, cbmodel], stdout=None, stderr=subprocess.PIPE) 
+        archiverCall.wait() 
+        cb_cpp_tmp.write("extern {0} {1};\n".format(cbtype, cbname)) 
+        cb_cpp_tmp.write("{0} {1}{2};".format(cbtype, cbname, cbload)) 
+        cb_cpp_tmp.close() 
+        shutil.move(cb_cpp_tmp_path, cb_cpp_path) 
+ 
+class BuildCb(BuildCbBase): 
+    def run(self, argv): 
+        if len(argv) < 5: 
+            print >>sys.stderr, "BuildCb.Run(<ARCADIA_ROOT> <archiver> <mninfo> <mnname> <cppOutput> [params...])" 
+            sys.exit(1) 
+ 
+        self.SrcRoot = argv[0] 
+        self.archiver = argv[1] 
+        cbmodel = argv[2] 
+        cbname = argv[3] 
+        cb_cpp_path = argv[4] 
+ 
+        super(BuildCb, self).run(cbmodel, cbname, cb_cpp_path) 
+ 
+ 
+def build_cb_f(argv): 
+    build_cb = BuildCb() 
+    build_cb.run(argv) 
+ 
+ 
+if __name__ == '__main__': 
+    if len(sys.argv) < 2: 
+        print >>sys.stderr, "Usage: build_cb.py <funcName> <args...>" 
+        sys.exit(1) 
+ 
+    if (sys.argv[2:]): 
+        globals()[sys.argv[1]](sys.argv[2:]) 
+    else: 
+        globals()[sys.argv[1]]() 

+ 1 - 1
build/scripts/gen_yql_python_udf.py

@@ -18,7 +18,7 @@ LIBRA_MODULE(TLibraModule, "Libra@MODULE_NAME@");
 #endif
 
 extern "C" UDF_API void Register(IRegistrator& registrator, ui32 flags) {
-    RegisterYqlPythonUdf(registrator, flags, TStringBuf("@MODULE_NAME@"), TStringBuf("@PACKAGE_NAME@"), EPythonFlavor::@FLAVOR@);
+    RegisterYqlPythonUdf(registrator, flags, TStringBuf("@MODULE_NAME@"), TStringBuf("@PACKAGE_NAME@"), EPythonFlavor::@FLAVOR@); 
 #if @WITH_LIBRA@
     RegisterHelper<TLibraModule>(registrator);
 #endif

+ 13 - 13
build/ymake.core.conf

@@ -410,7 +410,7 @@ when ($USE_ARCADIA_PYTHON == "no") {
 }
 
 # tag:allocator
-DEFAULT_ALLOCATOR=LF
+DEFAULT_ALLOCATOR=LF 
 
 # tag:allocator
 when ($OS_ANDROID == "yes" || $MSVC == "yes") {
@@ -1234,18 +1234,18 @@ module _BASE_UNIT: _BARE_UNIT {
         }
     }
 
-    when ($USE_THINLTO == "yes") {
-        when ($GCC) {
-            CFLAGS+=-flto=thin
-            LDFLAGS+=-flto=thin
-        }
-        when ($CLANG) {
-            CFLAGS+=-flto=thin
-            LDFLAGS+=-flto=thin
-        }
-    }
-
-
+    when ($USE_THINLTO == "yes") { 
+        when ($GCC) { 
+            CFLAGS+=-flto=thin 
+            LDFLAGS+=-flto=thin 
+        } 
+        when ($CLANG) { 
+            CFLAGS+=-flto=thin 
+            LDFLAGS+=-flto=thin 
+        } 
+    } 
+ 
+ 
     when ($CLANG) {
         when ($PGO_ADD == "yes") {
             CFLAGS+=-fprofile-instr-generate

+ 1 - 1
contrib/libs/cctz/tzdata/factory.cpp

@@ -19,7 +19,7 @@ namespace cctz_extension {
 
         public:
             static std::unique_ptr<cctz::ZoneInfoSource> LoadZone(const std::string& zoneName) {
-                TString resourceName = TStringBuilder() << "/cctz/tzdata/"sv << zoneName;
+                TString resourceName = TStringBuilder() << "/cctz/tzdata/"sv << zoneName; 
                 TString tzData;
                 if (!NResource::FindExact(resourceName, &tzData)) {
                     return nullptr;

+ 28 - 28
contrib/libs/zstd/CHANGELOG

@@ -191,37 +191,37 @@ doc : Improved beginner CONTRIBUTING.md docs
 doc : New issue templates for zstd
 
 v1.4.4  (Nov 6, 2019)
-perf: Improved decompression speed, by > 10%, by @terrelln
-perf: Better compression speed when re-using a context, by @felixhandte
-perf: Fix compression ratio when compressing large files with small dictionary, by @senhuang42
-perf: zstd reference encoder can generate RLE blocks, by @bimbashrestha
-perf: minor generic speed optimization, by @davidbolvansky
-api: new ability to extract sequences from the parser for analysis, by @bimbashrestha
-api: fixed decoding of magic-less frames, by @terrelln
-api: fixed ZSTD_initCStream_advanced() performance with fast modes, reported by @QrczakMK
-cli: Named pipes support, by @bimbashrestha
-cli: short tar's extension support, by @stokito
-cli: command --output-dir-flat= , generates target files into requested directory, by @senhuang42
-cli: commands --stream-size=# and --size-hint=#, by @nmagerko
-cli: command --exclude-compressed, by @shashank0791
-cli: faster `-t` test mode
-cli: improved some error messages, by @vangyzen
+perf: Improved decompression speed, by > 10%, by @terrelln 
+perf: Better compression speed when re-using a context, by @felixhandte 
+perf: Fix compression ratio when compressing large files with small dictionary, by @senhuang42 
+perf: zstd reference encoder can generate RLE blocks, by @bimbashrestha 
+perf: minor generic speed optimization, by @davidbolvansky 
+api: new ability to extract sequences from the parser for analysis, by @bimbashrestha 
+api: fixed decoding of magic-less frames, by @terrelln 
+api: fixed ZSTD_initCStream_advanced() performance with fast modes, reported by @QrczakMK 
+cli: Named pipes support, by @bimbashrestha 
+cli: short tar's extension support, by @stokito 
+cli: command --output-dir-flat= , generates target files into requested directory, by @senhuang42 
+cli: commands --stream-size=# and --size-hint=#, by @nmagerko 
+cli: command --exclude-compressed, by @shashank0791 
+cli: faster `-t` test mode 
+cli: improved some error messages, by @vangyzen 
 cli: fix command `-D dictionary` on Windows, reported by @artyompetrov
 cli: fix rare deadlock condition within dictionary builder, by @terrelln
-build: single-file decoder with emscripten compilation script, by @cwoffenden
-build: fixed zlibWrapper compilation on Visual Studio, reported by @bluenlive
-build: fixed deprecation warning for certain gcc version, reported by @jasonma163
-build: fix compilation on old gcc versions, by @cemeyer
-build: improved installation directories for cmake script, by Dmitri Shubin
-pack: modified pkgconfig, for better integration into openwrt, requested by @neheb
-misc: Improved documentation : ZSTD_CLEVEL, DYNAMIC_BMI2, ZSTD_CDict, function deprecation, zstd format
-misc: fixed educational decoder : accept larger literals section, and removed UNALIGNED() macro
-
+build: single-file decoder with emscripten compilation script, by @cwoffenden 
+build: fixed zlibWrapper compilation on Visual Studio, reported by @bluenlive 
+build: fixed deprecation warning for certain gcc version, reported by @jasonma163 
+build: fix compilation on old gcc versions, by @cemeyer 
+build: improved installation directories for cmake script, by Dmitri Shubin 
+pack: modified pkgconfig, for better integration into openwrt, requested by @neheb 
+misc: Improved documentation : ZSTD_CLEVEL, DYNAMIC_BMI2, ZSTD_CDict, function deprecation, zstd format 
+misc: fixed educational decoder : accept larger literals section, and removed UNALIGNED() macro 
+ 
 v1.4.3  (Aug 20, 2019)
-bug: Fix Dictionary Compression Ratio Regression by @cyan4973 (#1709)
-bug: Fix Buffer Overflow in legacy v0.3 decompression by @felixhandte (#1722)
-build: Add support for IAR C/C++ Compiler for Arm by @joseph0918 (#1705)
-
+bug: Fix Dictionary Compression Ratio Regression by @cyan4973 (#1709) 
+bug: Fix Buffer Overflow in legacy v0.3 decompression by @felixhandte (#1722) 
+build: Add support for IAR C/C++ Compiler for Arm by @joseph0918 (#1705) 
+ 
 v1.4.2  (Jul 26, 2019)
 bug: Fix bug in zstd-0.5 decoder by @terrelln (#1696)
 bug: Fix seekable decompression in-memory API by @iburinoc (#1695)

+ 5 - 5
contrib/libs/zstd/README.md

@@ -150,7 +150,7 @@ You can also take a look at [`.travis.yml`](.travis.yml) file for an
 example about how Meson is used to build this project.
 
 Note that default build type is **release**.
-
+ 
 ### VCPKG
 You can build and install zstd [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:
 
@@ -164,18 +164,18 @@ The zstd port in vcpkg is kept up to date by Microsoft team members and communit
 If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
 
 ### Visual Studio (Windows)
-
+ 
 Going into `build` directory, you will find additional possibilities:
 - Projects for Visual Studio 2005, 2008 and 2010.
   + VS2010 project is compatible with VS2012, VS2013, VS2015 and VS2017.
 - Automated build scripts for Visual compiler by [@KrzysFR](https://github.com/KrzysFR), in `build/VS_scripts`,
   which will build `zstd` cli and `libzstd` library without any need to open Visual Studio solution.
-
+ 
 ### Buck
-
+ 
 You can build the zstd binary via buck by executing: `buck build programs:zstd` from the root of the repo.
 The output binary will be in `buck-out/gen/programs/`.
-
+ 
 ## Testing
 
 You can run quick local smoke tests by executing the `playTest.sh` script from the `src/tests` directory.

+ 5 - 5
contrib/libs/zstd/lib/README.md

@@ -179,7 +179,7 @@ The compiled executable will require ZSTD DLL which is available at `dll\libzstd
 
 
 #### Advanced Build options
-
+ 
 The build system requires a hash function in order to
 separate object files created with different compilation flags.
 By default, it tries to use `md5sum` or equivalent.
@@ -199,15 +199,15 @@ In which case, the hash function doesn't matter.
 
 
 #### Deprecated API
-
+ 
 Obsolete API on their way out are stored in directory `lib/deprecated`.
 At this stage, it contains older streaming prototypes, in `lib/deprecated/zbuff.h`.
 These prototypes will be removed in some future version.
 Consider migrating code towards supported streaming API exposed in `zstd.h`.
-
-
+ 
+ 
 #### Miscellaneous
-
+ 
 The other files are not source code. There are :
 
  - `BUCK` : support for `buck` build system (https://buckbuild.com/)

+ 5 - 5
contrib/libs/zstd/lib/common/bitstream.h

@@ -155,9 +155,9 @@ MEM_STATIC unsigned BIT_highbit32 (U32 val)
             }
 #       endif
 #   elif defined(__GNUC__) && (__GNUC__ >= 3)   /* Use GCC Intrinsic */
-        return __builtin_clz (val) ^ 31;
-#   elif defined(__ICCARM__)    /* IAR Intrinsic */
-        return 31 - __CLZ(val);
+        return __builtin_clz (val) ^ 31; 
+#   elif defined(__ICCARM__)    /* IAR Intrinsic */ 
+        return 31 - __CLZ(val); 
 #   else   /* Software version */
         static const unsigned DeBruijnClz[32] = { 0,  9,  1, 10, 13, 21,  2, 29,
                                                  11, 14, 16, 18, 22, 25,  3, 30,
@@ -235,7 +235,7 @@ MEM_STATIC void BIT_flushBitsFast(BIT_CStream_t* bitC)
 {
     size_t const nbBytes = bitC->bitPos >> 3;
     assert(bitC->bitPos < sizeof(bitC->bitContainer) * 8);
-    assert(bitC->ptr <= bitC->endPtr);
+    assert(bitC->ptr <= bitC->endPtr); 
     MEM_writeLEST(bitC->ptr, bitC->bitContainer);
     bitC->ptr += nbBytes;
     bitC->bitPos &= 7;
@@ -251,7 +251,7 @@ MEM_STATIC void BIT_flushBits(BIT_CStream_t* bitC)
 {
     size_t const nbBytes = bitC->bitPos >> 3;
     assert(bitC->bitPos < sizeof(bitC->bitContainer) * 8);
-    assert(bitC->ptr <= bitC->endPtr);
+    assert(bitC->ptr <= bitC->endPtr); 
     MEM_writeLEST(bitC->ptr, bitC->bitContainer);
     bitC->ptr += nbBytes;
     if (bitC->ptr > bitC->endPtr) bitC->ptr = bitC->endPtr;

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