Browse Source

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

mvel 3 years ago
parent
commit
bd30392c4c

+ 15 - 15
build/plugins/split_codegen.py

@@ -1,11 +1,11 @@
 from _common import sort_by_keywords
 
-# This hard-coded many times in CppParts in various codegens
-_DEFAULT_CPP_PARTS = 20
-# See TCodegenParams::MethodStream usage in factor codegen
-_ADDITIONAL_STREAM_COUNT = 5
-
+# This hard-coded many times in CppParts in various codegens 
+_DEFAULT_CPP_PARTS = 20 
+# See TCodegenParams::MethodStream usage in factor codegen 
+_ADDITIONAL_STREAM_COUNT = 5 
 
+ 
 def onsplit_codegen(unit, *args):
     '''
         @usage: SPLIT_CODEGEN(tool prefix opts... [OUT_NUM num] [OUTPUT_INCLUDES output_includes...])
@@ -19,10 +19,10 @@ def onsplit_codegen(unit, *args):
     keywords = {"OUT_NUM": 1}
     flat_args, spec_args = sort_by_keywords(keywords, args)
 
-    num_outputs = _DEFAULT_CPP_PARTS + _ADDITIONAL_STREAM_COUNT
-    if "OUT_NUM" in spec_args:
-        num_outputs = int(spec_args["OUT_NUM"][0])
-
+    num_outputs = _DEFAULT_CPP_PARTS + _ADDITIONAL_STREAM_COUNT 
+    if "OUT_NUM" in spec_args: 
+        num_outputs = int(spec_args["OUT_NUM"][0]) 
+ 
     tool = flat_args[0]
     prefix = flat_args[1]
 
@@ -30,14 +30,14 @@ def onsplit_codegen(unit, *args):
     for num in range(num_outputs):
         cmd.append('{}.{}.cpp'.format(prefix, num))
 
-    cpp_parts = int(num_outputs) - _ADDITIONAL_STREAM_COUNT
-    cpp_parts_args = ['--cpp-parts', str(cpp_parts)]
-
+    cpp_parts = int(num_outputs) - _ADDITIONAL_STREAM_COUNT 
+    cpp_parts_args = ['--cpp-parts', str(cpp_parts)] 
+ 
     if len(flat_args) > 2:
         if flat_args[2] != 'OUTPUT_INCLUDES':
             cmd.append('OPTS')
-        cmd += cpp_parts_args + flat_args[2:]
-    else:
-        cmd += ['OPTS'] + cpp_parts_args
+        cmd += cpp_parts_args + flat_args[2:] 
+    else: 
+        cmd += ['OPTS'] + cpp_parts_args 
 
     unit.on_split_codegen_base(cmd)

+ 46 - 46
build/ya.conf.json

@@ -460,9 +460,9 @@
         "iceflame": {
             "description": "Performance data collection and analysis"
         },
-        "cs": {
-            "description": "Fast CodeSearch CLI tool"
-        },
+        "cs": { 
+            "description": "Fast CodeSearch CLI tool" 
+        }, 
         "wall-e": {
             "description": "Client for Wall-E"
         },
@@ -3508,13 +3508,13 @@
                 }
             ]
         },
-        "ag": {
-            "tools": {
+        "ag": { 
+            "tools": { 
                 "ag": {
                     "bottle": "ag",
                     "executable": "ag"
                 }
-            },
+            }, 
             "platforms": [
                 {
                     "host": {
@@ -3523,7 +3523,7 @@
                     "default": true
                 }
             ]
-        },
+        }, 
         "yf": {
             "tools": {
                 "yf": {
@@ -5578,28 +5578,28 @@
                 }
             ]
         },
-        "cs": {
-            "tools": {
-                "cs": {
-                    "bottle": "cs",
-                    "executable": "cs"
-                }
-            },
-            "platforms": [
-                {
-                    "host": {
-                        "os": "LINUX"
-                    },
-                    "default": true
-                },
-                {
-                    "host": {
-                        "os": "DARWIN"
-                    },
-                    "default": true
-                }
-            ]
-        },
+        "cs": { 
+            "tools": { 
+                "cs": { 
+                    "bottle": "cs", 
+                    "executable": "cs" 
+                } 
+            }, 
+            "platforms": [ 
+                { 
+                    "host": { 
+                        "os": "LINUX" 
+                    }, 
+                    "default": true 
+                }, 
+                { 
+                    "host": { 
+                        "os": "DARWIN" 
+                    }, 
+                    "default": true 
+                } 
+            ] 
+        }, 
         "wall-e": {
             "tools": {
                 "wall-e": {
@@ -6768,17 +6768,17 @@
                 ]
             }
         },
-        "ag": {
-            "formula": {
+        "ag": { 
+            "formula": { 
                 "sandbox_id": 75851513,
-                "match": "Ag"
-            },
-            "executable": {
+                "match": "Ag" 
+            }, 
+            "executable": { 
                 "ag": [
                     "ag"
                 ]
-            }
-        },
+            } 
+        }, 
         "valgrind": {
             "formula": {
                 "sandbox_id": 944969271,
@@ -7885,17 +7885,17 @@
                 ]
             }
         },
-        "cs": {
-            "formula": {
+        "cs": { 
+            "formula": { 
                 "sandbox_id": 1206856496,
-                "match": "cs"
-            },
-            "executable": {
-                "cs": [
-                    "cs"
-                ]
-            }
-        },
+                "match": "cs" 
+            }, 
+            "executable": { 
+                "cs": [ 
+                    "cs" 
+                ] 
+            } 
+        }, 
         "wall-e": {
             "formula": {
                 "sandbox_id": 1085675590,

+ 5 - 5
build/ymake.core.conf

@@ -297,7 +297,7 @@ USE_VANILLA_PROTOC=no
 FML_TOOL=${tool:"tools/relev_fml_codegen"}
 FML_UNUSED_TOOL=${tool:"tools/relev_fml_unused"}
 LUA_TOOL=${tool:"tools/lua"}
-ENUM_PARSER_TOOL=${tool:"tools/enum_parser/enum_parser"}
+ENUM_PARSER_TOOL=${tool:"tools/enum_parser/enum_parser"} 
 
 # tag:python-specific tag:cython-specific
 CYTHON_SCRIPT=${input:"${ARCADIA_ROOT}/contrib/tools/cython/cython.py"}
@@ -5375,7 +5375,7 @@ when ($STRIP_DEBUG_INFO) {
 ### @usage: SPLIT_DWARF()
 ###
 ### Emit debug info for the PROGRAM/DLL as a separate file <module_name>.debug.
-### NB: It does not help you to save process RSS but can add problems (see e.g. BEGEMOT-2147).
+### NB: It does not help you to save process RSS but can add problems (see e.g. BEGEMOT-2147). 
 macro SPLIT_DWARF() {
     SET(SPLIT_DWARF_VALUE yes)
 }
@@ -6506,8 +6506,8 @@ macro CONFIGURE_FILE(Src, Dst) {
 ### Generator ${prefix}.cpp + ${prefix}.h files based on ${prefix}.in.
 macro BASE_CODEGEN(Tool, Prefix, Opts...) {
     .CMD=${tool:Tool} ${input:Prefix.in} ${output;nopath;noauto:Prefix.cpp} ${output;nopath:Prefix.h} $Opts ${kv;hide:"p BC"} ${kv;hide:"pc yellow"}
-}
-
+} 
+ 
 # tag:internal
 ### @usage: _SPLIT_CODEGEN_BASE(tool prefix OUTS[] OUTPUT_INCLUDES[]) # internal
 ###
@@ -6803,7 +6803,7 @@ macro _MX_GEN_TABLE(Srcs...) {
 }
 
 RELEV_FML_CODEGEN_INCLS=${output_include;hide:"kernel/relevfml/relev_fml.h"} ${output_include;hide:"library/cpp/sse/sse.h"}
-
+ 
 ### @usage: GENERATE_ENUM_SERIALIZATION(File.h)
 ###
 ### Create serialization support for enumeration members defined in the header (String <-> Enum conversions) and compile it into the module.

+ 2 - 2
contrib/README.md

@@ -58,8 +58,8 @@ Happy Path для пользователя, которому понадобил
 
 [Arcadia WG](https://abc.yandex-team.ru/services/arcadia-wg/) привлекается профильными комитетами для обсуждения сложных случаев (есть сомнения, проблемы с лицензиями).
 
-Ограничения использования библиотек контролируется [макросами управления лицензиями](https://docs.yandex-team.ru/ya-make/general/rules#licenzii).
-
+Ограничения использования библиотек контролируется [макросами управления лицензиями](https://docs.yandex-team.ru/ya-make/general/rules#licenzii). 
+ 
 Итого, процесс состоит из этапов:
 
 * Подтверждение от языкового комитета (1)

+ 12 - 12
contrib/libs/pire/pire/encoding.cpp

@@ -11,7 +11,7 @@
  * it under the terms of the GNU Lesser Public License as published by
  * the Free Software Foundation, either version 3 of the License, or
  * (at your option) any later version.
- *
+ * 
  * Pire is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -39,8 +39,8 @@ namespace {
 
 	class Latin1: public Encoding {
 	public:
-		Latin1() : Encoding() {}
-
+		Latin1() : Encoding() {} 
+ 
 		wchar32 FromLocal(const char*& begin, const char* end) const
 		{
 			if (begin == end)
@@ -61,7 +61,7 @@ namespace {
 
 		void AppendDot(Fsm& fsm) const { fsm.AppendDot(); }
 	};
-
+ 
 	namespace UtfRanges {
 
 		static const size_t MaxLen = 4;
@@ -74,11 +74,11 @@ namespace {
 		static const size_t Next[2] = {0x80, 0xC0};
 	}
 
-
+ 
 	class Utf8: public Encoding {
 	public:
-		Utf8() : Encoding() {}
-
+		Utf8() : Encoding() {} 
+ 
 		wchar32 FromLocal(const char*& begin, const char* end) const
 		{
 			wchar32 rune;
@@ -117,16 +117,16 @@ namespace {
 
 namespace Encodings {
 
-	const Encoding& Utf8()
+	const Encoding& Utf8() 
 	{
 		static const Pire::Utf8 utf8;
-		return utf8;
+		return utf8; 
 	}
 
-	const Encoding& Latin1()
+	const Encoding& Latin1() 
 	{
-		static const Pire::Latin1 latin1;
-		return latin1;
+		static const Pire::Latin1 latin1; 
+		return latin1; 
 	}
 
 }

+ 1 - 1
contrib/libs/ya.make

@@ -107,7 +107,7 @@ RECURSE(
     hwloc
     hyperscan
     i18n
-    i18n/ut
+    i18n/ut 
     icu
     ImageMagick
     inja

+ 15 - 15
contrib/restricted/boost/README.md

@@ -1,15 +1,15 @@
-Ограничения при использовании библиотеки boost в Аркадии
-========================================================
-
-1. Старые проекты извне аркадии могут использовать `boost`
-2. Можно использовать `boost`, когда нет альтернативы (внутренней или внешней).
-   Если хочется использовать boost, заведите тикет в очереди CONTRIB [1],
-   обоснуйте в нём необходимость и получите OK от Комитета CONTRIB [2].
-3. Можно использовать `boost` по зависимостям от `contrib/`. В `library/` нельзя.
-   Есть единственное исключение в `library/`, но это недоработка того,
-   что никак не положат новую версию `hyperscan`: IGNIETFERRO-588 [3]
-4. Рекомендуется прятать в `.cpp`, чтобы не светилось в заголовках.
-
-[1] https://st.yandex-team.ru/CONTRIB
-[2] https://wiki.yandex-team.ru/arcadia/faq/add-to-contrib-howto/
-[3] https://st.yandex-team.ru/IGNIETFERRO-588
+Ограничения при использовании библиотеки boost в Аркадии 
+======================================================== 
+ 
+1. Старые проекты извне аркадии могут использовать `boost` 
+2. Можно использовать `boost`, когда нет альтернативы (внутренней или внешней). 
+   Если хочется использовать boost, заведите тикет в очереди CONTRIB [1], 
+   обоснуйте в нём необходимость и получите OK от Комитета CONTRIB [2]. 
+3. Можно использовать `boost` по зависимостям от `contrib/`. В `library/` нельзя. 
+   Есть единственное исключение в `library/`, но это недоработка того, 
+   что никак не положат новую версию `hyperscan`: IGNIETFERRO-588 [3] 
+4. Рекомендуется прятать в `.cpp`, чтобы не светилось в заголовках. 
+ 
+[1] https://st.yandex-team.ru/CONTRIB 
+[2] https://wiki.yandex-team.ru/arcadia/faq/add-to-contrib-howto/ 
+[3] https://st.yandex-team.ru/IGNIETFERRO-588 

+ 1 - 1
contrib/tools/ragel6/parsedata.cpp

@@ -115,7 +115,7 @@ Key makeFsmKeyHex( char *str, const InputLoc &loc, ParseData *pd )
 	}
 
 	if ( unusedBits && keyOps->alphType->isSigned && ul >> (size * 8 - 1) )
-		ul |= ( (unsigned long)(-1L) >> (size*8) ) << (size*8);
+		ul |= ( (unsigned long)(-1L) >> (size*8) ) << (size*8); 
 
 	return Key( (long)ul );
 }

+ 5 - 5
library/README.md

@@ -1,20 +1,20 @@
 library
 ===
 `library/` is a directory with reusable libraries. Common ideas (with [key words](https://tools.ietf.org/html/rfc2119)):
-
+ 
 1. Libraries are categorized by the languages in which they will be used.
     Bindings **MUST** be put in `<language>` directory.
-
+ 
 2. Grouping by any other criteria **SHOULD** be defined by the language committee in `<language>` directory.
-
+ 
 3. The library **SHOULD** be in use in at least two projects.
     
     If you are not sure if you should put some library in `library/`, please contact `<language>` committee or arcadia-wg@yandex-team.ru.
-
+ 
 4. The library **SHOULD** be portable.
 
     Please contact `<language>` committee if you cannot provide usage on all platforms: `linux`, `darwin`, `windows`.
-
+ 
 5. The library **MUST** depend only on a limited list of external components
     (currently it is `util/`, `contrib/`, `vendor/`, `library/`).
 

+ 13 - 13
library/cpp/balloc/balloc.cpp

@@ -200,12 +200,12 @@ void operator delete[](void* p, const std::nothrow_t&) OP_THROWNOTHING {
 #endif
 }
 
-extern "C" void* calloc(size_t n, size_t elemSize) {
-    const size_t size = n * elemSize;
+extern "C" void* calloc(size_t n, size_t elemSize) { 
+    const size_t size = n * elemSize; 
 
-    if (elemSize != 0 && size / elemSize != n) {
-        return nullptr;
-    }
+    if (elemSize != 0 && size / elemSize != n) { 
+        return nullptr; 
+    } 
 
 #if defined(Y_COVER_PTR)
     void* result = malloc(size);
@@ -213,7 +213,7 @@ extern "C" void* calloc(size_t n, size_t elemSize) {
     void* result = NBalloc::Malloc(size);
 #endif
 
-    if (result) {
+    if (result) { 
         memset(result, 0, size);
     }
 
@@ -231,19 +231,19 @@ extern "C" void cfree(void* ptr) {
 #if defined(Y_COVER_PTR)
 static inline void* DoRealloc(void* oldPtr, size_t newSize) {
 #else
-extern "C" void* realloc(void* oldPtr, size_t newSize) {
+extern "C" void* realloc(void* oldPtr, size_t newSize) { 
 #endif
-    if (!oldPtr) {
+    if (!oldPtr) { 
         void* result = NBalloc::Malloc(newSize);
         return result;
     }
     if (newSize == 0) {
         NBalloc::Free(oldPtr);
-        return nullptr;
+        return nullptr; 
     }
     void* newPtr = NBalloc::Malloc(newSize);
-    if (!newPtr) {
-        return nullptr;
+    if (!newPtr) { 
+        return nullptr; 
     }
     NBalloc::TAllocHeader* header = (NBalloc::TAllocHeader*)oldPtr - 1;
     const size_t oldSize = header->AllocSize & ~NBalloc::SIGNATURE_MASK;
@@ -253,8 +253,8 @@ extern "C" void* realloc(void* oldPtr, size_t newSize) {
         NBalloc::Free(oldPtr);
         return newPtr;
     }
-    NMalloc::AbortFromCorruptedAllocator();
-    return nullptr;
+    NMalloc::AbortFromCorruptedAllocator(); 
+    return nullptr; 
 }
 
 #if defined(Y_COVER_PTR)

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