Skip to content

Commit 653b703

Browse files
committed
Version 1.19.0-dev.0.0
Merge 9d5fd9d into dev
2 parents 9fff9a1 + 9d5fd9d commit 653b703

File tree

683 files changed

+26121
-8746
lines changed

Some content is hidden

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

683 files changed

+26121
-8746
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 1.18.0
1+
## 1.18.0 - 2016-07-27
22

33
### Core library changes
44

DEPS

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ vars = {
5656
"dart_services_rev" : "@7aea2574e6f3924bf409a80afb8ad52aa2be4f97",
5757
"dart_style_tag": "@0.2.4",
5858
"dartdoc_tag" : "@v0.9.6+2",
59-
"dev_compiler_rev": "@7e9708eb5e9f3fcdc68b9af039d78cf39ce502b7",
59+
"dev_compiler_rev": "@108f2a2a03b1926e640013f3244df625b42ec380",
6060
"fixnum_tag": "@0.10.5",
6161
"func_rev": "@8d4aea75c21be2179cb00dc2b94a71414653094e",
6262
"glob_rev": "@704cf75e4f26b417505c5c611bdaacd8808467dd",
@@ -68,6 +68,7 @@ vars = {
6868
"idl_parser_rev": "@7fbe68cab90c38147dee4f48c30ad0d496c17915",
6969
"initialize_rev": "@595d501a92c3716395ad2d81f9aabdb9f90879b6",
7070
"intl_tag": "@0.13.0",
71+
"isolate_tag": "@0.2.2",
7172
"jinja2_rev": "@2222b31554f03e62600cd7e383376a7c187967a1",
7273
"json_rpc_2_tag": "@2.0.0",
7374
"linter_rev": "@7ca3aab6ca45b988440e425c187993a533fbe27e",
@@ -92,7 +93,7 @@ vars = {
9293
"quiver_tag": "@0.21.4",
9394
"resource_rev":"@a49101ba2deb29c728acba6fb86000a8f730f4b1",
9495
"root_certificates_rev": "@aed07942ce98507d2be28cbd29e879525410c7fc",
95-
"scheduled_test_tag": "@0.12.5+2",
96+
"scheduled_test_tag": "@0.12.6",
9697
"shelf_static_tag": "@0.2.3+4",
9798
"shelf_tag": "@0.6.5+2",
9899
"shelf_web_socket_tag": "@0.2.0",
@@ -106,7 +107,7 @@ vars = {
106107
"string_scanner_tag": "@0.1.4",
107108
"sunflower_rev": "@879b704933413414679396b129f5dfa96f7a0b1e",
108109
"test_reflective_loader_tag": "@0.0.3",
109-
"test_tag": "@0.12.13+5",
110+
"test_tag": "@0.12.15+1",
110111
"typed_data_tag": "@1.1.2",
111112
"usage_rev": "@b5080dac0d26a5609b266f8fdb0d053bc4c1c638",
112113
"utf_rev": "@1f55027068759e2d52f2c12de6a57cce5f3c5ee6",
@@ -222,6 +223,8 @@ deps = {
222223
(Var("github_dartlang") % "initialize") + Var("initialize_rev"),
223224
Var("dart_root") + "/third_party/pkg/intl":
224225
(Var("github_mirror") % "intl") + Var("intl_tag"),
226+
Var("dart_root") + "/third_party/pkg/isolate":
227+
(Var("github_dartlang") % "isolate") + Var("isolate_tag"),
225228
Var("dart_root") + "/third_party/pkg/json_rpc_2":
226229
(Var("github_mirror") % "json_rpc_2") + Var("json_rpc_2_tag"),
227230
Var("dart_root") + "/third_party/pkg/linter":

README.fuchsia

Lines changed: 0 additions & 41 deletions
This file was deleted.

dart.gyp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@
3434
'runtime/dart-runtime.gyp:sample_extension',
3535
],
3636
},
37-
{
38-
'target_name': 'fuchsia_test',
39-
'type': 'none',
40-
'dependencies': [
41-
'runtime/dart-runtime.gyp:fuchsia_test',
42-
],
43-
},
4437
{
4538
# This is the target that is built on the VM build bots. It
4639
# must depend on anything that is required by the VM test

docs/language/dartLangSpec.tex

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -655,9 +655,11 @@ \subsection{Formal Parameters}
655655
It is a compile-time error if a formal parameter is declared as a constant variable (\ref{variables}).
656656

657657
\begin{grammar}
658-
{\bf formalParameterList:}`(' `)';
659-
`(' normalFormalParameters ( `,' optionalFormalParameters)? `)';
660-
`(' optionalFormalParameters `)'
658+
{\bf formalParameterList:}
659+
`(' `)';
660+
`(' normalFormalParameters `,'? `)';
661+
`(' normalFormalParameters `,' optionalFormalParameters `)';
662+
`(' optionalFormalParameters `)'
661663
.
662664
%\end{grammar}
663665
%}
@@ -673,18 +675,21 @@ \subsection{Formal Parameters}
673675
normalFormalParameter (`,' normalFormalParameter)*
674676
.
675677

676-
{\bf optionalFormalParameters:}optionalPositionalFormalParameters;
678+
{\bf optionalFormalParameters:}
679+
optionalPositionalFormalParameters;
677680
namedFormalParameters
678681
.
679682

680683
{\bf optionalPositionalFormalParameters:}
681-
`[' defaultFormalParameter (`,' defaultFormalParameter)* `]'
684+
`[' defaultFormalParameter (`,' defaultFormalParameter)* `,'? `]'
682685
.
683686
{\bf namedFormalParameters:}
684-
`\{' defaultNamedParameter (`,' defaultNamedParameter)* `\}'
687+
`\{' defaultNamedParameter (`,' defaultNamedParameter)* `,'? `\}'
685688
.
686689
\end{grammar}
687690

691+
Formal parameter lists allow an optional trailing comma after the last parameter ($`,'?$). A parameter list with such a trailing comma is equivalent in all ways to the same parameter list without the trailing comma. All parameter lists in this specification are shown without a trailing comma, but the rules and semantics apply equally to the corresponding parameter list with a trailing comma.
692+
688693
%Formal parameters are always \FINAL{}.
689694
%\Q{We're awaiting some data on whether enforcing this would cause widespread pain.}
690695
%A formal parameter is always considered to be initialized. \rationale{This is because it will always be initialized by the call - even if it is optional.}
@@ -3608,10 +3613,11 @@ \subsubsection{ Actual Argument List Evaluation}
36083613

36093614
\begin{grammar}
36103615
{\bf arguments:}
3611-
`(' argumentList? `)'
3616+
`(' (argumentList `,'?)? `)'
36123617
.
36133618

3614-
{\bf argumentList:}namedArgument (`,' namedArgument)*;
3619+
{\bf argumentList:}
3620+
namedArgument (`,' namedArgument)*;
36153621
% expressionList ',' spreadArgument;
36163622
expressionList (`,' namedArgument)*
36173623
% spreadArgument
@@ -3622,6 +3628,8 @@ \subsubsection{ Actual Argument List Evaluation}
36223628
.
36233629
\end{grammar}
36243630

3631+
Argument lists allow an optional trailing comma after the last argument ($`,'?$). An argument list with such a trailing comma is equivalent in all ways to the same parameter list without the trailing comma. All argument lists in this specification are shown without a trailing comma, but the rules and semantics apply equally to the corresponding argument list with a trailing comma.
3632+
36253633
\LMHash{}
36263634
Evaluation of an actual argument list of the form
36273635

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
library server.performance.local;
6+
7+
import 'dart:async';
8+
9+
import 'package:analysis_server/plugin/protocol/protocol.dart';
10+
11+
import 'benchmark_scenario.dart';
12+
import 'memory_tests.dart';
13+
14+
main(List<String> args) async {
15+
int length = args.length;
16+
if (length < 1) {
17+
print('Usage: dart benchmark_local.dart path_to_flutter_checkout'
18+
' [benchmark_id]');
19+
return;
20+
}
21+
paths = new PathHolder(flutterPath: args[0]);
22+
String id = args.length >= 2 ? args[1] : null;
23+
if (id == null) {
24+
for (String id in benchmarks.keys) {
25+
BenchmarkFunction benchmark = benchmarks[id];
26+
await benchmark(id);
27+
}
28+
} else {
29+
BenchmarkFunction benchmark = benchmarks[id];
30+
if (benchmark != null) {
31+
benchmark(id);
32+
}
33+
}
34+
}
35+
36+
const Map<String, BenchmarkFunction> benchmarks =
37+
const <String, BenchmarkFunction>{
38+
'flutter-initialAnalysis-1': run_flutter_initialAnalysis_1,
39+
'flutter-initialAnalysis-2': run_flutter_initialAnalysis_2,
40+
'flutter-change-1': run_flutter_change_1,
41+
'flutter-change-2': run_flutter_change_2,
42+
'flutter-completion-1': run_flutter_completion_1,
43+
'flutter-completion-2': run_flutter_completion_2,
44+
'flutter-refactoring-1': run_flutter_refactoring_1,
45+
'flutter-memory-initialAnalysis-1': run_flutter_memory_initialAnalysis_1,
46+
'flutter-memory-initialAnalysis-2': run_flutter_memory_initialAnalysis_2,
47+
};
48+
49+
PathHolder paths;
50+
51+
Future run_flutter_change_1(String id) async {
52+
String description = r'''
53+
1. Open 'packages/flutter'.
54+
2. Change a method body in lib/src/painting/colors.dart
55+
3. Measure the time to finish analysis.
56+
4. Rollback changes to the file and wait for analysis.
57+
5. Go to (2).
58+
''';
59+
List<int> times = await new BenchmarkScenario().waitAnalyze_change_analyze(
60+
roots: [paths.packageFlutter],
61+
file: '${paths.packageFlutter}/lib/src/painting/colors.dart',
62+
fileChange: new FileChange(
63+
afterStr: 'final double h = hue % 360;', insertStr: 'print(12345);'),
64+
numOfRepeats: 10);
65+
printBenchmarkResults(id, description, times);
66+
}
67+
68+
Future run_flutter_change_2(String id) async {
69+
String description = r'''
70+
1. Open 'packages/flutter'.
71+
2. Change the name of a public method in lib/src/painting/colors.dart
72+
3. Measure the time to finish analysis.
73+
4. Rollback changes to the file and wait for analysis.
74+
5. Go to (2).
75+
''';
76+
List<int> times = await new BenchmarkScenario().waitAnalyze_change_analyze(
77+
roots: [paths.packageFlutter],
78+
file: '${paths.packageFlutter}/lib/src/painting/colors.dart',
79+
fileChange: new FileChange(
80+
afterStr: 'withValue(dou', afterStrBack: 4, insertStr: 'NewName'),
81+
numOfRepeats: 5);
82+
printBenchmarkResults(id, description, times);
83+
}
84+
85+
Future run_flutter_completion_1(String id) async {
86+
String description = r'''
87+
1. Open 'packages/flutter'.
88+
2. Change a method body in packages/flutter/lib/src/material/button.dart
89+
3. Request code completion in this method and measure time to get results.
90+
4. Rollback changes to the file and wait for analysis.
91+
5. Go to (2).
92+
''';
93+
String completionMarker = 'print(12345);';
94+
List<int> times = await new BenchmarkScenario()
95+
.waitAnalyze_change_getCompletion(
96+
roots: [paths.packageFlutter],
97+
file: '${paths.packageFlutter}/lib/src/material/button.dart',
98+
fileChange: new FileChange(
99+
afterStr: 'Widget build(BuildContext context) {',
100+
insertStr: completionMarker),
101+
completeAfterStr: completionMarker,
102+
numOfRepeats: 10);
103+
printBenchmarkResults(id, description, times);
104+
}
105+
106+
Future run_flutter_completion_2(String id) async {
107+
String description = r'''
108+
1. Open 'packages/flutter'.
109+
2. Change the name of a public method in lib/src/rendering/layer.dart
110+
3. Request code completion in this method and measure time to get results.
111+
4. Rollback changes to the file and wait for analysis.
112+
5. Go to (2).
113+
''';
114+
List<int> times = await new BenchmarkScenario()
115+
.waitAnalyze_change_getCompletion(
116+
roots: [paths.packageFlutter],
117+
file: '${paths.packageFlutter}/lib/src/rendering/layer.dart',
118+
fileChange: new FileChange(
119+
replaceWhat: 'void removeAllChildren() {',
120+
replaceWith: 'void removeAllChildren2() {print(12345);parent.'),
121+
completeAfterStr: 'print(12345);parent.',
122+
numOfRepeats: 5);
123+
printBenchmarkResults(id, description, times);
124+
}
125+
126+
Future run_flutter_initialAnalysis_1(String id) async {
127+
String description = r'''
128+
1. Start server, set 'hello_world' analysis root.
129+
2. Measure the time to finish initial analysis.
130+
3. Shutdown the server.
131+
4. Go to (1).
132+
''';
133+
List<int> times = await BenchmarkScenario.start_waitInitialAnalysis_shutdown(
134+
roots: [paths.exampleHelloWorld], numOfRepeats: 5);
135+
printBenchmarkResults(id, description, times);
136+
}
137+
138+
Future run_flutter_initialAnalysis_2(String id) async {
139+
String description = r'''
140+
1. Start server, set 'hello_world' and 'flutter_gallery' analysis roots.
141+
2. Measure the time to finish initial analysis.
142+
3. Shutdown the server.
143+
4. Go to (1).
144+
''';
145+
List<int> times = await BenchmarkScenario.start_waitInitialAnalysis_shutdown(
146+
roots: [paths.exampleHelloWorld, paths.exampleGallery], numOfRepeats: 5);
147+
printBenchmarkResults(id, description, times);
148+
}
149+
150+
Future run_flutter_memory_initialAnalysis_1(String id) async {
151+
String description = r'''
152+
1. Start server, set 'packages/flutter' as the analysis root.
153+
2. Measure the memory usage after finishing initial analysis.
154+
3. Shutdown the server.
155+
4. Go to (1).
156+
''';
157+
List<int> sizes = await AnalysisServerMemoryUsageTest
158+
.start_waitInitialAnalysis_shutdown(
159+
roots: <String>[paths.packageFlutter], numOfRepeats: 3);
160+
printMemoryResults(id, description, sizes);
161+
}
162+
163+
Future run_flutter_memory_initialAnalysis_2(String id) async {
164+
String description = r'''
165+
1. Start server, set 'packages/flutter' and 'packages/flutter_markdown' analysis roots.
166+
2. Measure the memory usage after finishing initial analysis.
167+
3. Shutdown the server.
168+
4. Go to (1).
169+
''';
170+
List<int> sizes = await AnalysisServerMemoryUsageTest
171+
.start_waitInitialAnalysis_shutdown(
172+
roots: <String>[paths.packageFlutter, paths.packageMarkdown],
173+
numOfRepeats: 3);
174+
printMemoryResults(id, description, sizes);
175+
}
176+
177+
Future run_flutter_refactoring_1(String id) async {
178+
String description = r'''
179+
1. Open 'packages/flutter'.
180+
2. Change the name of a public method in lib/src/rendering/layer.dart
181+
3. Request rename refactoring for `getSourcesWithFullName` and measure time to get results.
182+
4. Rollback changes to the file and wait for analysis.
183+
5. Go to (2).
184+
''';
185+
List<int> times = await new BenchmarkScenario()
186+
.waitAnalyze_change_getRefactoring(
187+
roots: [paths.packageFlutter],
188+
file: '${paths.packageFlutter}/lib/src/rendering/layer.dart',
189+
fileChange: new FileChange(
190+
replaceWhat: 'void removeAllChildren() {',
191+
replaceWith: 'void removeAllChildren2() {'),
192+
refactoringAtStr: 'addToScene(ui.SceneBuilder builder',
193+
refactoringKind: RefactoringKind.RENAME,
194+
refactoringOptions: new RenameOptions('addToScene2'),
195+
numOfRepeats: 5);
196+
printBenchmarkResults(id, description, times);
197+
}
198+
199+
typedef BenchmarkFunction(String id);
200+
201+
class PathHolder {
202+
String exampleHelloWorld;
203+
String exampleGallery;
204+
String exampleStocks;
205+
String packageFlutter;
206+
String packageMarkdown;
207+
String packageSprites;
208+
209+
PathHolder({String flutterPath}) {
210+
exampleHelloWorld = '$flutterPath/examples/hello_world';
211+
exampleGallery = '$flutterPath/examples/flutter_gallery';
212+
exampleStocks = '$flutterPath/examples/stocks';
213+
packageFlutter = '$flutterPath/packages/flutter';
214+
packageMarkdown = '$flutterPath/packages/flutter_markdown';
215+
packageSprites = '$flutterPath/packages/flutter_sprites';
216+
}
217+
}

0 commit comments

Comments
 (0)