Skip to content

Commit a179c21

Browse files
committed
---
yaml --- r: 339903 b: refs/heads/rxwei-patch-1 c: 20b24c5 h: refs/heads/master i: 339901: 8fbcbe6 339899: 681fa32 339895: 668639b 339887: ffeed6b 339871: 3b14209 339839: 0b8e696
1 parent 90b2489 commit a179c21

File tree

68 files changed

+602
-1412
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+602
-1412
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-08-18-a: b10b1fce14385faa6d44f6b933e95
10151015
refs/heads/rdar-43033749-fix-batch-mode-no-diags-swift-5.0-branch: a14e64eaad30de89f0f5f0b2a782eed7ecdcb255
10161016
refs/heads/revert-19006-error-bridging-integer-type: 8a9065a3696535305ea53fe9b71f91cbe6702019
10171017
refs/heads/revert-19050-revert-19006-error-bridging-integer-type: ecf752d54b05dd0a20f510f0bfa54a3fec3bcaca
1018-
refs/heads/rxwei-patch-1: 44f0e93747901cc14de78ff19325365f2c6afdcb
1018+
refs/heads/rxwei-patch-1: 20b24c54b59b40528be6995b79de2c40e93fbd5a
10191019
refs/heads/shahmishal-patch-1: e58ec0f7488258d42bef51bc3e6d7b3dc74d7b2a
10201020
refs/heads/typelist-existential: 4046359efd541fb5c72d69a92eefc0a784df8f5e
10211021
refs/tags/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-20-a: 4319ba09e4fb8650ee86061075c74a016b6baab9

branches/rxwei-patch-1/benchmark/scripts/compare_perf_tests.py

Lines changed: 51 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,15 @@ def __init__(self, comparator, changes_only,
547547
self.changes_only = changes_only
548548
self.single_table = single_table
549549

550+
MARKDOWN_DETAIL = """
551+
<details {3}>
552+
<summary>{0} ({1})</summary>
553+
{2}
554+
</details>
555+
"""
556+
GIT_DETAIL = """
557+
{0} ({1}): {2}"""
558+
550559
PERFORMANCE_TEST_RESULT_HEADER = ('TEST', 'MIN', 'MAX', 'MEAN', 'MAX_RSS')
551560
RESULT_COMPARISON_HEADER = ('TEST', 'OLD', 'NEW', 'DELTA', 'RATIO')
552561

@@ -580,26 +589,16 @@ def values(result):
580589
def markdown(self):
581590
"""Report results of benchmark comparisons in Markdown format."""
582591
return self._formatted_text(
583-
label_formatter=lambda s: ('**' + s + '**'),
584-
COLUMN_SEPARATOR=' | ',
585-
DELIMITER_ROW=([':---'] + ['---:'] * 4),
586-
SEPARATOR='&nbsp; | | | | \n',
587-
SECTION="""
588-
<details {3}>
589-
<summary>{0} ({1})</summary>
590-
{2}
591-
</details>
592-
""")
592+
ROW='{0} | {1} | {2} | {3} | {4} \n',
593+
HEADER_SEPARATOR='---',
594+
DETAIL=self.MARKDOWN_DETAIL)
593595

594596
def git(self):
595597
"""Report results of benchmark comparisons in 'git' format."""
596598
return self._formatted_text(
597-
label_formatter=lambda s: s.upper(),
598-
COLUMN_SEPARATOR=' ',
599-
DELIMITER_ROW=None,
600-
SEPARATOR='\n',
601-
SECTION="""
602-
{0} ({1}): \n{2}""")
599+
ROW='{0} {1} {2} {3} {4} \n',
600+
HEADER_SEPARATOR=' ',
601+
DETAIL=self.GIT_DETAIL)
603602

604603
def _column_widths(self):
605604
changed = self.comparator.decreased + self.comparator.increased
@@ -615,49 +614,53 @@ def _column_widths(self):
615614
]
616615

617616
def max_widths(maximum, widths):
618-
return map(max, zip(maximum, widths))
617+
return tuple(map(max, zip(maximum, widths)))
619618

620-
return reduce(max_widths, widths, [0] * 5)
619+
return reduce(max_widths, widths, tuple([0] * 5))
621620

622-
def _formatted_text(self, label_formatter, COLUMN_SEPARATOR,
623-
DELIMITER_ROW, SEPARATOR, SECTION):
621+
def _formatted_text(self, ROW, HEADER_SEPARATOR, DETAIL):
624622
widths = self._column_widths()
625623
self.header_printed = False
626624

627625
def justify_columns(contents):
628-
return [c.ljust(w) for w, c in zip(widths, contents)]
626+
return tuple([c.ljust(w) for w, c in zip(widths, contents)])
629627

630628
def row(contents):
631-
return ('' if not contents else
632-
COLUMN_SEPARATOR.join(justify_columns(contents)) + '\n')
633-
634-
def header(title, column_labels):
635-
labels = (column_labels if not self.single_table else
636-
map(label_formatter, (title, ) + column_labels[1:]))
637-
h = (('' if not self.header_printed else SEPARATOR) +
638-
row(labels) +
639-
(row(DELIMITER_ROW) if not self.header_printed else ''))
640-
if self.single_table and not self.header_printed:
641-
self.header_printed = True
642-
return h
643-
644-
def format_columns(r, is_strong):
645-
return (r if not is_strong else
646-
r[:-1] + ('**' + r[-1] + '**', ))
629+
return ROW.format(*justify_columns(contents))
630+
631+
def header(header):
632+
return '\n' + row(header) + row(tuple([HEADER_SEPARATOR] * 5))
633+
634+
def format_columns(r, strong):
635+
return (r if not strong else
636+
r[:-1] + ('**{0}**'.format(r[-1]), ))
647637

648638
def table(title, results, is_strong=False, is_open=False):
649-
if not results:
639+
rows = [
640+
row(format_columns(ReportFormatter.values(r), is_strong))
641+
for r in results
642+
]
643+
if not rows:
650644
return ''
651-
rows = [row(format_columns(ReportFormatter.values(r), is_strong))
652-
for r in results]
653-
table = (header(title if self.single_table else '',
654-
ReportFormatter.header_for(results[0])) +
655-
''.join(rows))
656-
return (table if self.single_table else
657-
SECTION.format(
658-
title, len(results), table, 'open' if is_open else ''))
659-
660-
return '\n' + ''.join([
645+
646+
if self.single_table:
647+
t = ''
648+
if not self.header_printed:
649+
t += header(ReportFormatter.header_for(results[0]))
650+
self.header_printed = True
651+
t += row(('**' + title + '**', '', '', '', ''))
652+
t += ''.join(rows)
653+
return t
654+
655+
return DETAIL.format(
656+
*[
657+
title, len(results),
658+
(header(ReportFormatter.header_for(results[0])) +
659+
''.join(rows)),
660+
('open' if is_open else '')
661+
])
662+
663+
return ''.join([
661664
table('Regression', self.comparator.decreased, True, True),
662665
table('Improvement', self.comparator.increased, True),
663666
('' if self.changes_only else

branches/rxwei-patch-1/benchmark/scripts/run_smoke_bench

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def main():
8888
help='In addition to stdout, write the results into a markdown file')
8989
argparser.add_argument(
9090
'-threshold', type=float,
91-
help='The performance threshold in %% which triggers a re-run',
91+
help='The performance threshold in % which triggers a re-run',
9292
default=5)
9393
argparser.add_argument(
9494
'-num-samples', type=int,

branches/rxwei-patch-1/benchmark/scripts/test_compare_perf_tests.py

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ def test_column_headers(self):
759759
)
760760
self.assert_markdown_contains([
761761
'TEST | OLD | NEW | DELTA | RATIO',
762-
':--- | ---: | ---: | ---: | ---: ',
762+
'--- | --- | --- | --- | --- ',
763763
'TEST | MIN | MAX | MEAN | MAX_RSS'])
764764
self.assert_git_contains([
765765
'TEST OLD NEW DELTA RATIO',
@@ -855,36 +855,6 @@ def test_report_only_changes(self):
855855
self.assertNotIn('No Changes', html)
856856
self.assertNotIn('AngryPhonebook', html)
857857

858-
def test_single_table_report(self):
859-
"""Single table report has inline headers and no elaborate sections."""
860-
self.tc.removed = [] # test handling empty section
861-
rf = ReportFormatter(self.tc, changes_only=True, single_table=True)
862-
markdown = rf.markdown()
863-
self.assertNotIn('<details', markdown) # no sections
864-
self.assertNotIn('\n\n', markdown) # table must not be broken
865-
self.assertNotIn('Removed', markdown)
866-
self.assert_report_contains([
867-
'\n**Regression** ',
868-
'| **OLD**', '| **NEW**', '| **DELTA**', '| **RATIO**',
869-
'\n**Added** ',
870-
'| **MIN**', '| **MAX**', '| **MEAN**', '| **MAX_RSS**'
871-
], markdown)
872-
# Single delimiter row:
873-
self.assertIn('\n:---', markdown) # first column is left aligned
874-
self.assertEqual(markdown.count('| ---:'), 4) # other, right aligned
875-
# Separator before every inline header (new section):
876-
self.assertEqual(markdown.count('&nbsp; | | | | '), 2)
877-
878-
git = rf.git()
879-
self.assertNotIn('): \n', git) # no sections
880-
self.assertNotIn('REMOVED', git)
881-
self.assert_report_contains([
882-
'\nREGRESSION ', ' OLD ', ' NEW ', ' DELTA ', ' RATIO ',
883-
'\n\nADDED ', ' MIN ', ' MAX ', ' MEAN ', ' MAX_RSS '
884-
], git)
885-
# Separator before every inline header (new section):
886-
self.assertEqual(git.count('\n\n'), 2)
887-
888858

889859
class Test_parse_args(unittest.TestCase):
890860
required = ['--old-file', 'old.log', '--new-file', 'new.log']

branches/rxwei-patch-1/include/swift/ABI/Metadata.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3121,6 +3121,10 @@ struct MetadataCompletionContext {
31213121
/// it may be called many times as successive dependencies are resolved.
31223122
/// If the function ever completes successfully (by returning null), it
31233123
/// will not be called again for the same type.
3124+
///
3125+
/// \return null to indicate that the type has been completed, or a non-null
3126+
/// pointer to indicate that completion is blocked on the completion of
3127+
/// some other type
31243128
using MetadataCompleter =
31253129
SWIFT_CC(swift)
31263130
MetadataDependency(const Metadata *type,

branches/rxwei-patch-1/include/swift/AST/DiagnosticsParse.def

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ ERROR(extra_tokens_conditional_compilation_directive,none,
6868
"extra tokens following conditional compilation directive", ())
6969
ERROR(unexpected_rbrace_in_conditional_compilation_block,none,
7070
"unexpected '}' in conditional compilation block", ())
71-
ERROR(unexpected_if_following_else_compilation_directive,none,
72-
"unexpected 'if' keyword following '#else' conditional compilation "
73-
"directive; did you mean '#elseif'?",
74-
())
7571

7672
ERROR(pound_diagnostic_expected_string,none,
7773
"expected string literal in %select{#warning|#error}0 directive",(bool))

branches/rxwei-patch-1/include/swift/IDE/DigesterEnums.def

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ KEY_BOOL(HasDidset, hasDidset)
135135
KEY_BOOL(HasWillset, hasWillset)
136136
KEY_BOOL(ReqNewWitnessTableEntry, reqNewWitnessTableEntry)
137137
KEY_BOOL(IsABIPlaceholder, isABIPlaceholder)
138-
KEY_BOOL(IsExternal, isExternal)
139138

140139
KEY(kind)
141140

@@ -149,11 +148,6 @@ KEY_STRING(EnumRawTypeName, enumRawTypeName)
149148
KEY_STRING(GenericSig, genericSig)
150149
KEY_STRING(FuncSelfKind, funcSelfKind)
151150
KEY_STRING(ParamValueOwnership, paramValueOwnership)
152-
KEY_STRING(IntromacOS, intro_Macosx)
153-
KEY_STRING(IntroiOS, intro_iOS)
154-
KEY_STRING(IntrotvOS, intro_tvOS)
155-
KEY_STRING(IntrowatchOS, intro_watchOS)
156-
KEY_STRING(Introswift, intro_swift)
157151

158152
KEY_STRING_ARR(SuperclassNames, superclassNames)
159153

branches/rxwei-patch-1/include/swift/Runtime/Metadata.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ const
271271

272272
/// True if two context descriptors in the currently running program describe
273273
/// the same context.
274+
SWIFT_RUNTIME_EXPORT
274275
bool equalContexts(const ContextDescriptor *a, const ContextDescriptor *b);
275276

276277
/// Compute the bounds of class metadata with a resilient superclass.

branches/rxwei-patch-1/lib/IRGen/GenDecl.cpp

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,25 +1316,6 @@ static std::string getDynamicReplacementSection(IRGenModule &IGM) {
13161316
return sectionName;
13171317
}
13181318

1319-
static std::string getDynamicReplacementSomeSection(IRGenModule &IGM) {
1320-
std::string sectionName;
1321-
switch (IGM.TargetInfo.OutputObjectFormat) {
1322-
case llvm::Triple::UnknownObjectFormat:
1323-
llvm_unreachable("Don't know how to emit field records table for "
1324-
"the selected object format.");
1325-
case llvm::Triple::MachO:
1326-
sectionName = "__TEXT, __swift5_replac2, regular, no_dead_strip";
1327-
break;
1328-
case llvm::Triple::ELF:
1329-
case llvm::Triple::Wasm:
1330-
sectionName = "swift5_replac2";
1331-
break;
1332-
case llvm::Triple::COFF:
1333-
sectionName = ".sw5reps$B";
1334-
break;
1335-
}
1336-
return sectionName;
1337-
}
13381319
llvm::GlobalVariable *IRGenModule::getGlobalForDynamicallyReplaceableThunk(
13391320
LinkEntity &entity, llvm::Type *type, ForDefinition_t forDefinition) {
13401321
return cast<llvm::GlobalVariable>(
@@ -1488,41 +1469,6 @@ void IRGenerator::emitDynamicReplacements() {
14881469
/*isConstant*/ true, llvm::GlobalValue::PrivateLinkage);
14891470
autoReplVar->setSection(getDynamicReplacementSection(IGM));
14901471
IGM.addUsedGlobal(autoReplVar);
1491-
1492-
if (origFuncTypes.empty())
1493-
return;
1494-
// Emit records for replacing opaque type descriptor for some types.
1495-
// struct AutomaticReplacementsSome {
1496-
// uint32t flags; // unused
1497-
// uint32t numReplacements;
1498-
// struct Entry {
1499-
// RelativeIndirectablePointer<OpaqueTypeDescriptor*> orig;
1500-
// RelativeDirectPointer<OpaqueTypeDescriptor*> replacement;
1501-
// uint32_t flags; // unused.
1502-
// }[numEntries]
1503-
// };
1504-
auto autoReplacementsSome = builder.beginStruct();
1505-
autoReplacementsSome.addInt32(0); // unused flags.
1506-
autoReplacementsSome.addInt32(
1507-
origFuncTypes.size()); // number of replacement entries.
1508-
auto someReplacementsArray = autoReplacementsSome.beginArray();
1509-
for (auto i : indices(origFuncTypes)) {
1510-
auto origDesc =
1511-
LinkEntity::forOpaqueTypeDescriptor(origFuncTypes[i]->getDecl());
1512-
auto replDesc =
1513-
LinkEntity::forOpaqueTypeDescriptor(newFuncTypes[i]->getDecl());
1514-
auto replacement = someReplacementsArray.beginStruct();
1515-
replacement.addRelativeAddress(
1516-
IGM.getAddrOfLLVMVariableOrGOTEquivalent(origDesc));
1517-
replacement.addRelativeAddress(
1518-
IGM.getAddrOfLLVMVariableOrGOTEquivalent(replDesc));
1519-
replacement.finishAndAddTo(someReplacementsArray);
1520-
}
1521-
someReplacementsArray.finishAndAddTo(autoReplacementsSome);
1522-
auto autoReplVar2 = autoReplacementsSome.finishAndCreateGlobal(
1523-
"\x01l_auto_dynamic_replacements_some", IGM.getPointerAlignment(),
1524-
/*isConstant*/ true, llvm::GlobalValue::PrivateLinkage);
1525-
autoReplVar2->setSection(getDynamicReplacementSomeSection(IGM));
15261472
}
15271473

15281474
void IRGenerator::emitEagerClassInitialization() {

0 commit comments

Comments
 (0)