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:
Peter von der Ahé 2018-07-18 11:21:23 +00:00 committed by commit-bot@chromium.org
parent 38db4a10db
commit e7c6416f80
4 changed files with 21 additions and 16 deletions

View file

@ -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));
} }
} }

View file

@ -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);
} }
} }

View file

@ -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.";
} }

View file

@ -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) {