mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
Run bootstrap test in strong mode
Fixes https://github.com/dart-lang/sdk/issues/33811 Change-Id: Ie4863d5a1e8932bbf5d16a3a84236f7a66d27534 Reviewed-on: https://dart-review.googlesource.com/65084 Reviewed-by: Dmitry Stefantsov <dmitryas@google.com> Commit-Queue: Peter von der Ahé <ahe@google.com>
This commit is contained in:
parent
38db4a10db
commit
e7c6416f80
|
@ -1106,8 +1106,9 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
|
||||||
expression.extend();
|
expression.extend();
|
||||||
} else {
|
} else {
|
||||||
VariableDeclaration variable = new VariableDeclarationJudgment.forValue(
|
VariableDeclaration variable = new VariableDeclarationJudgment.forValue(
|
||||||
expression, functionNestingLevel);
|
expression, functionNestingLevel)
|
||||||
push(new CascadeJudgment(variable));
|
..fileOffset = expression.fileOffset;
|
||||||
|
push(new CascadeJudgment(variable)..fileOffset = expression.fileOffset);
|
||||||
push(new VariableUseGenerator(this, token, variable));
|
push(new VariableUseGenerator(this, token, variable));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,12 @@ class FastaVerifyingVisitor extends VerifyingVisitor
|
||||||
visitAsExpression(AsExpression node) {
|
visitAsExpression(AsExpression node) {
|
||||||
super.visitAsExpression(node);
|
super.visitAsExpression(node);
|
||||||
if (node.fileOffset == -1) {
|
if (node.fileOffset == -1) {
|
||||||
problem(node, "No offset for $node");
|
TreeNode parent = node.parent;
|
||||||
|
while (parent != null) {
|
||||||
|
if (parent.fileOffset != -1) break;
|
||||||
|
parent = parent.parent;
|
||||||
|
}
|
||||||
|
problem(parent, "No offset for $node", context: node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,18 +46,17 @@ Future main() async {
|
||||||
|
|
||||||
Future runCompiler(Uri compiler, Uri input, Uri output) async {
|
Future runCompiler(Uri compiler, Uri input, Uri output) async {
|
||||||
Uri dartVm = Uri.base.resolveUri(new Uri.file(Platform.resolvedExecutable));
|
Uri dartVm = Uri.base.resolveUri(new Uri.file(Platform.resolvedExecutable));
|
||||||
StdioProcess result = await StdioProcess.run(dartVm.toFilePath(), <String>[
|
StdioProcess result = await StdioProcess.run(
|
||||||
"-c",
|
dartVm.toFilePath(),
|
||||||
"--no_preview_dart_2",
|
<String>[
|
||||||
compiler.toFilePath(),
|
compiler.toFilePath(),
|
||||||
"--compile-sdk=sdk/",
|
"--compile-sdk=sdk/",
|
||||||
"--output=${output.toFilePath()}",
|
"--output=${output.toFilePath()}",
|
||||||
"--verify",
|
"--verify",
|
||||||
input.toFilePath(),
|
"--strong",
|
||||||
]);
|
input.toFilePath(),
|
||||||
if (result.output.isNotEmpty) {
|
],
|
||||||
print(result.output);
|
suppressOutput: false);
|
||||||
}
|
|
||||||
if (result.exitCode != 0) {
|
if (result.exitCode != 0) {
|
||||||
throw "Compilation failed.";
|
throw "Compilation failed.";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1075,7 +1075,7 @@ abstract class _ChunkedJsonParser<T> {
|
||||||
* This function scans through the string literal for escapes, and copies
|
* This function scans through the string literal for escapes, and copies
|
||||||
* slices of non-escape characters using [addSliceToString].
|
* slices of non-escape characters using [addSliceToString].
|
||||||
*/
|
*/
|
||||||
int parseStringToBuffer(position) {
|
int parseStringToBuffer(int position) {
|
||||||
int end = chunkEnd;
|
int end = chunkEnd;
|
||||||
int start = position;
|
int start = position;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
Loading…
Reference in a new issue